@nx/storybook 22.1.1 → 22.1.3
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/migrations.json +1 -1
- package/package.json +6 -6
- package/src/generators/migrate-10/migrate-10.d.ts.map +1 -1
- package/src/generators/migrate-10/migrate-10.js +10 -0
- package/src/generators/migrate-10/schema.json +2 -1
- package/src/migrations/update-22-1-0/migrate-to-storybook-10.d.ts.map +1 -1
- package/src/migrations/update-22-1-0/migrate-to-storybook-10.js +0 -8
- /package/src/{migrations/update-22-1-0 → generators/migrate-10}/files/ai-instructions-for-cjs-esm.md +0 -0
package/migrations.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"cli": "nx",
|
|
17
17
|
"version": "22.1.0-beta.8",
|
|
18
18
|
"requires": {
|
|
19
|
-
"storybook": ">=
|
|
19
|
+
"storybook": ">=10.0.0"
|
|
20
20
|
},
|
|
21
21
|
"description": "Update workspace to use Storybook v10",
|
|
22
22
|
"implementation": "./src/migrations/update-22-1-0/migrate-to-storybook-10"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/storybook",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Storybook contains executors and generators for allowing your workspace to use the powerful Storybook integration testing & documenting capabilities.",
|
|
6
6
|
"repository": {
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"migrations": "./migrations.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@nx/devkit": "22.1.
|
|
36
|
+
"@nx/devkit": "22.1.3",
|
|
37
37
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
38
38
|
"semver": "^7.6.3",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/cypress": "22.1.
|
|
41
|
-
"@nx/js": "22.1.
|
|
42
|
-
"@nx/eslint": "22.1.
|
|
40
|
+
"@nx/cypress": "22.1.3",
|
|
41
|
+
"@nx/js": "22.1.3",
|
|
42
|
+
"@nx/eslint": "22.1.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "22.1.
|
|
45
|
+
"nx": "22.1.3",
|
|
46
46
|
"storybook": "9.0.6"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-10.d.ts","sourceRoot":"","sources":["../../../../../../packages/storybook/src/generators/migrate-10/migrate-10.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"migrate-10.d.ts","sourceRoot":"","sources":["../../../../../../packages/storybook/src/generators/migrate-10/migrate-10.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,IAAI,EAAE,MAAM,YAAY,CAAC;AAIjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,iBA+BlE;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -4,6 +4,8 @@ exports.migrate10Generator = migrate10Generator;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const output_1 = require("nx/src/utils/output");
|
|
6
6
|
const calling_storybook_cli_1 = require("./calling-storybook-cli");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const fs_1 = require("fs");
|
|
7
9
|
async function migrate10Generator(tree, schema) {
|
|
8
10
|
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
9
11
|
if (!(0, calling_storybook_cli_1.checkStorybookInstalled)(packageJson)) {
|
|
@@ -17,6 +19,14 @@ async function migrate10Generator(tree, schema) {
|
|
|
17
19
|
return;
|
|
18
20
|
}
|
|
19
21
|
(0, calling_storybook_cli_1.callUpgrade)(schema);
|
|
22
|
+
const pathToAiInstructions = (0, path_1.join)(__dirname, 'files', 'ai-instructions-for-cjs-esm.md');
|
|
23
|
+
if (!(0, fs_1.existsSync)(pathToAiInstructions)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const contents = (0, fs_1.readFileSync)(pathToAiInstructions);
|
|
27
|
+
tree.write('ai-migrations/MIGRATE_STORYBOOK_10.md', contents);
|
|
28
|
+
devkit_1.logger.log(`Storybook 10 requires Storybook Configs to use ESM.
|
|
29
|
+
We created 'ai-migrations/MIGRATE_STORYBOOK_10.md' with instructions for an AI Agent to convert CJS Storybook Configs to ESM in your workspace.`);
|
|
20
30
|
await (0, devkit_1.formatFiles)(tree);
|
|
21
31
|
}
|
|
22
32
|
exports.default = migrate10Generator;
|
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
"description": "Directory(ies) where to load Storybook configurations from. Use this if you want to customize the Storybook projects you'd like to migrate.",
|
|
16
16
|
"default": []
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"examplesFile": "../../../docs/migrate-10-generator-examples.md"
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-to-storybook-10.d.ts","sourceRoot":"","sources":["../../../../../../packages/storybook/src/migrations/update-22-1-0/migrate-to-storybook-10.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlC,wBAA8B,oBAAoB,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"migrate-to-storybook-10.d.ts","sourceRoot":"","sources":["../../../../../../packages/storybook/src/migrations/update-22-1-0/migrate-to-storybook-10.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlC,wBAA8B,oBAAoB,CAAC,IAAI,EAAE,IAAI,qBAkB5D"}
|
|
@@ -3,8 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = migrateToStorybook10;
|
|
4
4
|
const output_1 = require("nx/src/utils/output");
|
|
5
5
|
const migrate_10_1 = require("../../generators/migrate-10/migrate-10");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
const fs_1 = require("fs");
|
|
8
6
|
async function migrateToStorybook10(tree) {
|
|
9
7
|
output_1.output.log({
|
|
10
8
|
title: 'Migrating Storybook to v10',
|
|
@@ -18,12 +16,6 @@ async function migrateToStorybook10(tree) {
|
|
|
18
16
|
await (0, migrate_10_1.default)(tree, {
|
|
19
17
|
autoAcceptAllPrompts: true,
|
|
20
18
|
});
|
|
21
|
-
const pathToAiInstructions = (0, path_1.join)(__dirname, 'files', 'ai-instructions-for-cjs-esm.md');
|
|
22
|
-
if (!(0, fs_1.existsSync)(pathToAiInstructions)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const contents = (0, fs_1.readFileSync)(pathToAiInstructions);
|
|
26
|
-
tree.write('ai-migrations/MIGRATE_STORYBOOK_10.md', contents);
|
|
27
19
|
return [
|
|
28
20
|
`Storybook 10 requires Storybook Configs to use ESM.`,
|
|
29
21
|
`We created 'ai-migrations/MIGRATE_STORYBOOK_10.md' with instructions for an AI Agent to convert CJS Storybook Configs to ESM in your workspace.`,
|
/package/src/{migrations/update-22-1-0 → generators/migrate-10}/files/ai-instructions-for-cjs-esm.md
RENAMED
|
File without changes
|