@storybook/codemod 10.0.0-beta.1 → 10.0.0-beta.11
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/dist/_node-chunks/chunk-OK7B2QLM.js +17 -0
- package/dist/_node-chunks/{chunk-U4O2JMLB.js → chunk-ZZWRQC6H.js} +7 -7
- package/dist/index.js +9 -9
- package/dist/transforms/csf-2-to-3.js +8 -8
- package/dist/transforms/find-implicit-spies.js +7 -7
- package/dist/transforms/upgrade-deprecated-types.js +8 -8
- package/dist/transforms/upgrade-hierarchy-separators.js +7 -7
- package/package.json +4 -4
- package/dist/_node-chunks/chunk-76V4KDA3.js +0 -17
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
__name
|
|
17
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OK7B2QLM.js";
|
|
15
15
|
|
|
16
16
|
// src/transforms/upgrade-deprecated-types.ts
|
|
17
17
|
import { core as babel, types as t } from "storybook/internal/babel";
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-OK7B2QLM.js";
|
|
15
15
|
|
|
16
16
|
// src/index.ts
|
|
17
17
|
import { readdirSync } from "node:fs";
|
|
@@ -19,6 +19,7 @@ import { rename as renameAsync } from "node:fs/promises";
|
|
|
19
19
|
import { extname, join } from "node:path";
|
|
20
20
|
import { resolvePackageDir } from "storybook/internal/common";
|
|
21
21
|
import { sync as spawnSync } from "cross-spawn";
|
|
22
|
+
import { glob as tinyglobby } from "tinyglobby";
|
|
22
23
|
|
|
23
24
|
// src/lib/utils.ts
|
|
24
25
|
import { camelCase, upperFirst } from "es-toolkit/compat";
|
|
@@ -74,8 +75,7 @@ async function runCodemod(codemod, {
|
|
|
74
75
|
inferredParser = extension;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
const
|
|
78
|
-
const files = await globby([glob, "!**/node_modules", "!**/dist"]);
|
|
78
|
+
const files = await tinyglobby([glob, "!**/node_modules", "!**/dist"]);
|
|
79
79
|
const extensions = new Set(files.map((file) => extname(file).slice(1)));
|
|
80
80
|
const commaSeparatedExtensions = Array.from(extensions).join(",");
|
|
81
81
|
logger.log(`=> Applying ${codemod}: ${files.length} files`);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
upgradeDeprecatedTypes
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-ZZWRQC6H.js";
|
|
15
15
|
import {
|
|
16
16
|
__name
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-OK7B2QLM.js";
|
|
18
18
|
|
|
19
19
|
// src/transforms/csf-2-to-3.ts
|
|
20
20
|
import { core as babel, types as t } from "storybook/internal/babel";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-OK7B2QLM.js";
|
|
15
15
|
|
|
16
16
|
// src/transforms/find-implicit-spies.ts
|
|
17
17
|
import { core as babel, types as t } from "storybook/internal/babel";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
parser,
|
|
14
14
|
transform,
|
|
15
15
|
upgradeDeprecatedTypes
|
|
16
|
-
} from "../_node-chunks/chunk-
|
|
17
|
-
import "../_node-chunks/chunk-
|
|
16
|
+
} from "../_node-chunks/chunk-ZZWRQC6H.js";
|
|
17
|
+
import "../_node-chunks/chunk-OK7B2QLM.js";
|
|
18
18
|
export {
|
|
19
19
|
transform as default,
|
|
20
20
|
parser,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_amhgh3x9wb from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_amhgh3x9wb from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_amhgh3x9wb from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_amhgh3x9wb.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_amhgh3x9wb.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_amhgh3x9wb.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-OK7B2QLM.js";
|
|
15
15
|
|
|
16
16
|
// src/transforms/upgrade-hierarchy-separators.js
|
|
17
17
|
function upgradeSeparator(path) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/codemod",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.11",
|
|
4
4
|
"description": "A collection of codemod scripts written with JSCodeshift",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@types/cross-spawn": "^6.0.6",
|
|
48
48
|
"cross-spawn": "^7.0.6",
|
|
49
49
|
"es-toolkit": "^1.36.0",
|
|
50
|
-
"globby": "^14.0.1",
|
|
51
50
|
"jscodeshift": "^0.15.1",
|
|
52
51
|
"prettier": "^3.5.3",
|
|
53
|
-
"storybook": "10.0.0-beta.
|
|
54
|
-
"tiny-invariant": "^1.3.1"
|
|
52
|
+
"storybook": "10.0.0-beta.11",
|
|
53
|
+
"tiny-invariant": "^1.3.1",
|
|
54
|
+
"tinyglobby": "^0.2.13"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/jscodeshift": "^0.11.10",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_3h2jfrewunh from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_3h2jfrewunh from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_3h2jfrewunh from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_3h2jfrewunh.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_3h2jfrewunh.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_3h2jfrewunh.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
__name
|
|
17
|
-
};
|