fix: bundle harfbuzzjs so consumers do not resolve the unpatched package - #796
Open
Nixxx19 wants to merge 1 commit into
Open
fix: bundle harfbuzzjs so consumers do not resolve the unpatched package#796Nixxx19 wants to merge 1 commit into
Nixxx19 wants to merge 1 commit into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Nixxx19
force-pushed
the
fix/bundle-harfbuzzjs
branch
from
September 1, 2026 06:57
6d97c70 to
74809de
Compare
wei
added a commit
to wei/socialify
that referenced
this pull request
Sep 4, 2026
Runtime: Next.js 16.1.7→16.3.4, React/React DOM 19.2.4→19.2.8, satori 0.25.0→0.32.0, Tailwind CSS 4.2.1→4.3.3, daisyUI 5.5.19→5.7.28, simple-icons 16.29.0, react-icons 5.7.0, badgen 3.3.2, use-debounce 10.1.1. Tooling: Playwright 1.62.1, Jest 30.5.1, ts-jest 29.4.12, Biome 2.5.11, changesets CLI 2.30.0→3.0.1, @testing-library/jest-dom 6→7, postcss 8.5.27. Package manager: pnpm 10.27.0→11.25.0. Migrates pnpm-workspace.yaml from the removed onlyBuiltDependencies to allowBuilds, and sets verifyDepsBeforeRun: false so `pnpm build` inside the e2e/Docker containers does not trigger a modules purge that aborts without a TTY. Actions: checkout v7, setup-node v7, cache v6, pnpm/action-setup v6, action-gh-release v3, changesets/action v1→v2 (all inputs renamed, and github-token is now an input rather than a env var). UI drift is limited to two reviewed changes, both re-baselined: - daisyUI 5.7 fixes `.alert:has(:nth-child(2))` to `:has(>:nth-child(2))`, so the toast no longer gets a phantom second grid column and is 16px narrower. Adds `border-0` to the two bare `.join-item` icon prefixes to suppress daisyUI 5.7's new unconditional join-item border. - Next.js 16.3 shifts mobile layout just enough to change Playwright's scroll-into-view decision in one snapshot; rendering is unchanged. Held back: TypeScript 7.0.2 (no JS compiler API until 7.1, so ts-jest cannot transform), satori 0.33 (bundles harfbuzzjs wasm that cannot resolve in the Next.js edge runtime, see vercel/satori#796).
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.
fixes #791
fixes #794
harfbuzzjsis left external in the published bundle, so all four dist entries end up with a barerequire("harfbuzzjs")and we ship nohb.wasm. whoever installs satori gets the plain package, and its loader reads__dirname + "/hb.wasm". once a bundler moves that code__dirnameisn'tnode_modules/harfbuzzjsanymore, so the wasm isn't where it looks. on a worker target it doesn't even get that far, it dies resolvingfs.no framework needed to see it,
npm i satori@0.33.4 esbuildand putdist/index.jsthrough esbuild withplatform: 'browser':with
platform: 'node'and cjs it bundles fine and then rendering aborts,ENOENT ... <outdir>/hb.wasm.ci doesn't catch either of these because
patches/harfbuzzjs@0.10.0.patchdrops the fs branch and inlines the wasm, sotest/browser-build.mjshas only ever bundled a harfbuzzjs that was already fixed. the patch doesn't reach anyone installing satori.so this adds
harfbuzzjstonoExternallikeyoga-layout, and makesbrowser-build.mjsfail if a dist entry still imports it. that check does fail on main, i ran it before adding it. suite still green locally, 512 tests.the cost is size, since the wasm is in the bundle now. index.js goes from 122 to 330 KB gzipped, standalone from 83 to 291.
the standalone number is the one worth arguing about, it had no wasm inlined before this. i went this way because shaping isn't optional since 0.33 so standalone needs the wasm regardless, and this way nobody has to touch their code. if you'd rather keep standalone small the other shape is shipping
hb.wasmas a subpath export with aninitlike yoga has, but that breaks everyone already onsatori/standaloneand i didn't want to make that call inside a bug fix. happy to redo it that way.