Repository navigation
fix(forme): move consumers to Forme 0.32 and load the engine on first render - #9
Conversation
… render The registry pinned @formepdf/core to ^0.25.0, which keeps consumers on 0.25.x. Bump to ^0.32.0 and declare the engine once, on forme/utils. The browser docs started the worker and fetched the WASM on every app load. Create the worker and import the document on first render, and mark @formepdf/react external so ng build drops a chunk nothing loads. Installed files now end with an MIT notice. shadcn add strips leading comments, so the notice goes last. build-registry fails on registry dependencies that no file imports, and four stale ones are removed. The keep-together docs say what happens to content taller than the remaining page and that Forme ignores minPresenceAhead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
aFlamee
left a comment
There was a problem hiding this comment.
Note
🤖 Claude Opus 5.5 responding on behalf of aFlamee
The architecture holds up. @formepdf/core declared once on forme/utils reaches every renderable Forme item. The lazy worker and document imports are correct. externalDependencies: ["@formepdf/react"] is safe because the documented worker calls renderSerializedDoc, which never imports React in 0.32. Rendering all 44 Forme fixtures on 0.25 and 0.32 gave identical page counts.
One should needs fixing before merge: the font snippet no longer passes the theme, so the registered font is never used. The other comments are nits.
Council scores: Opus 7/10, GPT Sol 7/10, Gemini Neon 7/10. Sol-loop ran 2 rounds.
…orker fails Address the review on #9. The Forme font snippet passes a theme that names Noto Sans again. Both worker snippets reject when the worker fails to load instead of hanging. The registry's reverse dependency check compares source paths, so a cross-base dependency fails. The license line is called an attribution line, and keep-together says only text splits across pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orker fails Address the review on #9. The Forme font snippet passes a theme that names Noto Sans again. Both worker snippets reject when the worker fails to load instead of hanging. The registry's reverse dependency check compares source paths, so a cross-base dependency fails. The license line is called an attribution line, and keep-together says only text splits across pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A consumer app rendering one A4 document in the browser found the Forme base not ready for production. Consumers were stuck on Forme 0.25.x. The documented browser setup downloaded the 7 MB engine on every page load. Installed files had no license notice. Some blocks pulled in components they never use.
What changes
@formepdf/core@^0.25.0, which in 0.x semver never leaves 0.25.x. Consumers now get^0.32.0(kerning fixes, tall table rows that split instead of leaving the page empty, quick-xml security fix). The engine is declared once, onforme/utils, which every Forme item reaches.@formepdf/sharedis declared on the two items whose files import it. Parity is unchanged at 88/88, so no fixture was regenerated.externalDependencies: ["@formepdf/react"], song builddrops a React chunk that nothing loads.shadcn addstrips every leading comment (//,/* */,/*! */,@licenseall tested), so the notice goes last.install:checkasserts it arrives. The docs' manual-install code shows the same line.event-agenda, and Takumigift-certificate. All four were inherited from pdfcn.build-registry.tsnow fails when an item declares one no file imports. It compares source paths, because both bases share install targets such aslib/utils.ts.minPresenceAhead.React stays in consumer lockfiles.
@formepdf/core0.32 still has a hard dependency on@formepdf/reactand a peer dependency onreact, so only Forme upstream can fix that.Numbers
Fresh
ng newapp withforme/invoice-classic, using the documented worker setup:mainbundlepnpm why reactreact@19.3.1via@formepdf/core@0.25.0react@19.3.1via@formepdf/core@0.32.0(upstream)Council design
Claude Opus 5.5, GPT-6.2 Sol, and Gemini 4 Neon each reviewed the evidence and the candidate fixes, read-only. An earlier Gemini 4 Argon run was discarded because the owner's rule allows only Neon for the Gemini seat.
^0.32.0. All agreed.@formepdf/coregoes onforme/utilsonly. Opus and Neon agreed. Sol wanted it dropped from the registry entirely. Declined, because every consumer that renders needs it, so the lockfile is the same and the install gets an extra manual step.externalDependencies. All agreed. Neon also wanted to document a pnpm override. Declined, because npm, Angular's default, cannot remove a dependency.wrapdefault,minPresenceAheadbehavior, page-footer variants, font tooling, and Takumi package declarations. These keep pdfcn parity or are the consumer's choice.Proof:
pnpm verifypasses all six steps, including the install check into freshng newapps. Re-adding a stale dependency, or declaring a cross-base one, makes the registry build fail. The documented lazy worker setup was built by hand on 0.32 in a fresh app. In headless Chromium, the worker snippet rejects renders against a missing worker script, where the old one hung. The font snippet renders ≥ → ✓ with Noto Sans and no?.Reviewed with sol-loop: 3 rounds with GPT-6.2 Sol. Sol verdict: approved
Review fixes reviewed with sol-loop: 1 round with GPT-6.2 Sol on high. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code