@vite-hub/codemods 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +216 -12
- package/dist/{cli-main-CmPQbswC.js → cli-main-DfzMGFup.js} +11438 -6158
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1 -1
- package/package.json +5 -4
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ interface Codemod {
|
|
|
41
41
|
description: string;
|
|
42
42
|
/** Positional arguments after the codemod name, for help output. */
|
|
43
43
|
usage: string;
|
|
44
|
+
/** Detect again against the scratch project if earlier steps changed it. */
|
|
45
|
+
detectAfterEdits?: boolean;
|
|
44
46
|
/** Tells whether the project uses what this codemod migrates. It must be cheap and must not throw for a project that does not use it. */
|
|
45
47
|
detect: (context: CodemodContext) => Promise<Detection | undefined>;
|
|
46
48
|
/** Plans the edits. It must not write files; the runner writes them. */
|
|
@@ -58,8 +60,9 @@ export declare const codemods: readonly Codemod[];
|
|
|
58
60
|
* each one sees the edits of the ones before it. Config codemods run first: `vitehub-options` moves top-level feature
|
|
59
61
|
* keys into `vitehub()`, where `agent-surface` then renames the Agent driver keys. `define-forms` moves the Database
|
|
60
62
|
* files before the import codemods rewrite them. `root-accessors` moves `#vitehub/env/server` to `vite-hub/env` before
|
|
61
|
-
* `one-entry-imports` joins the `vite-hub/env/*` imports with it.
|
|
62
|
-
*
|
|
63
|
+
* `one-entry-imports` joins the `vite-hub/env/*` imports with it. `queue-durations` and `result-tuples` run after
|
|
64
|
+
* `queue-workflow-verbs`, so they also read the calls that `queue-workflow-verbs` renamed. The codemods that move an
|
|
65
|
+
* app from another module, such as NuxtHub, are not upgrades, so only `npx @vite-hub/codemods` runs them.
|
|
63
66
|
*/
|
|
64
67
|
export declare const upgradeCodemods: readonly Codemod[];
|
|
65
68
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as findCodemod, c as runCodemod, d as isCodemodError, i as runMigration, l as codemods, n as detectCodemods, o as formatDiff, r as formatMigrationReport, s as formatReport, t as runCli, u as upgradeCodemods } from "./cli-main-
|
|
1
|
+
import { a as findCodemod, c as runCodemod, d as isCodemodError, i as runMigration, l as codemods, n as detectCodemods, o as formatDiff, r as formatMigrationReport, s as formatReport, t as runCli, u as upgradeCodemods } from "./cli-main-DfzMGFup.js";
|
|
2
2
|
export { codemods, detectCodemods, findCodemod, formatDiff, formatMigrationReport, formatReport, isCodemodError, runCli, runCodemod, runMigration, upgradeCodemods };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/codemods",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Codemods that move applications to ViteHub.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codemod",
|
|
@@ -47,13 +47,14 @@
|
|
|
47
47
|
"scule": "^1.3.0",
|
|
48
48
|
"semver": "^7.8.5",
|
|
49
49
|
"tinyglobby": "^0.2.17",
|
|
50
|
-
"valibot": "^1.5.0"
|
|
50
|
+
"valibot": "^1.5.0",
|
|
51
|
+
"yaml": "^2.9.1"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@babel/types": "^7.29.8",
|
|
54
55
|
"@types/node": "^24.19.1",
|
|
55
56
|
"@types/semver": "^7.8.0",
|
|
56
|
-
"@vite-hub/env": "0.
|
|
57
|
+
"@vite-hub/env": "0.4.1",
|
|
57
58
|
"@vite-hub/internal": "0.0.1",
|
|
58
59
|
"publint": "^0.3.25",
|
|
59
60
|
"typescript": "^6.0.3",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"zod": "^4.6.7"
|
|
64
65
|
},
|
|
65
66
|
"engines": {
|
|
66
|
-
"node": ">=
|
|
67
|
+
"node": ">=24.15.0"
|
|
67
68
|
},
|
|
68
69
|
"scripts": {
|
|
69
70
|
"build": "vp pack",
|