@storybook/codemod 7.1.1 → 7.2.0-canary-23572-1690275421-726e1551.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/codemod",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.2.0-canary-23572-1690275421-726e1551.0",
|
4
4
|
"description": "A collection of codemod scripts written with JSCodeshift",
|
5
5
|
"keywords": [
|
6
6
|
"storybook"
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"main": "dist/index.js",
|
42
42
|
"types": "dist/index.d.ts",
|
43
43
|
"scripts": {
|
44
|
-
"check": "../../../scripts/
|
44
|
+
"check": "../../../scripts/prepare/check.ts",
|
45
45
|
"prep": "../../../scripts/prepare/bundle.ts"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
@@ -49,9 +49,9 @@
|
|
49
49
|
"@babel/preset-env": "^7.22.9",
|
50
50
|
"@babel/types": "^7.22.5",
|
51
51
|
"@storybook/csf": "^0.1.0",
|
52
|
-
"@storybook/csf-tools": "7.
|
53
|
-
"@storybook/node-logger": "7.
|
54
|
-
"@storybook/types": "7.
|
52
|
+
"@storybook/csf-tools": "7.2.0-canary-23572-1690275421-726e1551.0",
|
53
|
+
"@storybook/node-logger": "7.2.0-canary-23572-1690275421-726e1551.0",
|
54
|
+
"@storybook/types": "7.2.0-canary-23572-1690275421-726e1551.0",
|
55
55
|
"@types/cross-spawn": "^6.0.2",
|
56
56
|
"cross-spawn": "^7.0.3",
|
57
57
|
"globby": "^11.0.2",
|
@@ -82,7 +82,7 @@
|
|
82
82
|
},
|
83
83
|
"bundler": {
|
84
84
|
"entries": [
|
85
|
-
"./src/index.
|
85
|
+
"./src/index.ts",
|
86
86
|
"./src/transforms/add-component-parameters.js",
|
87
87
|
"./src/transforms/csf-2-to-3.ts",
|
88
88
|
"./src/transforms/csf-hoist-story-annotations.js",
|
@@ -25,13 +25,13 @@ export function listCodemods() {
|
|
25
25
|
|
26
26
|
const renameAsync = promisify(fs.rename);
|
27
27
|
|
28
|
-
async function renameFile(file, from, to, { logger }) {
|
28
|
+
async function renameFile(file: any, from: any, to: any, { logger }: any) {
|
29
29
|
const newFile = file.replace(from, to);
|
30
30
|
logger.log(`Rename: ${file} ${newFile}`);
|
31
31
|
return renameAsync(file, newFile);
|
32
32
|
}
|
33
33
|
|
34
|
-
export async function runCodemod(codemod, { glob, logger, dryRun, rename, parser }) {
|
34
|
+
export async function runCodemod(codemod: any, { glob, logger, dryRun, rename, parser }: any) {
|
35
35
|
const codemods = listCodemods();
|
36
36
|
if (!codemods.includes(codemod)) {
|
37
37
|
throw new Error(`Unknown codemod ${codemod}. Run --list for options.`);
|