@nx/storybook 20.0.4 → 20.0.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/storybook",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.6",
|
|
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,13 +33,13 @@
|
|
|
33
33
|
"migrations": "./migrations.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@nx/devkit": "20.0.
|
|
36
|
+
"@nx/devkit": "20.0.6",
|
|
37
37
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
38
38
|
"semver": "^7.5.3",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/cypress": "20.0.
|
|
41
|
-
"@nx/js": "20.0.
|
|
42
|
-
"@nx/eslint": "20.0.
|
|
40
|
+
"@nx/cypress": "20.0.6",
|
|
41
|
+
"@nx/js": "20.0.6",
|
|
42
|
+
"@nx/eslint": "20.0.6"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
@@ -5,7 +5,8 @@ exports.callAutomigrate = callAutomigrate;
|
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const child_process_1 = require("child_process");
|
|
7
7
|
function callUpgrade(schema) {
|
|
8
|
-
const
|
|
8
|
+
const packageManager = (0, devkit_1.detectPackageManager)();
|
|
9
|
+
const pm = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
9
10
|
try {
|
|
10
11
|
devkit_1.output.log({
|
|
11
12
|
title: `Calling sb upgrade`,
|
|
@@ -15,7 +16,7 @@ function callUpgrade(schema) {
|
|
|
15
16
|
],
|
|
16
17
|
color: 'blue',
|
|
17
18
|
});
|
|
18
|
-
(0, child_process_1.execSync)(`${pm.dlx} storybook@latest upgrade ${schema.autoAcceptAllPrompts ? '--yes' : ''}`, {
|
|
19
|
+
(0, child_process_1.execSync)(`${pm.dlx} ${packageManager === 'yarn' ? 'storybook' : 'storybook@latest'} upgrade ${schema.autoAcceptAllPrompts ? '--yes' : ''}`, {
|
|
19
20
|
stdio: [0, 1, 2],
|
|
20
21
|
windowsHide: false,
|
|
21
22
|
});
|
|
@@ -34,7 +35,7 @@ function callUpgrade(schema) {
|
|
|
34
35
|
bodyLines: [
|
|
35
36
|
`🚨 The Storybook CLI failed to upgrade your @storybook/* packages to the latest version.`,
|
|
36
37
|
`Please try running the sb upgrade command manually:`,
|
|
37
|
-
`${pm.exec} storybook@latest upgrade`,
|
|
38
|
+
`${pm.exec} ${packageManager === 'yarn' ? 'storybook' : 'storybook@latest'} upgrade`,
|
|
38
39
|
],
|
|
39
40
|
color: 'red',
|
|
40
41
|
});
|
|
@@ -56,8 +57,9 @@ function callAutomigrate(allStorybookProjects, schema) {
|
|
|
56
57
|
failedProjects: {},
|
|
57
58
|
};
|
|
58
59
|
Object.entries(allStorybookProjects).forEach(([projectName, storybookProjectInfo]) => {
|
|
59
|
-
const
|
|
60
|
-
const
|
|
60
|
+
const packageManager = (0, devkit_1.detectPackageManager)();
|
|
61
|
+
const pm = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
62
|
+
const commandToRun = `${pm.dlx} ${packageManager === 'yarn' ? 'storybook' : 'storybook@latest'} automigrate --config-dir ${storybookProjectInfo.configDir}`;
|
|
61
63
|
try {
|
|
62
64
|
devkit_1.output.log({
|
|
63
65
|
title: `Calling sb automigrate for ${projectName}`,
|
|
@@ -10,19 +10,20 @@ const fileutils_1 = require("nx/src/utils/fileutils");
|
|
|
10
10
|
const fs_1 = require("fs");
|
|
11
11
|
const path_1 = require("path");
|
|
12
12
|
function onlyShowGuide(storybookProjects) {
|
|
13
|
-
const
|
|
13
|
+
const packageManager = (0, devkit_1.detectPackageManager)();
|
|
14
|
+
const pm = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
14
15
|
devkit_1.output.log({
|
|
15
16
|
title: 'Storybook 8 Migration Guide',
|
|
16
17
|
bodyLines: [
|
|
17
18
|
`You can run the following commands manually to upgrade your Storybook projects to Storybook 8:`,
|
|
18
19
|
``,
|
|
19
20
|
`1. Call the Storybook upgrade script:`,
|
|
20
|
-
`${pm.exec} storybook@latest upgrade`,
|
|
21
|
+
`${pm.exec} ${packageManager === 'yarn' ? 'storybook' : 'storybook@latest'} upgrade`,
|
|
21
22
|
``,
|
|
22
23
|
`2. Call the Storybook automigrate scripts:`,
|
|
23
24
|
`Run the following commands for each Storybook project:`,
|
|
24
25
|
...Object.entries(storybookProjects).map(([_projectName, storybookProjectInfo]) => {
|
|
25
|
-
return `${pm.exec} storybook@latest automigrate --config-dir ${storybookProjectInfo.configDir}`;
|
|
26
|
+
return `${pm.exec} ${packageManager === 'yarn' ? 'storybook' : 'storybook@latest'} automigrate --config-dir ${storybookProjectInfo.configDir}`;
|
|
26
27
|
}),
|
|
27
28
|
``,
|
|
28
29
|
],
|
package/src/plugins/plugin.js
CHANGED
|
@@ -101,7 +101,7 @@ function buildTarget(namedInputs, outputs, projectRoot, frameworkIsAngular, proj
|
|
|
101
101
|
isStorybookTestRunnerInstalled()
|
|
102
102
|
? '@storybook/test-runner'
|
|
103
103
|
: undefined,
|
|
104
|
-
],
|
|
104
|
+
].filter(Boolean),
|
|
105
105
|
},
|
|
106
106
|
],
|
|
107
107
|
};
|
|
@@ -122,7 +122,7 @@ function buildTarget(namedInputs, outputs, projectRoot, frameworkIsAngular, proj
|
|
|
122
122
|
isStorybookTestRunnerInstalled()
|
|
123
123
|
? '@storybook/test-runner'
|
|
124
124
|
: undefined,
|
|
125
|
-
],
|
|
125
|
+
].filter(Boolean),
|
|
126
126
|
},
|
|
127
127
|
],
|
|
128
128
|
};
|
|
@@ -153,12 +153,7 @@ function testTarget(projectRoot) {
|
|
|
153
153
|
options: { cwd: projectRoot },
|
|
154
154
|
inputs: [
|
|
155
155
|
{
|
|
156
|
-
externalDependencies: [
|
|
157
|
-
'storybook',
|
|
158
|
-
isStorybookTestRunnerInstalled()
|
|
159
|
-
? '@storybook/test-runner'
|
|
160
|
-
: undefined,
|
|
161
|
-
],
|
|
156
|
+
externalDependencies: ['storybook', '@storybook/test-runner'],
|
|
162
157
|
},
|
|
163
158
|
],
|
|
164
159
|
};
|