You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(deps): replace abandoned docxtemplater-image-module-free with docxtemplater-image
Removes the critical xmldom advisory (GHSA-crh6-fp67-6883, CVSS 9.8) by
replacing the abandoned docxtemplater-image-module-free@1.1.1 — which
pinned the deprecated xmldom@0.1.x — with maintained docxtemplater-image@0.1.2,
which uses @xmldom/xmldom@^0.9.7 (the same line as core docxtemplater@3.68).
npm audit: 4 vulns (1 critical, 3 moderate) -> 2 moderate.
The remaining 2 are postcss-in-next, unrelated and unfixable until Next 16.3 stable.
API is identical: same getImage/getSize/centered options and {%token} placeholder
syntax. No behavioral change to the Address Labels mail-merge feature; the
upload-your-own-template flow continues to work unchanged.
Verification:
- npm run test:run: 45 files, 667 tests pass
- npm run lint: clean
- npm run build: clean
Manual end-to-end browser test recommended before release (sample template
upload -> merge -> open in Word -> verify barcode image rendering).
Closes the xmldom-critical-vulnerability TODO.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
-**POSTNET**: Legacy 5/9/11-digit tall/short bar barcode (no Mailer ID needed).
60
60
-**Skip reasons** (`SkipReason` in `src/lib/dto/address-label.dto.ts:15`): `no_address`, `no_postal_code`, `opted_out` (`Bulk_Mail_Opt_Out=true`), `no_barcode` (only when `includeMissingBarcodes=false`), `no_household` (household mode only — contact lacks `Household_ID` so dedup cannot be guaranteed).
61
61
-**Pre-encoded bar states**: `preEncodeBarcodes()` encodes once on the server into `LabelData.barStates` so the PDF/Word renderers are pure layout (see `../utils/barcodes.md`).
62
-
-**Mail-merge tab**: uploads a `.docx` with `{Name}`, `{AddressLine1}`, `{AddressLine2}`, `{City}`, `{State}`, `{PostalCode}`, `{%Barcode}` tokens plus `{#addresses}…{/addresses}` loop and `{#isNotLast}<pagebreak>{/isNotLast}` conditional — barcodes become BMP images via `docxtemplater-image-module-free`.
62
+
-**Mail-merge tab**: uploads a `.docx` with `{Name}`, `{AddressLine1}`, `{AddressLine2}`, `{City}`, `{State}`, `{PostalCode}`, `{%Barcode}` tokens plus `{#addresses}…{/addresses}` loop and `{#isNotLast}<pagebreak>{/isNotLast}` conditional — barcodes become BMP images via `docxtemplater-image`.
63
63
-**LocalStorage persistence**: last-used `LabelConfig` stored under key `address-labels-config` (`src/app/(web)/tools/addresslabels/address-labels.tsx:15`).
-`preEncodeBarcodes()` then builds `addresses[]` rows with `{ Name, AddressLine1, AddressLine2, City, State, PostalCode, Barcode: 'barcode_N', isNotLast }` plus a `Map<string,Buffer>` of BMP barcodes keyed by `barcode_N`.
180
-
-`Docxtemplater` with `docxtemplater-image-module-free` — `getImage` resolves key strings to buffers; `getSize` returns `[200, 25]` for the `Barcode` tag.
180
+
-`Docxtemplater` with `docxtemplater-image` — `getImage` resolves key strings to buffers; `getSize` returns `[200, 25]` for the `Barcode` tag.
181
181
- Render errors containing "tag" are wrapped as `Template error: …`.
0 commit comments