Commit 0b1de50
fix(migration): rewrite re-export specifiers alongside imports
Sibling rules for every `inside: { kind: import_statement }` rule now
also match `kind: export_statement`, so `export { page } from
'@vitest/browser/context'`, `export * from '@vitest/browser-playwright'`,
`export * as ns from 'vitest'`, and `export type { Config } from
'vitest/config'` are rewritten the same way as their `import` siblings.
Without this, projects with barrel files re-exporting from `@vitest/*`
were left pointing at packages that `rewritePackageJson()`
(`REMOVE_PACKAGES`) had already dropped from package.json — hitting
ERR_PACKAGE_PATH_NOT_EXPORTED under strict pnpm / yarn PnP layouts.
19 new export-statement rules mirroring all existing import rules
(vite ×2, vitest family ×15, tsdown ×2). 10 new tests across all four
`export_statement` shapes plus a negative test that a string literal
outside an export-from is left alone. `cargo test -p vite_migration
--lib`: 222 passed (was 212).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 267b1ff commit 0b1de50
1 file changed
Lines changed: 423 additions & 0 deletions
0 commit comments