@storybook/cli 7.0.0-alpha.2 → 7.0.0-alpha.5

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.
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.npm7 = void 0;
7
+
8
+ require("core-js/modules/es.promise.js");
9
+
10
+ var _chalk = _interopRequireDefault(require("chalk"));
11
+
12
+ var _tsDedent = _interopRequireDefault(require("ts-dedent"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ /**
17
+ * Is the user using npm7+? If so create a .npmrc with legacy-peer-deps=true
18
+ */
19
+ const npm7 = {
20
+ id: 'npm7',
21
+
22
+ async check({
23
+ packageManager
24
+ }) {
25
+ if (packageManager.type !== 'npm') return null;
26
+ const npmVersion = packageManager.getNpmVersion();
27
+
28
+ if (packageManager.needsLegacyPeerDeps(npmVersion)) {
29
+ return {
30
+ npmVersion
31
+ };
32
+ }
33
+
34
+ return null;
35
+ },
36
+
37
+ prompt({
38
+ npmVersion
39
+ }) {
40
+ const npmFormatted = _chalk.default.cyan(`npm ${npmVersion}`);
41
+
42
+ return (0, _tsDedent.default)`
43
+ We've detected you are running ${npmFormatted} which has peer dependency semantics which Storybook is incompatible with.
44
+
45
+ In order to work with Storybook's package structure, you'll need to run \`npm\` with the
46
+ \`--legacy-peer-deps=true\` flag. We can generate an \`.npmrc\` which will do that automatically.
47
+
48
+ More info: ${_chalk.default.yellow('https://github.com/storybookjs/storybook/issues/18298')}
49
+ `;
50
+ },
51
+
52
+ async run({
53
+ packageManager
54
+ }) {
55
+ packageManager.setLegacyPeerDeps();
56
+ }
57
+
58
+ };
59
+ exports.npm7 = npm7;
@@ -146,7 +146,7 @@ async function baseGenerator(packageManager, npmOptions, {
146
146
  `);
147
147
  }
148
148
 
149
- const packages = ['sb', ...frameworkPackages, ...addonPackages, ...extraPackages, ...yarn2ExtraPackages].filter(Boolean).filter(packageToInstall => !installedDependencies.has((0, _jsPackageManager.getPackageDetails)(packageToInstall)[0]));
149
+ const packages = ['storybook', ...frameworkPackages, ...addonPackages, ...extraPackages, ...yarn2ExtraPackages].filter(Boolean).filter(packageToInstall => !installedDependencies.has((0, _jsPackageManager.getPackageDetails)(packageToInstall)[0]));
150
150
  const versionedPackages = await packageManager.getVersionedPackages(packages);
151
151
  await _fsExtra.default.ensureDir('./.storybook');
152
152
  await (0, _configure.configureMain)(Object.assign({
@@ -221,8 +221,8 @@ class JsPackageManager {
221
221
  var _options$port;
222
222
 
223
223
  const sbPort = (_options$port = options === null || options === void 0 ? void 0 : options.port) !== null && _options$port !== void 0 ? _options$port : 6006;
224
- const storybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx sb dev -p ${sbPort} -s ${options.staticFolder}` : `npx sb dev -p ${sbPort}`;
225
- const buildStorybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx sb build -s ${options.staticFolder}` : `npx sb build`;
224
+ const storybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx storybook dev -p ${sbPort} -s ${options.staticFolder}` : `npx storybook dev -p ${sbPort}`;
225
+ const buildStorybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx storybook build -s ${options.staticFolder}` : `npx storybook build`;
226
226
  const preCommand = options !== null && options !== void 0 && options.preCommand ? this.getRunCommand(options.preCommand) : undefined;
227
227
  this.addScripts({
228
228
  storybook: [preCommand, storybookCmd].filter(Boolean).join(' && '),
@@ -30,10 +30,25 @@ class NPMProxy extends _JsPackageManager.JsPackageManager {
30
30
  return `npm run ${command}`;
31
31
  }
32
32
 
33
+ getNpmVersion() {
34
+ return this.executeCommand('npm', ['--version']);
35
+ }
36
+
37
+ hasLegacyPeerDeps() {
38
+ return this.executeCommand('npm', ['config', 'get', 'legacy-peer-deps', '--location=project']) === 'true';
39
+ }
40
+
41
+ setLegacyPeerDeps() {
42
+ this.executeCommand('npm', ['config', 'set', 'legacy-peer-deps=true', '--location=project']);
43
+ }
44
+
45
+ needsLegacyPeerDeps(version) {
46
+ return _semver.default.gte(version, '7.0.0') && !this.hasLegacyPeerDeps();
47
+ }
48
+
33
49
  getInstallArgs() {
34
50
  if (!this.installArgs) {
35
- const version = this.executeCommand('npm', ['--version']);
36
- this.installArgs = _semver.default.gte(version, '7.0.0') ? ['install', '--legacy-peer-deps'] : ['install'];
51
+ this.installArgs = this.needsLegacyPeerDeps(this.getNpmVersion()) ? ['install', '--legacy-peer-deps'] : ['install'];
37
52
  }
38
53
 
39
54
  return this.installArgs;
@@ -6,78 +6,78 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  // auto generated file, do not edit
8
8
  var _default = {
9
- '@storybook/addon-a11y': '7.0.0-alpha.2',
10
- '@storybook/addon-actions': '7.0.0-alpha.2',
11
- '@storybook/addon-backgrounds': '7.0.0-alpha.2',
12
- '@storybook/addon-controls': '7.0.0-alpha.2',
13
- '@storybook/addon-docs': '7.0.0-alpha.2',
14
- '@storybook/addon-essentials': '7.0.0-alpha.2',
15
- '@storybook/addon-interactions': '7.0.0-alpha.2',
16
- '@storybook/addon-jest': '7.0.0-alpha.2',
17
- '@storybook/addon-links': '7.0.0-alpha.2',
18
- '@storybook/addon-measure': '7.0.0-alpha.2',
19
- '@storybook/addon-outline': '7.0.0-alpha.2',
20
- '@storybook/addon-storyshots': '7.0.0-alpha.2',
21
- '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.2',
22
- '@storybook/addon-storysource': '7.0.0-alpha.2',
23
- '@storybook/addon-toolbars': '7.0.0-alpha.2',
24
- '@storybook/addon-viewport': '7.0.0-alpha.2',
25
- '@storybook/addons': '7.0.0-alpha.2',
26
- '@storybook/angular': '7.0.0-alpha.2',
27
- '@storybook/api': '7.0.0-alpha.2',
28
- '@storybook/builder-webpack5': '7.0.0-alpha.2',
29
- '@storybook/channel-postmessage': '7.0.0-alpha.2',
30
- '@storybook/channel-websocket': '7.0.0-alpha.2',
31
- '@storybook/channels': '7.0.0-alpha.2',
32
- '@storybook/cli': '7.0.0-alpha.2',
33
- '@storybook/client-api': '7.0.0-alpha.2',
34
- '@storybook/client-logger': '7.0.0-alpha.2',
35
- '@storybook/codemod': '7.0.0-alpha.2',
36
- '@storybook/components': '7.0.0-alpha.2',
37
- '@storybook/core-client': '7.0.0-alpha.2',
38
- '@storybook/core-common': '7.0.0-alpha.2',
39
- '@storybook/core-events': '7.0.0-alpha.2',
40
- '@storybook/core-server': '7.0.0-alpha.2',
41
- '@storybook/core-webpack': '7.0.0-alpha.2',
42
- '@storybook/csf-tools': '7.0.0-alpha.2',
43
- '@storybook/docs-tools': '7.0.0-alpha.2',
44
- '@storybook/ember': '7.0.0-alpha.2',
45
- '@storybook/html': '7.0.0-alpha.2',
46
- '@storybook/html-webpack5': '7.0.0-alpha.2',
47
- '@storybook/instrumenter': '7.0.0-alpha.2',
48
- '@storybook/manager-webpack5': '7.0.0-alpha.2',
49
- '@storybook/node-logger': '7.0.0-alpha.2',
50
- '@storybook/postinstall': '7.0.0-alpha.2',
51
- '@storybook/preact': '7.0.0-alpha.2',
52
- '@storybook/preact-webpack5': '7.0.0-alpha.2',
53
- '@storybook/preset-html-webpack': '7.0.0-alpha.2',
54
- '@storybook/preset-preact-webpack': '7.0.0-alpha.2',
55
- '@storybook/preset-react-webpack': '7.0.0-alpha.2',
56
- '@storybook/preset-server-webpack': '7.0.0-alpha.2',
57
- '@storybook/preset-svelte-webpack': '7.0.0-alpha.2',
58
- '@storybook/preset-vue-webpack': '7.0.0-alpha.2',
59
- '@storybook/preset-vue3-webpack': '7.0.0-alpha.2',
60
- '@storybook/preset-web-components-webpack': '7.0.0-alpha.2',
61
- '@storybook/preview-web': '7.0.0-alpha.2',
62
- '@storybook/react': '7.0.0-alpha.2',
63
- '@storybook/react-webpack5': '7.0.0-alpha.2',
64
- '@storybook/router': '7.0.0-alpha.2',
65
- '@storybook/server': '7.0.0-alpha.2',
66
- '@storybook/server-webpack5': '7.0.0-alpha.2',
67
- '@storybook/source-loader': '7.0.0-alpha.2',
68
- '@storybook/store': '7.0.0-alpha.2',
69
- '@storybook/svelte': '7.0.0-alpha.2',
70
- '@storybook/svelte-webpack5': '7.0.0-alpha.2',
71
- '@storybook/telemetry': '7.0.0-alpha.2',
72
- '@storybook/theming': '7.0.0-alpha.2',
73
- '@storybook/ui': '7.0.0-alpha.2',
74
- '@storybook/vue': '7.0.0-alpha.2',
75
- '@storybook/vue-webpack5': '7.0.0-alpha.2',
76
- '@storybook/vue3': '7.0.0-alpha.2',
77
- '@storybook/vue3-webpack5': '7.0.0-alpha.2',
78
- '@storybook/web-components': '7.0.0-alpha.2',
79
- '@storybook/web-components-webpack5': '7.0.0-alpha.2',
80
- sb: '7.0.0-alpha.2',
81
- storybook: '7.0.0-alpha.2'
9
+ '@storybook/addon-a11y': '7.0.0-alpha.5',
10
+ '@storybook/addon-actions': '7.0.0-alpha.5',
11
+ '@storybook/addon-backgrounds': '7.0.0-alpha.5',
12
+ '@storybook/addon-controls': '7.0.0-alpha.5',
13
+ '@storybook/addon-docs': '7.0.0-alpha.5',
14
+ '@storybook/addon-essentials': '7.0.0-alpha.5',
15
+ '@storybook/addon-interactions': '7.0.0-alpha.5',
16
+ '@storybook/addon-jest': '7.0.0-alpha.5',
17
+ '@storybook/addon-links': '7.0.0-alpha.5',
18
+ '@storybook/addon-measure': '7.0.0-alpha.5',
19
+ '@storybook/addon-outline': '7.0.0-alpha.5',
20
+ '@storybook/addon-storyshots': '7.0.0-alpha.5',
21
+ '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.5',
22
+ '@storybook/addon-storysource': '7.0.0-alpha.5',
23
+ '@storybook/addon-toolbars': '7.0.0-alpha.5',
24
+ '@storybook/addon-viewport': '7.0.0-alpha.5',
25
+ '@storybook/addons': '7.0.0-alpha.5',
26
+ '@storybook/angular': '7.0.0-alpha.5',
27
+ '@storybook/api': '7.0.0-alpha.5',
28
+ '@storybook/builder-webpack5': '7.0.0-alpha.5',
29
+ '@storybook/channel-postmessage': '7.0.0-alpha.5',
30
+ '@storybook/channel-websocket': '7.0.0-alpha.5',
31
+ '@storybook/channels': '7.0.0-alpha.5',
32
+ '@storybook/cli': '7.0.0-alpha.5',
33
+ '@storybook/client-api': '7.0.0-alpha.5',
34
+ '@storybook/client-logger': '7.0.0-alpha.5',
35
+ '@storybook/codemod': '7.0.0-alpha.5',
36
+ '@storybook/components': '7.0.0-alpha.5',
37
+ '@storybook/core-client': '7.0.0-alpha.5',
38
+ '@storybook/core-common': '7.0.0-alpha.5',
39
+ '@storybook/core-events': '7.0.0-alpha.5',
40
+ '@storybook/core-server': '7.0.0-alpha.5',
41
+ '@storybook/core-webpack': '7.0.0-alpha.5',
42
+ '@storybook/csf-tools': '7.0.0-alpha.5',
43
+ '@storybook/docs-tools': '7.0.0-alpha.5',
44
+ '@storybook/ember': '7.0.0-alpha.5',
45
+ '@storybook/html': '7.0.0-alpha.5',
46
+ '@storybook/html-webpack5': '7.0.0-alpha.5',
47
+ '@storybook/instrumenter': '7.0.0-alpha.5',
48
+ '@storybook/manager-webpack5': '7.0.0-alpha.5',
49
+ '@storybook/node-logger': '7.0.0-alpha.5',
50
+ '@storybook/postinstall': '7.0.0-alpha.5',
51
+ '@storybook/preact': '7.0.0-alpha.5',
52
+ '@storybook/preact-webpack5': '7.0.0-alpha.5',
53
+ '@storybook/preset-html-webpack': '7.0.0-alpha.5',
54
+ '@storybook/preset-preact-webpack': '7.0.0-alpha.5',
55
+ '@storybook/preset-react-webpack': '7.0.0-alpha.5',
56
+ '@storybook/preset-server-webpack': '7.0.0-alpha.5',
57
+ '@storybook/preset-svelte-webpack': '7.0.0-alpha.5',
58
+ '@storybook/preset-vue-webpack': '7.0.0-alpha.5',
59
+ '@storybook/preset-vue3-webpack': '7.0.0-alpha.5',
60
+ '@storybook/preset-web-components-webpack': '7.0.0-alpha.5',
61
+ '@storybook/preview-web': '7.0.0-alpha.5',
62
+ '@storybook/react': '7.0.0-alpha.5',
63
+ '@storybook/react-webpack5': '7.0.0-alpha.5',
64
+ '@storybook/router': '7.0.0-alpha.5',
65
+ '@storybook/server': '7.0.0-alpha.5',
66
+ '@storybook/server-webpack5': '7.0.0-alpha.5',
67
+ '@storybook/source-loader': '7.0.0-alpha.5',
68
+ '@storybook/store': '7.0.0-alpha.5',
69
+ '@storybook/svelte': '7.0.0-alpha.5',
70
+ '@storybook/svelte-webpack5': '7.0.0-alpha.5',
71
+ '@storybook/telemetry': '7.0.0-alpha.5',
72
+ '@storybook/theming': '7.0.0-alpha.5',
73
+ '@storybook/ui': '7.0.0-alpha.5',
74
+ '@storybook/vue': '7.0.0-alpha.5',
75
+ '@storybook/vue-webpack5': '7.0.0-alpha.5',
76
+ '@storybook/vue3': '7.0.0-alpha.5',
77
+ '@storybook/vue3-webpack5': '7.0.0-alpha.5',
78
+ '@storybook/web-components': '7.0.0-alpha.5',
79
+ '@storybook/web-components-webpack5': '7.0.0-alpha.5',
80
+ sb: '7.0.0-alpha.5',
81
+ storybook: '7.0.0-alpha.5'
82
82
  };
83
83
  exports.default = _default;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.npm7 = void 0;
7
+
8
+ require("core-js/modules/es.promise.js");
9
+
10
+ var _chalk = _interopRequireDefault(require("chalk"));
11
+
12
+ var _tsDedent = _interopRequireDefault(require("ts-dedent"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
16
+ /**
17
+ * Is the user using npm7+? If so create a .npmrc with legacy-peer-deps=true
18
+ */
19
+ const npm7 = {
20
+ id: 'npm7',
21
+
22
+ async check({
23
+ packageManager
24
+ }) {
25
+ if (packageManager.type !== 'npm') return null;
26
+ const npmVersion = packageManager.getNpmVersion();
27
+
28
+ if (packageManager.needsLegacyPeerDeps(npmVersion)) {
29
+ return {
30
+ npmVersion
31
+ };
32
+ }
33
+
34
+ return null;
35
+ },
36
+
37
+ prompt({
38
+ npmVersion
39
+ }) {
40
+ const npmFormatted = _chalk.default.cyan(`npm ${npmVersion}`);
41
+
42
+ return (0, _tsDedent.default)`
43
+ We've detected you are running ${npmFormatted} which has peer dependency semantics which Storybook is incompatible with.
44
+
45
+ In order to work with Storybook's package structure, you'll need to run \`npm\` with the
46
+ \`--legacy-peer-deps=true\` flag. We can generate an \`.npmrc\` which will do that automatically.
47
+
48
+ More info: ${_chalk.default.yellow('https://github.com/storybookjs/storybook/issues/18298')}
49
+ `;
50
+ },
51
+
52
+ async run({
53
+ packageManager
54
+ }) {
55
+ packageManager.setLegacyPeerDeps();
56
+ }
57
+
58
+ };
59
+ exports.npm7 = npm7;
@@ -146,7 +146,7 @@ async function baseGenerator(packageManager, npmOptions, {
146
146
  `);
147
147
  }
148
148
 
149
- const packages = ['sb', ...frameworkPackages, ...addonPackages, ...extraPackages, ...yarn2ExtraPackages].filter(Boolean).filter(packageToInstall => !installedDependencies.has((0, _jsPackageManager.getPackageDetails)(packageToInstall)[0]));
149
+ const packages = ['storybook', ...frameworkPackages, ...addonPackages, ...extraPackages, ...yarn2ExtraPackages].filter(Boolean).filter(packageToInstall => !installedDependencies.has((0, _jsPackageManager.getPackageDetails)(packageToInstall)[0]));
150
150
  const versionedPackages = await packageManager.getVersionedPackages(packages);
151
151
  await _fsExtra.default.ensureDir('./.storybook');
152
152
  await (0, _configure.configureMain)(Object.assign({
@@ -221,8 +221,8 @@ class JsPackageManager {
221
221
  var _options$port;
222
222
 
223
223
  const sbPort = (_options$port = options === null || options === void 0 ? void 0 : options.port) !== null && _options$port !== void 0 ? _options$port : 6006;
224
- const storybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx sb dev -p ${sbPort} -s ${options.staticFolder}` : `npx sb dev -p ${sbPort}`;
225
- const buildStorybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx sb build -s ${options.staticFolder}` : `npx sb build`;
224
+ const storybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx storybook dev -p ${sbPort} -s ${options.staticFolder}` : `npx storybook dev -p ${sbPort}`;
225
+ const buildStorybookCmd = options !== null && options !== void 0 && options.staticFolder ? `npx storybook build -s ${options.staticFolder}` : `npx storybook build`;
226
226
  const preCommand = options !== null && options !== void 0 && options.preCommand ? this.getRunCommand(options.preCommand) : undefined;
227
227
  this.addScripts({
228
228
  storybook: [preCommand, storybookCmd].filter(Boolean).join(' && '),
@@ -30,10 +30,25 @@ class NPMProxy extends _JsPackageManager.JsPackageManager {
30
30
  return `npm run ${command}`;
31
31
  }
32
32
 
33
+ getNpmVersion() {
34
+ return this.executeCommand('npm', ['--version']);
35
+ }
36
+
37
+ hasLegacyPeerDeps() {
38
+ return this.executeCommand('npm', ['config', 'get', 'legacy-peer-deps', '--location=project']) === 'true';
39
+ }
40
+
41
+ setLegacyPeerDeps() {
42
+ this.executeCommand('npm', ['config', 'set', 'legacy-peer-deps=true', '--location=project']);
43
+ }
44
+
45
+ needsLegacyPeerDeps(version) {
46
+ return _semver.default.gte(version, '7.0.0') && !this.hasLegacyPeerDeps();
47
+ }
48
+
33
49
  getInstallArgs() {
34
50
  if (!this.installArgs) {
35
- const version = this.executeCommand('npm', ['--version']);
36
- this.installArgs = _semver.default.gte(version, '7.0.0') ? ['install', '--legacy-peer-deps'] : ['install'];
51
+ this.installArgs = this.needsLegacyPeerDeps(this.getNpmVersion()) ? ['install', '--legacy-peer-deps'] : ['install'];
37
52
  }
38
53
 
39
54
  return this.installArgs;
@@ -6,78 +6,78 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  // auto generated file, do not edit
8
8
  var _default = {
9
- '@storybook/addon-a11y': '7.0.0-alpha.2',
10
- '@storybook/addon-actions': '7.0.0-alpha.2',
11
- '@storybook/addon-backgrounds': '7.0.0-alpha.2',
12
- '@storybook/addon-controls': '7.0.0-alpha.2',
13
- '@storybook/addon-docs': '7.0.0-alpha.2',
14
- '@storybook/addon-essentials': '7.0.0-alpha.2',
15
- '@storybook/addon-interactions': '7.0.0-alpha.2',
16
- '@storybook/addon-jest': '7.0.0-alpha.2',
17
- '@storybook/addon-links': '7.0.0-alpha.2',
18
- '@storybook/addon-measure': '7.0.0-alpha.2',
19
- '@storybook/addon-outline': '7.0.0-alpha.2',
20
- '@storybook/addon-storyshots': '7.0.0-alpha.2',
21
- '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.2',
22
- '@storybook/addon-storysource': '7.0.0-alpha.2',
23
- '@storybook/addon-toolbars': '7.0.0-alpha.2',
24
- '@storybook/addon-viewport': '7.0.0-alpha.2',
25
- '@storybook/addons': '7.0.0-alpha.2',
26
- '@storybook/angular': '7.0.0-alpha.2',
27
- '@storybook/api': '7.0.0-alpha.2',
28
- '@storybook/builder-webpack5': '7.0.0-alpha.2',
29
- '@storybook/channel-postmessage': '7.0.0-alpha.2',
30
- '@storybook/channel-websocket': '7.0.0-alpha.2',
31
- '@storybook/channels': '7.0.0-alpha.2',
32
- '@storybook/cli': '7.0.0-alpha.2',
33
- '@storybook/client-api': '7.0.0-alpha.2',
34
- '@storybook/client-logger': '7.0.0-alpha.2',
35
- '@storybook/codemod': '7.0.0-alpha.2',
36
- '@storybook/components': '7.0.0-alpha.2',
37
- '@storybook/core-client': '7.0.0-alpha.2',
38
- '@storybook/core-common': '7.0.0-alpha.2',
39
- '@storybook/core-events': '7.0.0-alpha.2',
40
- '@storybook/core-server': '7.0.0-alpha.2',
41
- '@storybook/core-webpack': '7.0.0-alpha.2',
42
- '@storybook/csf-tools': '7.0.0-alpha.2',
43
- '@storybook/docs-tools': '7.0.0-alpha.2',
44
- '@storybook/ember': '7.0.0-alpha.2',
45
- '@storybook/html': '7.0.0-alpha.2',
46
- '@storybook/html-webpack5': '7.0.0-alpha.2',
47
- '@storybook/instrumenter': '7.0.0-alpha.2',
48
- '@storybook/manager-webpack5': '7.0.0-alpha.2',
49
- '@storybook/node-logger': '7.0.0-alpha.2',
50
- '@storybook/postinstall': '7.0.0-alpha.2',
51
- '@storybook/preact': '7.0.0-alpha.2',
52
- '@storybook/preact-webpack5': '7.0.0-alpha.2',
53
- '@storybook/preset-html-webpack': '7.0.0-alpha.2',
54
- '@storybook/preset-preact-webpack': '7.0.0-alpha.2',
55
- '@storybook/preset-react-webpack': '7.0.0-alpha.2',
56
- '@storybook/preset-server-webpack': '7.0.0-alpha.2',
57
- '@storybook/preset-svelte-webpack': '7.0.0-alpha.2',
58
- '@storybook/preset-vue-webpack': '7.0.0-alpha.2',
59
- '@storybook/preset-vue3-webpack': '7.0.0-alpha.2',
60
- '@storybook/preset-web-components-webpack': '7.0.0-alpha.2',
61
- '@storybook/preview-web': '7.0.0-alpha.2',
62
- '@storybook/react': '7.0.0-alpha.2',
63
- '@storybook/react-webpack5': '7.0.0-alpha.2',
64
- '@storybook/router': '7.0.0-alpha.2',
65
- '@storybook/server': '7.0.0-alpha.2',
66
- '@storybook/server-webpack5': '7.0.0-alpha.2',
67
- '@storybook/source-loader': '7.0.0-alpha.2',
68
- '@storybook/store': '7.0.0-alpha.2',
69
- '@storybook/svelte': '7.0.0-alpha.2',
70
- '@storybook/svelte-webpack5': '7.0.0-alpha.2',
71
- '@storybook/telemetry': '7.0.0-alpha.2',
72
- '@storybook/theming': '7.0.0-alpha.2',
73
- '@storybook/ui': '7.0.0-alpha.2',
74
- '@storybook/vue': '7.0.0-alpha.2',
75
- '@storybook/vue-webpack5': '7.0.0-alpha.2',
76
- '@storybook/vue3': '7.0.0-alpha.2',
77
- '@storybook/vue3-webpack5': '7.0.0-alpha.2',
78
- '@storybook/web-components': '7.0.0-alpha.2',
79
- '@storybook/web-components-webpack5': '7.0.0-alpha.2',
80
- sb: '7.0.0-alpha.2',
81
- storybook: '7.0.0-alpha.2'
9
+ '@storybook/addon-a11y': '7.0.0-alpha.5',
10
+ '@storybook/addon-actions': '7.0.0-alpha.5',
11
+ '@storybook/addon-backgrounds': '7.0.0-alpha.5',
12
+ '@storybook/addon-controls': '7.0.0-alpha.5',
13
+ '@storybook/addon-docs': '7.0.0-alpha.5',
14
+ '@storybook/addon-essentials': '7.0.0-alpha.5',
15
+ '@storybook/addon-interactions': '7.0.0-alpha.5',
16
+ '@storybook/addon-jest': '7.0.0-alpha.5',
17
+ '@storybook/addon-links': '7.0.0-alpha.5',
18
+ '@storybook/addon-measure': '7.0.0-alpha.5',
19
+ '@storybook/addon-outline': '7.0.0-alpha.5',
20
+ '@storybook/addon-storyshots': '7.0.0-alpha.5',
21
+ '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.5',
22
+ '@storybook/addon-storysource': '7.0.0-alpha.5',
23
+ '@storybook/addon-toolbars': '7.0.0-alpha.5',
24
+ '@storybook/addon-viewport': '7.0.0-alpha.5',
25
+ '@storybook/addons': '7.0.0-alpha.5',
26
+ '@storybook/angular': '7.0.0-alpha.5',
27
+ '@storybook/api': '7.0.0-alpha.5',
28
+ '@storybook/builder-webpack5': '7.0.0-alpha.5',
29
+ '@storybook/channel-postmessage': '7.0.0-alpha.5',
30
+ '@storybook/channel-websocket': '7.0.0-alpha.5',
31
+ '@storybook/channels': '7.0.0-alpha.5',
32
+ '@storybook/cli': '7.0.0-alpha.5',
33
+ '@storybook/client-api': '7.0.0-alpha.5',
34
+ '@storybook/client-logger': '7.0.0-alpha.5',
35
+ '@storybook/codemod': '7.0.0-alpha.5',
36
+ '@storybook/components': '7.0.0-alpha.5',
37
+ '@storybook/core-client': '7.0.0-alpha.5',
38
+ '@storybook/core-common': '7.0.0-alpha.5',
39
+ '@storybook/core-events': '7.0.0-alpha.5',
40
+ '@storybook/core-server': '7.0.0-alpha.5',
41
+ '@storybook/core-webpack': '7.0.0-alpha.5',
42
+ '@storybook/csf-tools': '7.0.0-alpha.5',
43
+ '@storybook/docs-tools': '7.0.0-alpha.5',
44
+ '@storybook/ember': '7.0.0-alpha.5',
45
+ '@storybook/html': '7.0.0-alpha.5',
46
+ '@storybook/html-webpack5': '7.0.0-alpha.5',
47
+ '@storybook/instrumenter': '7.0.0-alpha.5',
48
+ '@storybook/manager-webpack5': '7.0.0-alpha.5',
49
+ '@storybook/node-logger': '7.0.0-alpha.5',
50
+ '@storybook/postinstall': '7.0.0-alpha.5',
51
+ '@storybook/preact': '7.0.0-alpha.5',
52
+ '@storybook/preact-webpack5': '7.0.0-alpha.5',
53
+ '@storybook/preset-html-webpack': '7.0.0-alpha.5',
54
+ '@storybook/preset-preact-webpack': '7.0.0-alpha.5',
55
+ '@storybook/preset-react-webpack': '7.0.0-alpha.5',
56
+ '@storybook/preset-server-webpack': '7.0.0-alpha.5',
57
+ '@storybook/preset-svelte-webpack': '7.0.0-alpha.5',
58
+ '@storybook/preset-vue-webpack': '7.0.0-alpha.5',
59
+ '@storybook/preset-vue3-webpack': '7.0.0-alpha.5',
60
+ '@storybook/preset-web-components-webpack': '7.0.0-alpha.5',
61
+ '@storybook/preview-web': '7.0.0-alpha.5',
62
+ '@storybook/react': '7.0.0-alpha.5',
63
+ '@storybook/react-webpack5': '7.0.0-alpha.5',
64
+ '@storybook/router': '7.0.0-alpha.5',
65
+ '@storybook/server': '7.0.0-alpha.5',
66
+ '@storybook/server-webpack5': '7.0.0-alpha.5',
67
+ '@storybook/source-loader': '7.0.0-alpha.5',
68
+ '@storybook/store': '7.0.0-alpha.5',
69
+ '@storybook/svelte': '7.0.0-alpha.5',
70
+ '@storybook/svelte-webpack5': '7.0.0-alpha.5',
71
+ '@storybook/telemetry': '7.0.0-alpha.5',
72
+ '@storybook/theming': '7.0.0-alpha.5',
73
+ '@storybook/ui': '7.0.0-alpha.5',
74
+ '@storybook/vue': '7.0.0-alpha.5',
75
+ '@storybook/vue-webpack5': '7.0.0-alpha.5',
76
+ '@storybook/vue3': '7.0.0-alpha.5',
77
+ '@storybook/vue3-webpack5': '7.0.0-alpha.5',
78
+ '@storybook/web-components': '7.0.0-alpha.5',
79
+ '@storybook/web-components-webpack5': '7.0.0-alpha.5',
80
+ sb: '7.0.0-alpha.5',
81
+ storybook: '7.0.0-alpha.5'
82
82
  };
83
83
  exports.default = _default;
@@ -0,0 +1,9 @@
1
+ import { Fix } from '../types';
2
+ interface Npm7RunOptions {
3
+ npmVersion: string;
4
+ }
5
+ /**
6
+ * Is the user using npm7+? If so create a .npmrc with legacy-peer-deps=true
7
+ */
8
+ export declare const npm7: Fix<Npm7RunOptions>;
9
+ export {};
@@ -5,6 +5,10 @@ export declare class NPMProxy extends JsPackageManager {
5
5
  initPackageJson(): string;
6
6
  getRunStorybookCommand(): string;
7
7
  getRunCommand(command: string): string;
8
+ getNpmVersion(): string;
9
+ hasLegacyPeerDeps(): boolean;
10
+ setLegacyPeerDeps(): void;
11
+ needsLegacyPeerDeps(version: string): boolean;
8
12
  getInstallArgs(): string[];
9
13
  protected runInstall(): void;
10
14
  protected runAddDeps(dependencies: string[], installAsDevDependencies: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/cli",
3
- "version": "7.0.0-alpha.2",
3
+ "version": "7.0.0-alpha.5",
4
4
  "description": "Storybook's CLI - easiest method of adding storybook to your projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -47,13 +47,13 @@
47
47
  "dependencies": {
48
48
  "@babel/core": "^7.12.10",
49
49
  "@babel/preset-env": "^7.12.11",
50
- "@storybook/codemod": "7.0.0-alpha.2",
51
- "@storybook/core-common": "7.0.0-alpha.2",
52
- "@storybook/core-server": "7.0.0-alpha.2",
53
- "@storybook/csf-tools": "7.0.0-alpha.2",
54
- "@storybook/node-logger": "7.0.0-alpha.2",
50
+ "@storybook/codemod": "7.0.0-alpha.5",
51
+ "@storybook/core-common": "7.0.0-alpha.5",
52
+ "@storybook/core-server": "7.0.0-alpha.5",
53
+ "@storybook/csf-tools": "7.0.0-alpha.5",
54
+ "@storybook/node-logger": "7.0.0-alpha.5",
55
55
  "@storybook/semver": "^7.3.2",
56
- "@storybook/telemetry": "7.0.0-alpha.2",
56
+ "@storybook/telemetry": "7.0.0-alpha.5",
57
57
  "boxen": "^5.1.2",
58
58
  "chalk": "^4.1.0",
59
59
  "commander": "^6.2.1",
@@ -78,7 +78,7 @@
78
78
  "update-notifier": "^5.0.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@storybook/client-api": "7.0.0-alpha.2",
81
+ "@storybook/client-api": "7.0.0-alpha.5",
82
82
  "@types/cross-spawn": "^6.0.2",
83
83
  "@types/prompts": "^2.0.9",
84
84
  "@types/puppeteer-core": "^2.1.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "44920e2b6bd51981bac5124743c29fb9f5517e44"
94
+ "gitHead": "3dd46982823b34d9f37be917b6247631081feff7"
95
95
  }