fix: SER 5.0.1
Merged
SA
12d ago+154+154+012345678901234567890123456789-24-24-01234567890123456789
Summary
- Fix: in 5.0.0, the root
svelte-effect-runtimeentrypoint re-exportseffectfrom the compiler chunk, andcompiler/sveltekit-remote-bridge.tsimportednode:fs/promisesat the top level.vite devserves packages to the browser unbundled, so any page that loaded the client runtime threwModule "node:fs/promises" has been externalized for browser compatibility. The import is now lazy, the same way the compiler already loads its other Node-only modules. Production builds tree-shook it away, so they were not affected. - Regression contract: the packed-artifact boundary test now walks the static import graph of the packed browser entry and fails if it reaches any
node:specifier. - Conformance in dev and production:
test:conformance:browserruns every Playwright scenario against production servers first, then withCONFORMANCE_SERVER_MODE=developmentagainstvite dev. Native SvelteKit stays the oracle in both modes. The consumer, minimum-kit and broad lanes all use it, and dev results go to.dist/conformance/development, which CI now also uploads as evidence. - Harness fixes the dev lane needed:
- App servers shut down with SIGTERM (
gracefulShutdown), so portless can stopvite dev. Playwright's default hard kill left those servers running. - The traffic recorder falls back to the completed body when Chromium refuses to stream a response that has already finished. Dev timing made that race fail intermittently.
- Browser contracts now also fail on uncaught page errors.
- App servers shut down with SIGTERM (
- Release: all four packages bumped to 5.0.1. Changelog: usebarekey/barekey
docs/ser-5.0.1.
Verification
- Against the unfixed 5.0.0 tarball, the new dev lane fails (live-query page renders "Internal Error") and the packed-graph check names
node:fs/promisesinchunks/compiler-*.js. - With the fix:
corepack pnpm run test: 64 files, 842 tests pass.- Lint and check pass.
test:conformance:browserpasses on kit-3-primary in both modes (16 + 16 scenarios).test:conformance:minimum-kitpasses on SvelteKit 2.69.0 in both modes.- Three back-to-back dev runs were green, with no leftover server processes.
š¤ Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the 5.0.0 browser crash in vite dev where the root svelte-effect-runtime entrypoint re-exported effect from the compiler chunk, which eagerly imported node:fs/promises at the top level. Any page that loaded the client runtime threw Module "node:fs/promises" has been externalized for browser compatibility; production builds were unaffected because tree-shaking removed the import. It is now lazy, matching how the compiler loads its other Node-only modules. All four packages are bumped to 5.0.1.
Testing
- Playwright conformance now runs every scenario against production servers and then against
vite dev(CONFORMANCE_SERVER_MODE=development), with development evidence written to.dist/conformance/development. - The packed-artifact boundary test walks the browser entry's static import graph and fails on any
node:specifier. - Harness fixes that dev mode needed: app servers shut down with SIGTERM, traffic recording falls back to completed bodies when Chromium refuses to stream finished responses, browser contracts now also fail on uncaught page errors, and stale portless route locks are cleared before each run so back-to-back runs don't fail to register their servers.