fix(electron): normalize hashed standalone externals - #7353
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Thanks for tracking this down — this lines up exactly with #7346 (macOS Electron I verified locally in an isolated worktree: both new regression tests pass, the full One tiny nit (non-blocking, won't hold up the merge): the inventory-table comment at the top of Planning to merge this as-is. Will also link it to close #7346. |
|
Merged into |
Summary
Fixes the Electron packaging path that left Turbopack-hashed external imports such as
ws-a972e7ffa40ff725in server instrumentation chunks.assembleStandalonealready haspatchTurbopackChunksfor this exact normalization and the npm prepublish flow enables it. The Electron staging flow did not, so the packaged app copied canonicalnode_modules/wsbut attempted to import the non-existent hashed name at startup.This enables the existing normalization step for Electron builds and adds regression coverage for both the package-name rewrite and the Electron assembly wiring.
Validation
node --import tsx/esm --test --test-name-pattern "patchTurbopackChunks restores canonical external package names|electron standalone assembly normalizes Turbopack hashed external imports" tests/unit/build/assemble-standalone.test.ts tests/unit/electron-packaging.test.tsnpx prettier --check scripts/build/prepare-electron-standalone.mjs tests/unit/build/assemble-standalone.test.ts tests/unit/electron-packaging.test.tsnpx eslint tests/unit/build/assemble-standalone.test.ts tests/unit/electron-packaging.test.ts --no-error-on-unmatched-pattern --suppressions-location config/quality/eslint-suppressions.jsongit diff --checkThe complete
assemble-standalone.test.tssuite has an existing Windows-only path failure in its unrelatedstandalone-server-ws.mjstest: it derives afile:URL with.pathname, producingF:\\F:\\.... The selected new regression and Electron packaging test both pass.Scope
No provider behavior, route handling, or bundled dependency list changes. The staging step now rewrites only the erroneous hash suffixes before
electron-buildercopies the standalone bundle.