feat(deps): remove pdfme — Phase 1 PDF stack overhaul complete

Phase 1 / commit 14 of 14 — final cleanup.

Removed:
  package.json:
    - @pdfme/common      6.1.2
    - @pdfme/generator   6.1.2
    - @pdfme/schemas     6.1.2
  src/lib/pdf/generate.ts (24 LOC — the pdfme thin wrapper)
  tests/integration/document-templates-generate-and-sign.test.ts:
    - the vi.mock() entry for '@/lib/pdf/generate' (module deleted)
    - the assertion `pdfModule.generatePdf).not.toHaveBeenCalled()`
      (rephrased as a positive assertion on the EOI source-PDF path)

Three engines remain, each with a single clear job:
  pdf-lib          AcroForm read/fill for berth-PDF parser tier-1 and
                   the in-app EOI source-PDF pathway
  pdfkit           streaming engine for the photo-heavy expense PDF
  @react-pdf       brand-kit-based JSX rendering for every internal
                   report / record export / parent-company export

Plus unpdf for berth-PDF parser tier-2 text extraction (replaces the
broken tesseract-on-PDF-buffer path).

Phase 1 totals:
  14 commits
  +X LOC react-pdf brand kit + templates + logo upload
  -1500+ LOC pdfme bridge + templates + invoice generator + html seed
  3 deps removed (@pdfme/common, /generator, /schemas)
  4 deps added (@react-pdf/renderer, unpdf, react-image-crop, svgo)

1298/1298 vitest green throughout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-12 21:15:05 +02:00
parent e8a852856e
commit e386c8d83f
4 changed files with 1 additions and 149 deletions

115
pnpm-lock.yaml generated
View File

