|
| 1 | +[[case]] |
| 2 | +name = "migration_oxnode_scripts" |
| 3 | +vp = "local" |
| 4 | +comment = "The oxc-node dependencies use local stub packages. Migrated scripts run the bundled loader." |
| 5 | +steps = [ |
| 6 | + { argv = ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], comment = "oxnode commands, loaders, and shebangs migrate to vpx" }, |
| 7 | + ["vpt", "print-file", "package.json"], |
| 8 | + ["vpt", "print-file", "scripts/release.ts"], |
| 9 | + { argv = ["vp", "run", "seed"], comment = "the migrated command runs TypeScript with Node conditions" }, |
| 10 | + { argv = ["vp", "run", "loader"], comment = "the migrated Node loader command runs without standalone oxc-node" }, |
| 11 | +] |
| 12 | + |
| 13 | +[[case]] |
| 14 | +name = "migration_oxnode_kept" |
| 15 | +vp = "local" |
| 16 | +steps = [ |
| 17 | + { argv = ["vpt", "json-edit", "package.json", "scripts.node-watch", "oxnode --watch ./scripts/seed.ts"], snapshot = false }, |
| 18 | + { argv = ["vpt", "write-file", "scripts/importer.ts", "import '@oxc-node/core/register';\n"], snapshot = false }, |
| 19 | + { argv = ["vp", "migrate", "--no-interactive", "--no-hooks", "--no-agent", "--no-editor"], comment = "Node watch mode and remaining loader imports keep the dependencies" }, |
| 20 | + ["vpt", "print-file", "package.json"], |
| 21 | +] |
| 22 | + |
| 23 | +[[case]] |
| 24 | +name = "migration_oxnode_already_vite_plus" |
| 25 | +vp = "local" |
| 26 | +steps = [ |
| 27 | + { argv = ["vpt", "json-edit", "package.json", "devDependencies.vite-plus", "latest"], snapshot = false }, |
| 28 | + { argv = ["vp", "migrate", "--no-interactive"], comment = "a plain upgrade leaves oxnode migration to --full" }, |
| 29 | + { argv = ["vp", "migrate", "--no-interactive", "--full", "--no-hooks", "--no-agent", "--no-editor"], comment = "--full migrates oxnode on an existing Vite+ project" }, |
| 30 | + ["vpt", "print-file", "package.json"], |
| 31 | + ["vp", "run", "seed"], |
| 32 | +] |
0 commit comments