@nx/storybook 16.6.0-beta.7 → 16.6.0

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": "16.6.0-beta.7",
3
+ "version": "16.6.0",
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": {
@@ -30,12 +30,12 @@
30
30
  "migrations": "./migrations.json"
31
31
  },
32
32
  "dependencies": {
33
- "@nrwl/storybook": "16.6.0-beta.7",
34
- "@nx/cypress": "16.6.0-beta.7",
35
- "@nx/devkit": "16.6.0-beta.7",
36
- "@nx/js": "16.6.0-beta.7",
37
- "@nx/linter": "16.6.0-beta.7",
38
- "@nx/workspace": "16.6.0-beta.7",
33
+ "@nrwl/storybook": "16.6.0",
34
+ "@nx/cypress": "16.6.0",
35
+ "@nx/devkit": "16.6.0",
36
+ "@nx/js": "16.6.0",
37
+ "@nx/linter": "16.6.0",
38
+ "@nx/workspace": "16.6.0",
39
39
  "@phenomnomnominal/tsquery": "~5.0.1",
40
40
  "dotenv": "~10.0.0",
41
41
  "semver": "7.5.3",
@@ -45,5 +45,5 @@
45
45
  "access": "public"
46
46
  },
47
47
  "types": "./index.d.ts",
48
- "gitHead": "6afe0a7c20059d6cdc8e455758a17886f933a0dc"
48
+ "gitHead": "d02a8dbf06c85de78c0c76f64a17f10ae8085739"
49
49
  }
@@ -4,6 +4,7 @@ exports.callAutomigrate = exports.callUpgrade = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const child_process_1 = require("child_process");
6
6
  function callUpgrade(schema) {
7
+ const pm = (0, devkit_1.getPackageManagerCommand)();
7
8
  try {
8
9
  devkit_1.output.log({
9
10
  title: `Calling sb upgrade`,
@@ -13,7 +14,7 @@ function callUpgrade(schema) {
13
14
  ],
14
15
  color: 'blue',
15
16
  });
16
- (0, child_process_1.execSync)(`npx storybook@latest upgrade ${schema.autoAcceptAllPrompts ? '--yes' : ''}`, {
17
+ (0, child_process_1.execSync)(`${pm.exec} storybook@latest upgrade ${schema.autoAcceptAllPrompts ? '--yes' : ''}`, {
17
18
  stdio: [0, 1, 2],
18
19
  });
19
20
  devkit_1.output.log({
@@ -31,7 +32,7 @@ function callUpgrade(schema) {
31
32
  bodyLines: [
32
33
  `🚨 The Storybook CLI failed to upgrade your @storybook/* packages to the latest version.`,
33
34
  `Please try running the sb upgrade command manually:`,
34
- `npx storybook@latest upgrade`,
35
+ `${pm.exec} storybook@latest upgrade`,
35
36
  ],
36
37
  color: 'red',
37
38
  });
@@ -54,7 +55,8 @@ function callAutomigrate(allStorybookProjects, schema) {
54
55
  failedProjects: {},
55
56
  };
56
57
  Object.entries(allStorybookProjects).forEach(([projectName, storybookProjectInfo]) => {
57
- const commandToRun = `npx storybook@latest automigrate --config-dir ${storybookProjectInfo.configDir} --renderer ${storybookProjectInfo.uiFramework}`;
58
+ const pm = (0, devkit_1.getPackageManagerCommand)();
59
+ const commandToRun = `${pm.exec} storybook@latest automigrate --config-dir ${storybookProjectInfo.configDir} --renderer ${storybookProjectInfo.uiFramework}`;
58
60
  try {
59
61
  devkit_1.output.log({
60
62
  title: `Calling sb automigrate for ${projectName}`,
@@ -10,13 +10,14 @@ 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 pm = (0, devkit_1.getPackageManagerCommand)();
13
14
  devkit_1.output.log({
14
15
  title: 'Storybook 7 Migration Guide',
15
16
  bodyLines: [
16
17
  `You can run the following commands manually to upgrade your Storybook projects to Storybook 7:`,
17
18
  ``,
18
19
  `1. Call the Storybook upgrade script:`,
19
- `npx storybook@latest upgrade`,
20
+ `${pm.exec} storybook@latest upgrade`,
20
21
  ``,
21
22
  `2. Call the Nx generator to prepare your files for migration:`,
22
23
  `nx g @nx/storybook:migrate-7 --onlyPrepare`,
@@ -24,7 +25,7 @@ function onlyShowGuide(storybookProjects) {
24
25
  `3. Call the Storybook automigrate scripts:`,
25
26
  `Run the following commands for each Storybook project:`,
26
27
  ...Object.entries(storybookProjects).map(([_projectName, storybookProjectInfo]) => {
27
- return `npx storybook@latest automigrate --config-dir ${storybookProjectInfo.configDir} --renderer ${storybookProjectInfo.uiFramework}`;
28
+ return `${pm.exec} storybook@latest automigrate --config-dir ${storybookProjectInfo.configDir} --renderer ${storybookProjectInfo.uiFramework}`;
28
29
  }),
29
30
  ``,
30
31
  `4. Call the Nx generator to finish the migration:`,