Generated worker entries can import vinext subpaths that must resolve from the published package. Missing package exports break consumers even when the generated template itself looks correct.
Add deploy coverage that extracts vinext subpath imports from generated App and Pages worker entries and verifies each one is covered by packages/vinext/package.json exports.
Tighten the prefer-shared-utils lint rule so copied shared helpers in repo tests are reported too. Test files mask template literal fixture payloads, while source files still scan generated-source templates.
* refactor(utils): dedupe shared helpers and lint redefinitions
Shared helper logic was being reimplemented across generated entries, runtime modules, and shims. That made small utility semantics easy to drift and gave agents no mechanical feedback when they hand-rolled copies.
Add a local Oxlint rule that discovers exported shared helpers and reports local redefinitions, including helpers embedded in generated source strings. Centralize the existing low-risk duplicates through shared utility modules.
* fix(lint): harden shared utility rule validation
* test(lint): avoid matching oxlint success summary
* fix(lint): make shared utility rule cwd independent
* fix(lint): address bonk review comments
- Drop redundant "default" export conditions in package.json; the
generated worker template resolves these subpaths via "import" like
its siblings (request-pipeline, pages-i18n, config-matchers).
- Mask backtick template literals in prefer-shared-utils so an
apostrophe or comment sequence inside generated template source can
no longer open string/comment masking and swallow a subsequent
helper definition (false negative). Template bodies stay scannable.
---------
Co-authored-by: James <james@eli.cx>
* fix: replace relative shim imports with bare specifier vinext/shims/X (#1001)
Internally, server modules imported their own 'use client' shims via
relative paths (e.g. from "../shims/slot.js"). @vitejs/plugin-rsc's
packageSources tracking only fires for bare specifier imports, so
relative shim imports took a broken fallback path generating absolute
filesystem paths that fail against the package's exports field.
Changes:
- 67 relative shim imports across 34 source files rewritten to
"vinext/shims/<name>"
- Added .tsconfig paths mapping so TypeScript resolves shim types to
source (avoids type mismatch between dist and source module graphs)
- Added vitest project-level resolve aliases for vinext/shims -> source
(prevents separate module graph instances in unit tests)
- Added package.json exports for ./dist/shims/*.js as a safety net
- Added regression test (tests/shim-imports.test.ts) that asserts no
relative shim imports exist in source
* fix: address review feedback for relative shim imports (#1006)
- Convert missed side-effect import in dev-server.ts to vinext/shims/router-state
- Extend regression test regex to catch bare side-effect import statements
- Remove redundant ./dist/shims/*.js exports from package.json
* replace test with oxlint plugin
---------
Co-authored-by: James <james@eli.cx>