chore(deps): security audit updates + mjml fix#12
Merged
Conversation
Resolves 3 of 7 vulnerabilities reported by npm audit: - kysely high (JSON-path injection, GHSA-pv5w-4p9q-p3v2) via better-auth 1.6.5 -> 1.6.11 - @xmldom/xmldom scoped: 4 high (DoS, injection) - brace-expansion moderate (DoS) Patched next 16.2.4 -> 16.2.6 (DoS via Server Components, GHSA-8h8q-6873-q5fj). Applied safe minor/patch bumps via npm update across react/react-dom, zod, vitest, tailwindcss, postcss, mjml, openai, react-hook-form, lucide-react, tsx, docxtemplater, grapesjs, eslint-config-next, and @vitest/coverage-v8 and other dev/types packages. mjml 5.0.1 -> 5.2.2 made mjml2html() async; added await in src/components/template-editor/actions.ts to keep the build green. Remaining vulnerabilities (not auto-fixable): - xmldom (unscoped, deprecated) critical via docxtemplater-image-module-free (no upstream fix; requires library replacement or risk acceptance) - postcss moderate nested under next (will resolve in future Next release) Validation: - npm run test:run -> 647/647 passing (44 files) - npm run build -> green Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
norm613
pushed a commit
to norm613/MPNext-Tools
that referenced
this pull request
Jun 24, 2026
MP stores datetimes as wall-clock values in the domain's configured time
zone, not UTC. Existing write paths in GroupService and FamilyService tagged
values as UTC (via `${date}T00:00:00Z` or `new Date().toISOString()`),
which caused saved records to drift by the offset between the Node server's
local zone and MP's domain zone. Edits compounded the drift on each save.
- Add DomainTimezoneService — singleton wrapping getDomainInfo() with
Windows->IANA mapping and SQL datetime conversion (toMpSqlDatetime,
parseMpDatetime).
- Add shared server action getMpTimezone() for client-side display.
- Fix GroupService.createGroup/updateGroup to route Start_Date / End_Date /
Promotion_Date through the service.
- Fix FamilyService Participant_Start_Date and Donor Setup_Date writes to
use MP-TZ wall-clock instead of new Date().toISOString().
- Update groupService.test.ts: mock getDomainInfo, reset both singletons in
beforeEach, assert MP-SQL format, add round-trip regression proving three
consecutive saves of the same date do not shift.
- Add reference doc .claude/references/ministryplatform.datetimehandling.md.
- Update CLAUDE.md with Key Development Practice MinistryPlatform-Community#12 + reference link.
Tests: 16 new in domainTimezoneService.test.ts, 1 round-trip regression in
groupService.test.ts. Full suite passes (664/664) under TZ=UTC and
TZ=America/Los_Angeles.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves 3 of 7 npm audit vulnerabilities + applies safe minor/patch updates across the dependency tree.
Security fixes
kyselyhigh (JSON-path injection, GHSA-pv5w-4p9q-p3v2) — resolved viabetter-auth1.6.5 → 1.6.11@xmldom/xmldom(scoped) — 4 high advisories resolvedbrace-expansionmoderate (DoS)next16.2.4 → 16.2.6 — patches DoS via Server Components (GHSA-8h8q-6873-q5fj)Other updates (safe minor/patch via
npm update)react / react-dom, zod, vitest, @vitest/coverage-v8, tailwindcss, @tailwindcss/postcss, postcss, mjml, openai, react-hook-form, lucide-react, tsx, docxtemplater, grapesjs, eslint-config-next, plus types/dev tooling.
Code change
src/components/template-editor/actions.ts—mjml5.0.1 → 5.2.2 mademjml2html()return a Promise. Addedawaitto keep the build green. One line.Remaining (not auto-fixable)
xmldom(unscoped, deprecated) critical viadocxtemplater-image-module-free— no upstream fix; needs library replacement or explicit risk acceptance.postcssmoderate, nested undernext's internal copy — will resolve in a future Next release.Test plan
npm run test:run→ 647/647 passing (44 files)npm run build→ green🤖 Generated with Claude Code