@@ -28,15 +28,6 @@ importers:
'@hookform/resolvers':
specifier: ^5.2.2
version: 5.2.2(react-hook-form@7.75.0(react@19.2.6))
'@pdfme/common':
specifier: ^6.1.2
version: 6.1.2
'@pdfme/generator':
specifier: ^6.1.2
version: 6.1.2(@pdfme/common@6.1.2)(@pdfme/schemas@6.1.2(@pdfme/common@6.1.2))
'@pdfme/schemas':
specifier: ^6.1.2
version: 6.1.2(@pdfme/common@6.1.2)
'@radix-ui/react-accordion':
specifier: ^1.2.12
version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)
@@ -1247,23 +1238,6 @@ packages:
'@pdf-lib/upng@1.0.1':
resolution: {integrity: sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==}
'@pdfme/common@6.1.2':
resolution: {integrity: sha512-evnKRNuuSnnvhdjuv81HuofdYwdEdREB7ljaeBgLfobI/p5aRSkPRAmfcEjRgyZqB7F2RO0d4GcRH9Lvr5r0kA==}
'@pdfme/generator@6.1.2':
resolution: {integrity: sha512-JT+VR2pEDVDonaFJANI+0gCHczv26tyvG47XxGXyiLjZdqsD5BoFfsm0hbYXFQ3RKqM28z0ndbxm+Z+uN8/zrw==}
peerDependencies:
'@pdfme/common': latest
'@pdfme/schemas': latest
'@pdfme/pdf-lib@6.1.2':
resolution: {integrity: sha512-iDM554Ah3UmtcIT2OgaexntrF3ezKSDR4FjRHPofRscZzbsz27MW0hiBVlVGApdQSfel8sdANWl5Ldbaifanog==}
'@pdfme/schemas@6.1.2':
resolution: {integrity: sha512-1J7h9nWaUZUAFI9tsa4liU6tRFipbVAEXsAwt6Cg5/njI8GyWDPVDjFYbpHfDWMEHGbrNUidoW/sB04gJsQJ1w==}
peerDependencies:
'@pdfme/common': latest
'@petamoriken/float16@3.9.3':
resolution: {integrity: sha512-8awtpHXCx/bNpFt4mt2xdkgtgVvKqty8VbjHI/WWWQuEw+KLzFot3f4+LkQY9YmOtq7A5GdOnqoIC8Pdygjk2g==}
@@ -2612,9 +2586,6 @@ packages:
engines: {node: '>=0.4.0'}
hasBin: true
air-datepicker@3.6.0:
resolution: {integrity: sha512-+txUkqa949rXBJDmkQAIb/GehZECJYF4rm9XJxVYtEX22C9WvBpE/XwCUQZBopKIkpg4ycAySJ9lH3JOg9qQTw==}
ajv-formats@3.0.1:
resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}
peerDependencies:
@@ -2969,10 +2940,6 @@ packages:
resolution: {integrity: sha512-v3WTwA8diFtsADaJ8eK2ozyi2CYK9rDZCeoKF+dIPF/MUL8HxAOa3H72Gmu1lC4yKlho6t1PwNr/QpDVqaNEZQ==}
engines: {node: '>=12.22.0'}
bwip-js@4.10.1:
resolution: {integrity: sha512-I/cEPiXsu7dRCp78PpVY4gdIXmbH752n8dMC+DStM77XPkrzeathdYrjnZ/i/vZPIxXTUWc+JxgJ/MvbodqPLA==}
hasBin: true
call-bind-apply-helpers@1.0.2:
resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==}
engines: {node: '>= 0.4'}
@@ -3059,10 +3026,6 @@ packages:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
color-convert@3.1.3:
resolution: {integrity: sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg==}
engines: {node: '>=14.6'}
color-name@1.1.4:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
@@ -3074,10 +3037,6 @@ packages:
resolution: {integrity: sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==}
engines: {node: '>=18'}
color@5.0.3:
resolution: {integrity: sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==}
engines: {node: '>=18'}
colorette@2.0.20:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
@@ -3958,9 +3917,6 @@ packages:
resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
html-entities@2.6.0:
resolution: {integrity: sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==}
html-escaper@2.0.2:
resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==}
@@ -4484,9 +4440,6 @@ packages:
peerDependencies:
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
lucide@1.14.0:
resolution: {integrity: sha512-IoRC3lHwemJWvsXKcHK90hkgY4h1HGztBL63w2XwFtIu8gFDPp4/kiuqVtlN3vaM9bxsLQ4ZUBJfGsbKFaB2IA==}
luxon@3.7.2:
resolution: {integrity: sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==}
engines: {node: '>=12'}
@@ -4695,9 +4648,6 @@ packages:
resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==}
hasBin: true
node-html-better-parser@1.5.8:
resolution: {integrity: sha512-t/wAKvaTSKco43X+yf9+76RiMt18MtMmzd4wc7rKj+fWav6DV4ajDEKdWlLzSE8USDF5zr/06uGj0Wr/dGAFtw==}
node-releases@2.0.38:
resolution: {integrity: sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==}
@@ -4852,9 +4802,6 @@ packages:
pako@1.0.11:
resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}
pako@2.1.0:
resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==}
parent-module@1.0.1:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
@@ -5401,9 +5348,6 @@ packages:
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
signature_pad@5.1.3:
resolution: {integrity: sha512-zyxW5vuJVnQdGcU+kAj9FYl7WaAunY3kA5S7mPg0xJiujL9+sPAWfSQHS5tXaJXDUa4FuZeKhfdCDQ6K3wfkpQ==}
sirv@2.0.4:
resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==}
engines: {node: '>= 10'}
@@ -6921,40 +6865,6 @@ snapshots:
dependencies:
pako: 1.0.11
'@pdfme/common@6.1.2':
dependencies:
'@pdfme/pdf-lib': 6.1.2
acorn: 8.16.0
buffer: 6.0.3
zod: 4.4.3
'@pdfme/generator@6.1.2(@pdfme/common@6.1.2)(@pdfme/schemas@6.1.2(@pdfme/common@6.1.2))':
dependencies:
'@pdfme/common': 6.1.2
'@pdfme/pdf-lib': 6.1.2
'@pdfme/schemas': 6.1.2(@pdfme/common@6.1.2)
fontkit: 2.0.4
'@pdfme/pdf-lib@6.1.2':
dependencies:
'@pdf-lib/standard-fonts': 1.0.0
'@pdf-lib/upng': 1.0.1
color: 5.0.3
node-html-better-parser: 1.5.8
pako: 2.1.0
'@pdfme/schemas@6.1.2(@pdfme/common@6.1.2)':
dependencies:
'@pdfme/common': 6.1.2
'@pdfme/pdf-lib': 6.1.2
air-datepicker: 3.6.0
bwip-js: 4.10.1
date-fns: 4.1.0
dompurify: 3.4.2
fontkit: 2.0.4
lucide: 1.14.0
signature_pad: 5.1.3
'@petamoriken/float16@3.9.3':
optional: true
@@ -8292,8 +8202,6 @@ snapshots:
acorn@8.16.0: {}
air-datepicker@3.6.0: {}
ajv-formats@3.0.1(ajv@8.20.0):
optionalDependencies:
ajv: 8.20.0
@@ -8647,8 +8555,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
bwip-js@4.10.1: {}
call-bind-apply-helpers@1.0.2:
dependencies:
es-errors: 1.3.0
@@ -8738,10 +8644,6 @@ snapshots:
dependencies:
color-name: 1.1.4
color-convert@3.1.3:
dependencies:
color-name: 2.1.0
color-name@1.1.4: {}
color-name@2.1.0: {}
@@ -8750,11 +8652,6 @@ snapshots:
dependencies:
color-name: 2.1.0
color@5.0.3:
dependencies:
color-convert: 3.1.3
color-string: 2.1.4
colorette@2.0.20: {}
commander@11.1.0: {}
@@ -9707,8 +9604,6 @@ snapshots:
transitivePeerDependencies:
- '@noble/hashes'
html-entities@2.6.0: {}
html-escaper@2.0.2: {}
html-to-text@9.0.5:
@@ -10222,8 +10117,6 @@ snapshots:
dependencies:
react: 19.2.6
lucide@1.14.0: {}
luxon@3.7.2: {}
magic-string@0.30.21:
@@ -10421,10 +10314,6 @@ snapshots:
detect-libc: 2.1.2
optional: true
node-html-better-parser@1.5.8:
dependencies:
html-entities: 2.6.0
node-releases@2.0.38: {}
nodemailer@8.0.5: {}
@@ -10575,8 +10464,6 @@ snapshots:
pako@1.0.11: {}
pako@2.1.0: {}
parent-module@1.0.1:
dependencies:
callsites: 3.1.0
@@ -11207,8 +11094,6 @@ snapshots:
signal-exit@4.1.0: {}
signature_pad@5.1.3: {}
sirv@2.0.4:
dependencies:
'@polka/url': 1.0.0-next.29