@storybook/cli 7.0.0-alpha.23 → 7.0.0-alpha.24

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.
@@ -69,6 +69,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
69
69
  return {
70
70
  packages: [rendererPackage],
71
71
  framework: rendererPackagePath,
72
+ rendererId: 'angular',
72
73
  type: 'framework'
73
74
  };
74
75
  }
@@ -77,6 +78,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
77
78
  return {
78
79
  packages: [frameworkPackage],
79
80
  framework: frameworkPackagePath,
81
+ rendererId: renderer,
80
82
  type: 'framework'
81
83
  };
82
84
  }
@@ -86,6 +88,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
86
88
  packages: [rendererPackage, builderPackage],
87
89
  builder: builderPackagePath,
88
90
  renderer: rendererPackagePath,
91
+ rendererId: renderer,
89
92
  type: 'renderer'
90
93
  };
91
94
  }
@@ -95,7 +98,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
95
98
 
96
99
  const stripVersions = addons => addons.map(addon => (0, _jsPackageManager.getPackageDetails)(addon)[0]);
97
100
 
98
- const hasInteractiveStories = framework => ['react', 'angular', 'preact', 'svelte', 'vue', 'vue3', 'html'].includes(framework);
101
+ const hasInteractiveStories = rendererId => ['react', 'angular', 'preact', 'svelte', 'vue', 'vue3', 'html'].includes(rendererId);
99
102
 
100
103
  async function baseGenerator(packageManager, npmOptions, {
101
104
  language,
@@ -113,13 +116,23 @@ async function baseGenerator(packageManager, npmOptions, {
113
116
  addESLint,
114
117
  extraMain,
115
118
  extensions
116
- } = Object.assign({}, defaultOptions, options); // added to main.js
119
+ } = Object.assign({}, defaultOptions, options);
120
+ const {
121
+ packages: frameworkPackages,
122
+ type,
123
+ // @ts-ignore
124
+ renderer: rendererInclude,
125
+ // deepscan-disable-line UNUSED_DECL
126
+ rendererId,
127
+ framework: frameworkInclude,
128
+ builder: builderInclude
129
+ } = getFrameworkDetails(renderer, builder, pnp); // added to main.js
117
130
 
118
131
  const addons = ['@storybook/addon-links', '@storybook/addon-essentials', ...stripVersions(extraAddonPackages)]; // added to package.json
119
132
 
120
133
  const addonPackages = ['@storybook/addon-links', '@storybook/addon-essentials', ...extraAddonPackages];
121
134
 
122
- if (hasInteractiveStories(renderer)) {
135
+ if (hasInteractiveStories(rendererId)) {
123
136
  addons.push('@storybook/addon-interactions');
124
137
  addonPackages.push('@storybook/addon-interactions', '@storybook/testing-library');
125
138
  }
@@ -127,16 +140,7 @@ async function baseGenerator(packageManager, npmOptions, {
127
140
  const yarn2ExtraPackages = packageManager.type === 'yarn2' ? ['@storybook/addon-docs', '@mdx-js/react@1.x.x'] : [];
128
141
  const files = await _fsExtra.default.readdir(process.cwd());
129
142
  const packageJson = packageManager.retrievePackageJson();
130
- const installedDependencies = new Set(Object.keys(Object.assign({}, packageJson.dependencies, packageJson.devDependencies)));
131
- const {
132
- packages: frameworkPackages,
133
- type,
134
- // @ts-ignore
135
- renderer: rendererInclude,
136
- // deepscan-disable-line UNUSED_DECL
137
- framework: frameworkInclude,
138
- builder: builderInclude
139
- } = getFrameworkDetails(renderer, builder, pnp); // TODO: We need to start supporting this at some point
143
+ const installedDependencies = new Set(Object.keys(Object.assign({}, packageJson.dependencies, packageJson.devDependencies))); // TODO: We need to start supporting this at some point
140
144
 
141
145
  if (type === 'renderer') {
142
146
  throw new Error((0, _tsDedent.dedent)`
@@ -273,7 +273,7 @@ async function initiate(options, pkg) {
273
273
  }
274
274
 
275
275
  await (0, _automigrate.automigrate)({
276
- yes: process.env.CI === 'true'
276
+ yes: options.yes || process.env.CI === 'true'
277
277
  });
278
278
  logger.log('\nTo run your Storybook, type:\n');
279
279
  (0, _helpers.codeLog)([packageManager.getRunStorybookCommand()]);
@@ -44,6 +44,21 @@ function getPackageDetails(pkg) {
44
44
  }
45
45
 
46
46
  class JsPackageManager {
47
+ // NOTE: for some reason yarn prefers the npm registry in
48
+ // local development, so always use npm
49
+ setRegistryURL(url) {
50
+ if (url) {
51
+ this.executeCommand('npm', ['config', 'set', 'registry', url]);
52
+ } else {
53
+ this.executeCommand('npm', ['config', 'delete', 'registry']);
54
+ }
55
+ }
56
+
57
+ getRegistryURL() {
58
+ const url = this.executeCommand('npm', ['config', 'get', 'registry']).trim();
59
+ return url === 'undefined' ? undefined : url;
60
+ }
61
+
47
62
  constructor(options) {
48
63
  this.type = void 0;
49
64
  this.cwd = void 0;
@@ -64,19 +64,6 @@ class NPMProxy extends _JsPackageManager.JsPackageManager {
64
64
  return this.uninstallArgs;
65
65
  }
66
66
 
67
- setRegistryURL(url) {
68
- if (url) {
69
- this.executeCommand('npm', ['config', 'set', 'registry', url]);
70
- } else {
71
- this.executeCommand('npm', ['config', 'delete', 'registry']);
72
- }
73
- }
74
-
75
- getRegistryURL() {
76
- const url = this.executeCommand('npm', ['config', 'get', 'registry']).trim();
77
- return url === 'undefined' ? undefined : url;
78
- }
79
-
80
67
  getResolutions(packageJson, versions) {
81
68
  return {
82
69
  overrides: Object.assign({}, packageJson.overrides, versions)
@@ -25,19 +25,6 @@ class Yarn1Proxy extends _JsPackageManager.JsPackageManager {
25
25
  return `yarn ${command}`;
26
26
  }
27
27
 
28
- setRegistryURL(url) {
29
- if (url) {
30
- this.executeCommand('yarn', ['config', 'set', 'npmRegistryServer', url]);
31
- } else {
32
- this.executeCommand('yarn', ['config', 'delete', 'npmRegistryServer']);
33
- }
34
- }
35
-
36
- getRegistryURL() {
37
- const url = this.executeCommand('yarn', ['config', 'get', 'npmRegistryServer']).trim();
38
- return url === 'undefined' ? undefined : url;
39
- }
40
-
41
28
  getResolutions(packageJson, versions) {
42
29
  return {
43
30
  resolutions: Object.assign({}, packageJson.resolutions, versions)
@@ -25,19 +25,6 @@ class Yarn2Proxy extends _JsPackageManager.JsPackageManager {
25
25
  return `yarn ${command}`;
26
26
  }
27
27
 
28
- setRegistryURL(url) {
29
- if (url) {
30
- this.executeCommand('yarn', ['config', 'set', 'npmRegistryServer', url]);
31
- } else {
32
- this.executeCommand('yarn', ['config', 'delete', 'npmRegistryServer']);
33
- }
34
- }
35
-
36
- getRegistryURL() {
37
- const url = this.executeCommand('yarn', ['config', 'get', 'npmRegistryServer']).trim();
38
- return url === 'undefined' ? undefined : url;
39
- }
40
-
41
28
  getResolutions(packageJson, versions) {
42
29
  return {
43
30
  resolutions: Object.assign({}, packageJson.resolutions, versions)
@@ -138,7 +138,7 @@ const configureYarn2ForE2E = async ({
138
138
  cwd
139
139
  }) => {
140
140
  const command = [// ⚠️ Need to set registry because Yarn 2 is not using the conf of Yarn 1 (URL is hardcoded in CircleCI config.yml)
141
- `yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6000/" } }'`, // Some required magic to be able to fetch deps from local registry
141
+ `yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6001/" } }'`, // Some required magic to be able to fetch deps from local registry
142
142
  `yarn config set unsafeHttpWhitelist --json '["localhost"]'`, // Disable fallback mode to make sure everything is required correctly
143
143
  `yarn config set pnpFallbackMode none`, // We need to be able to update lockfile when bootstrapping the examples
144
144
  `yarn config set enableImmutableInstalls false`, // Discard all YN0013 - FETCH_NOT_CACHED messages
@@ -6,80 +6,80 @@ 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.23',
10
- '@storybook/addon-actions': '7.0.0-alpha.23',
11
- '@storybook/addon-backgrounds': '7.0.0-alpha.23',
12
- '@storybook/addon-controls': '7.0.0-alpha.23',
13
- '@storybook/addon-docs': '7.0.0-alpha.23',
14
- '@storybook/addon-essentials': '7.0.0-alpha.23',
15
- '@storybook/addon-highlight': '7.0.0-alpha.23',
16
- '@storybook/addon-interactions': '7.0.0-alpha.23',
17
- '@storybook/addon-jest': '7.0.0-alpha.23',
18
- '@storybook/addon-links': '7.0.0-alpha.23',
19
- '@storybook/addon-measure': '7.0.0-alpha.23',
20
- '@storybook/addon-outline': '7.0.0-alpha.23',
21
- '@storybook/addon-storyshots': '7.0.0-alpha.23',
22
- '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.23',
23
- '@storybook/addon-storysource': '7.0.0-alpha.23',
24
- '@storybook/addon-toolbars': '7.0.0-alpha.23',
25
- '@storybook/addon-viewport': '7.0.0-alpha.23',
26
- '@storybook/addons': '7.0.0-alpha.23',
27
- '@storybook/angular': '7.0.0-alpha.23',
28
- '@storybook/api': '7.0.0-alpha.23',
29
- '@storybook/blocks': '7.0.0-alpha.23',
30
- '@storybook/builder-manager': '7.0.0-alpha.23',
31
- '@storybook/builder-webpack5': '7.0.0-alpha.23',
32
- '@storybook/channel-postmessage': '7.0.0-alpha.23',
33
- '@storybook/channel-websocket': '7.0.0-alpha.23',
34
- '@storybook/channels': '7.0.0-alpha.23',
35
- '@storybook/cli': '7.0.0-alpha.23',
36
- '@storybook/client-api': '7.0.0-alpha.23',
37
- '@storybook/client-logger': '7.0.0-alpha.23',
38
- '@storybook/codemod': '7.0.0-alpha.23',
39
- '@storybook/components': '7.0.0-alpha.23',
40
- '@storybook/core-client': '7.0.0-alpha.23',
41
- '@storybook/core-common': '7.0.0-alpha.23',
42
- '@storybook/core-events': '7.0.0-alpha.23',
43
- '@storybook/core-server': '7.0.0-alpha.23',
44
- '@storybook/core-webpack': '7.0.0-alpha.23',
45
- '@storybook/csf-tools': '7.0.0-alpha.23',
46
- '@storybook/docs-tools': '7.0.0-alpha.23',
47
- '@storybook/ember': '7.0.0-alpha.23',
48
- '@storybook/html': '7.0.0-alpha.23',
49
- '@storybook/html-webpack5': '7.0.0-alpha.23',
50
- '@storybook/instrumenter': '7.0.0-alpha.23',
51
- '@storybook/node-logger': '7.0.0-alpha.23',
52
- '@storybook/postinstall': '7.0.0-alpha.23',
53
- '@storybook/preact': '7.0.0-alpha.23',
54
- '@storybook/preact-webpack5': '7.0.0-alpha.23',
55
- '@storybook/preset-html-webpack': '7.0.0-alpha.23',
56
- '@storybook/preset-preact-webpack': '7.0.0-alpha.23',
57
- '@storybook/preset-react-webpack': '7.0.0-alpha.23',
58
- '@storybook/preset-server-webpack': '7.0.0-alpha.23',
59
- '@storybook/preset-svelte-webpack': '7.0.0-alpha.23',
60
- '@storybook/preset-vue-webpack': '7.0.0-alpha.23',
61
- '@storybook/preset-vue3-webpack': '7.0.0-alpha.23',
62
- '@storybook/preset-web-components-webpack': '7.0.0-alpha.23',
63
- '@storybook/preview-web': '7.0.0-alpha.23',
64
- '@storybook/react': '7.0.0-alpha.23',
65
- '@storybook/react-webpack5': '7.0.0-alpha.23',
66
- '@storybook/router': '7.0.0-alpha.23',
67
- '@storybook/server': '7.0.0-alpha.23',
68
- '@storybook/server-webpack5': '7.0.0-alpha.23',
69
- '@storybook/source-loader': '7.0.0-alpha.23',
70
- '@storybook/store': '7.0.0-alpha.23',
71
- '@storybook/svelte': '7.0.0-alpha.23',
72
- '@storybook/svelte-webpack5': '7.0.0-alpha.23',
73
- '@storybook/telemetry': '7.0.0-alpha.23',
74
- '@storybook/theming': '7.0.0-alpha.23',
75
- '@storybook/ui': '7.0.0-alpha.23',
76
- '@storybook/vue': '7.0.0-alpha.23',
77
- '@storybook/vue-webpack5': '7.0.0-alpha.23',
78
- '@storybook/vue3': '7.0.0-alpha.23',
79
- '@storybook/vue3-webpack5': '7.0.0-alpha.23',
80
- '@storybook/web-components': '7.0.0-alpha.23',
81
- '@storybook/web-components-webpack5': '7.0.0-alpha.23',
82
- sb: '7.0.0-alpha.23',
83
- storybook: '7.0.0-alpha.23'
9
+ '@storybook/addon-a11y': '7.0.0-alpha.24',
10
+ '@storybook/addon-actions': '7.0.0-alpha.24',
11
+ '@storybook/addon-backgrounds': '7.0.0-alpha.24',
12
+ '@storybook/addon-controls': '7.0.0-alpha.24',
13
+ '@storybook/addon-docs': '7.0.0-alpha.24',
14
+ '@storybook/addon-essentials': '7.0.0-alpha.24',
15
+ '@storybook/addon-highlight': '7.0.0-alpha.24',
16
+ '@storybook/addon-interactions': '7.0.0-alpha.24',
17
+ '@storybook/addon-jest': '7.0.0-alpha.24',
18
+ '@storybook/addon-links': '7.0.0-alpha.24',
19
+ '@storybook/addon-measure': '7.0.0-alpha.24',
20
+ '@storybook/addon-outline': '7.0.0-alpha.24',
21
+ '@storybook/addon-storyshots': '7.0.0-alpha.24',
22
+ '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.24',
23
+ '@storybook/addon-storysource': '7.0.0-alpha.24',
24
+ '@storybook/addon-toolbars': '7.0.0-alpha.24',
25
+ '@storybook/addon-viewport': '7.0.0-alpha.24',
26
+ '@storybook/addons': '7.0.0-alpha.24',
27
+ '@storybook/angular': '7.0.0-alpha.24',
28
+ '@storybook/api': '7.0.0-alpha.24',
29
+ '@storybook/blocks': '7.0.0-alpha.24',
30
+ '@storybook/builder-manager': '7.0.0-alpha.24',
31
+ '@storybook/builder-webpack5': '7.0.0-alpha.24',
32
+ '@storybook/channel-postmessage': '7.0.0-alpha.24',
33
+ '@storybook/channel-websocket': '7.0.0-alpha.24',
34
+ '@storybook/channels': '7.0.0-alpha.24',
35
+ '@storybook/cli': '7.0.0-alpha.24',
36
+ '@storybook/client-api': '7.0.0-alpha.24',
37
+ '@storybook/client-logger': '7.0.0-alpha.24',
38
+ '@storybook/codemod': '7.0.0-alpha.24',
39
+ '@storybook/components': '7.0.0-alpha.24',
40
+ '@storybook/core-client': '7.0.0-alpha.24',
41
+ '@storybook/core-common': '7.0.0-alpha.24',
42
+ '@storybook/core-events': '7.0.0-alpha.24',
43
+ '@storybook/core-server': '7.0.0-alpha.24',
44
+ '@storybook/core-webpack': '7.0.0-alpha.24',
45
+ '@storybook/csf-tools': '7.0.0-alpha.24',
46
+ '@storybook/docs-tools': '7.0.0-alpha.24',
47
+ '@storybook/ember': '7.0.0-alpha.24',
48
+ '@storybook/html': '7.0.0-alpha.24',
49
+ '@storybook/html-webpack5': '7.0.0-alpha.24',
50
+ '@storybook/instrumenter': '7.0.0-alpha.24',
51
+ '@storybook/node-logger': '7.0.0-alpha.24',
52
+ '@storybook/postinstall': '7.0.0-alpha.24',
53
+ '@storybook/preact': '7.0.0-alpha.24',
54
+ '@storybook/preact-webpack5': '7.0.0-alpha.24',
55
+ '@storybook/preset-html-webpack': '7.0.0-alpha.24',
56
+ '@storybook/preset-preact-webpack': '7.0.0-alpha.24',
57
+ '@storybook/preset-react-webpack': '7.0.0-alpha.24',
58
+ '@storybook/preset-server-webpack': '7.0.0-alpha.24',
59
+ '@storybook/preset-svelte-webpack': '7.0.0-alpha.24',
60
+ '@storybook/preset-vue-webpack': '7.0.0-alpha.24',
61
+ '@storybook/preset-vue3-webpack': '7.0.0-alpha.24',
62
+ '@storybook/preset-web-components-webpack': '7.0.0-alpha.24',
63
+ '@storybook/preview-web': '7.0.0-alpha.24',
64
+ '@storybook/react': '7.0.0-alpha.24',
65
+ '@storybook/react-webpack5': '7.0.0-alpha.24',
66
+ '@storybook/router': '7.0.0-alpha.24',
67
+ '@storybook/server': '7.0.0-alpha.24',
68
+ '@storybook/server-webpack5': '7.0.0-alpha.24',
69
+ '@storybook/source-loader': '7.0.0-alpha.24',
70
+ '@storybook/store': '7.0.0-alpha.24',
71
+ '@storybook/svelte': '7.0.0-alpha.24',
72
+ '@storybook/svelte-webpack5': '7.0.0-alpha.24',
73
+ '@storybook/telemetry': '7.0.0-alpha.24',
74
+ '@storybook/theming': '7.0.0-alpha.24',
75
+ '@storybook/ui': '7.0.0-alpha.24',
76
+ '@storybook/vue': '7.0.0-alpha.24',
77
+ '@storybook/vue-webpack5': '7.0.0-alpha.24',
78
+ '@storybook/vue3': '7.0.0-alpha.24',
79
+ '@storybook/vue3-webpack5': '7.0.0-alpha.24',
80
+ '@storybook/web-components': '7.0.0-alpha.24',
81
+ '@storybook/web-components-webpack5': '7.0.0-alpha.24',
82
+ sb: '7.0.0-alpha.24',
83
+ storybook: '7.0.0-alpha.24'
84
84
  };
85
85
  exports.default = _default;
@@ -52,6 +52,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
52
52
  return {
53
53
  packages: [rendererPackage],
54
54
  framework: rendererPackagePath,
55
+ rendererId: 'angular',
55
56
  type: 'framework'
56
57
  };
57
58
  }
@@ -60,6 +61,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
60
61
  return {
61
62
  packages: [frameworkPackage],
62
63
  framework: frameworkPackagePath,
64
+ rendererId: renderer,
63
65
  type: 'framework'
64
66
  };
65
67
  }
@@ -69,6 +71,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
69
71
  packages: [rendererPackage, builderPackage],
70
72
  builder: builderPackagePath,
71
73
  renderer: rendererPackagePath,
74
+ rendererId: renderer,
72
75
  type: 'renderer'
73
76
  };
74
77
  }
@@ -78,7 +81,7 @@ const getFrameworkDetails = (renderer, builder, pnp) => {
78
81
 
79
82
  const stripVersions = addons => addons.map(addon => getPackageDetails(addon)[0]);
80
83
 
81
- const hasInteractiveStories = framework => ['react', 'angular', 'preact', 'svelte', 'vue', 'vue3', 'html'].includes(framework);
84
+ const hasInteractiveStories = rendererId => ['react', 'angular', 'preact', 'svelte', 'vue', 'vue3', 'html'].includes(rendererId);
82
85
 
83
86
  export async function baseGenerator(packageManager, npmOptions, {
84
87
  language,
@@ -96,13 +99,23 @@ export async function baseGenerator(packageManager, npmOptions, {
96
99
  addESLint,
97
100
  extraMain,
98
101
  extensions
99
- } = Object.assign({}, defaultOptions, options); // added to main.js
102
+ } = Object.assign({}, defaultOptions, options);
103
+ const {
104
+ packages: frameworkPackages,
105
+ type,
106
+ // @ts-ignore
107
+ renderer: rendererInclude,
108
+ // deepscan-disable-line UNUSED_DECL
109
+ rendererId,
110
+ framework: frameworkInclude,
111
+ builder: builderInclude
112
+ } = getFrameworkDetails(renderer, builder, pnp); // added to main.js
100
113
 
101
114
  const addons = ['@storybook/addon-links', '@storybook/addon-essentials', ...stripVersions(extraAddonPackages)]; // added to package.json
102
115
 
103
116
  const addonPackages = ['@storybook/addon-links', '@storybook/addon-essentials', ...extraAddonPackages];
104
117
 
105
- if (hasInteractiveStories(renderer)) {
118
+ if (hasInteractiveStories(rendererId)) {
106
119
  addons.push('@storybook/addon-interactions');
107
120
  addonPackages.push('@storybook/addon-interactions', '@storybook/testing-library');
108
121
  }
@@ -110,16 +123,7 @@ export async function baseGenerator(packageManager, npmOptions, {
110
123
  const yarn2ExtraPackages = packageManager.type === 'yarn2' ? ['@storybook/addon-docs', '@mdx-js/react@1.x.x'] : [];
111
124
  const files = await fse.readdir(process.cwd());
112
125
  const packageJson = packageManager.retrievePackageJson();
113
- const installedDependencies = new Set(Object.keys(Object.assign({}, packageJson.dependencies, packageJson.devDependencies)));
114
- const {
115
- packages: frameworkPackages,
116
- type,
117
- // @ts-ignore
118
- renderer: rendererInclude,
119
- // deepscan-disable-line UNUSED_DECL
120
- framework: frameworkInclude,
121
- builder: builderInclude
122
- } = getFrameworkDetails(renderer, builder, pnp); // TODO: We need to start supporting this at some point
126
+ const installedDependencies = new Set(Object.keys(Object.assign({}, packageJson.dependencies, packageJson.devDependencies))); // TODO: We need to start supporting this at some point
123
127
 
124
128
  if (type === 'renderer') {
125
129
  throw new Error(dedent`
@@ -232,7 +232,7 @@ export async function initiate(options, pkg) {
232
232
  }
233
233
 
234
234
  await automigrate({
235
- yes: process.env.CI === 'true'
235
+ yes: options.yes || process.env.CI === 'true'
236
236
  });
237
237
  logger.log('\nTo run your Storybook, type:\n');
238
238
  codeLog([packageManager.getRunStorybookCommand()]);
@@ -26,6 +26,21 @@ export function getPackageDetails(pkg) {
26
26
  return [packageName, packageVersion];
27
27
  }
28
28
  export class JsPackageManager {
29
+ // NOTE: for some reason yarn prefers the npm registry in
30
+ // local development, so always use npm
31
+ setRegistryURL(url) {
32
+ if (url) {
33
+ this.executeCommand('npm', ['config', 'set', 'registry', url]);
34
+ } else {
35
+ this.executeCommand('npm', ['config', 'delete', 'registry']);
36
+ }
37
+ }
38
+
39
+ getRegistryURL() {
40
+ const url = this.executeCommand('npm', ['config', 'get', 'registry']).trim();
41
+ return url === 'undefined' ? undefined : url;
42
+ }
43
+
29
44
  constructor(options) {
30
45
  this.type = void 0;
31
46
  this.cwd = void 0;
@@ -53,19 +53,6 @@ export class NPMProxy extends JsPackageManager {
53
53
  return this.uninstallArgs;
54
54
  }
55
55
 
56
- setRegistryURL(url) {
57
- if (url) {
58
- this.executeCommand('npm', ['config', 'set', 'registry', url]);
59
- } else {
60
- this.executeCommand('npm', ['config', 'delete', 'registry']);
61
- }
62
- }
63
-
64
- getRegistryURL() {
65
- const url = this.executeCommand('npm', ['config', 'get', 'registry']).trim();
66
- return url === 'undefined' ? undefined : url;
67
- }
68
-
69
56
  getResolutions(packageJson, versions) {
70
57
  return {
71
58
  overrides: Object.assign({}, packageJson.overrides, versions)
@@ -17,19 +17,6 @@ export class Yarn1Proxy extends JsPackageManager {
17
17
  return `yarn ${command}`;
18
18
  }
19
19
 
20
- setRegistryURL(url) {
21
- if (url) {
22
- this.executeCommand('yarn', ['config', 'set', 'npmRegistryServer', url]);
23
- } else {
24
- this.executeCommand('yarn', ['config', 'delete', 'npmRegistryServer']);
25
- }
26
- }
27
-
28
- getRegistryURL() {
29
- const url = this.executeCommand('yarn', ['config', 'get', 'npmRegistryServer']).trim();
30
- return url === 'undefined' ? undefined : url;
31
- }
32
-
33
20
  getResolutions(packageJson, versions) {
34
21
  return {
35
22
  resolutions: Object.assign({}, packageJson.resolutions, versions)
@@ -17,19 +17,6 @@ export class Yarn2Proxy extends JsPackageManager {
17
17
  return `yarn ${command}`;
18
18
  }
19
19
 
20
- setRegistryURL(url) {
21
- if (url) {
22
- this.executeCommand('yarn', ['config', 'set', 'npmRegistryServer', url]);
23
- } else {
24
- this.executeCommand('yarn', ['config', 'delete', 'npmRegistryServer']);
25
- }
26
- }
27
-
28
- getRegistryURL() {
29
- const url = this.executeCommand('yarn', ['config', 'get', 'npmRegistryServer']).trim();
30
- return url === 'undefined' ? undefined : url;
31
- }
32
-
33
20
  getResolutions(packageJson, versions) {
34
21
  return {
35
22
  resolutions: Object.assign({}, packageJson.resolutions, versions)
@@ -112,7 +112,7 @@ const configureYarn2ForE2E = async ({
112
112
  cwd
113
113
  }) => {
114
114
  const command = [// ⚠️ Need to set registry because Yarn 2 is not using the conf of Yarn 1 (URL is hardcoded in CircleCI config.yml)
115
- `yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6000/" } }'`, // Some required magic to be able to fetch deps from local registry
115
+ `yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6001/" } }'`, // Some required magic to be able to fetch deps from local registry
116
116
  `yarn config set unsafeHttpWhitelist --json '["localhost"]'`, // Disable fallback mode to make sure everything is required correctly
117
117
  `yarn config set pnpFallbackMode none`, // We need to be able to update lockfile when bootstrapping the examples
118
118
  `yarn config set enableImmutableInstalls false`, // Discard all YN0013 - FETCH_NOT_CACHED messages
@@ -1,78 +1,78 @@
1
1
  // auto generated file, do not edit
2
2
  export default {
3
- '@storybook/addon-a11y': '7.0.0-alpha.23',
4
- '@storybook/addon-actions': '7.0.0-alpha.23',
5
- '@storybook/addon-backgrounds': '7.0.0-alpha.23',
6
- '@storybook/addon-controls': '7.0.0-alpha.23',
7
- '@storybook/addon-docs': '7.0.0-alpha.23',
8
- '@storybook/addon-essentials': '7.0.0-alpha.23',
9
- '@storybook/addon-highlight': '7.0.0-alpha.23',
10
- '@storybook/addon-interactions': '7.0.0-alpha.23',
11
- '@storybook/addon-jest': '7.0.0-alpha.23',
12
- '@storybook/addon-links': '7.0.0-alpha.23',
13
- '@storybook/addon-measure': '7.0.0-alpha.23',
14
- '@storybook/addon-outline': '7.0.0-alpha.23',
15
- '@storybook/addon-storyshots': '7.0.0-alpha.23',
16
- '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.23',
17
- '@storybook/addon-storysource': '7.0.0-alpha.23',
18
- '@storybook/addon-toolbars': '7.0.0-alpha.23',
19
- '@storybook/addon-viewport': '7.0.0-alpha.23',
20
- '@storybook/addons': '7.0.0-alpha.23',
21
- '@storybook/angular': '7.0.0-alpha.23',
22
- '@storybook/api': '7.0.0-alpha.23',
23
- '@storybook/blocks': '7.0.0-alpha.23',
24
- '@storybook/builder-manager': '7.0.0-alpha.23',
25
- '@storybook/builder-webpack5': '7.0.0-alpha.23',
26
- '@storybook/channel-postmessage': '7.0.0-alpha.23',
27
- '@storybook/channel-websocket': '7.0.0-alpha.23',
28
- '@storybook/channels': '7.0.0-alpha.23',
29
- '@storybook/cli': '7.0.0-alpha.23',
30
- '@storybook/client-api': '7.0.0-alpha.23',
31
- '@storybook/client-logger': '7.0.0-alpha.23',
32
- '@storybook/codemod': '7.0.0-alpha.23',
33
- '@storybook/components': '7.0.0-alpha.23',
34
- '@storybook/core-client': '7.0.0-alpha.23',
35
- '@storybook/core-common': '7.0.0-alpha.23',
36
- '@storybook/core-events': '7.0.0-alpha.23',
37
- '@storybook/core-server': '7.0.0-alpha.23',
38
- '@storybook/core-webpack': '7.0.0-alpha.23',
39
- '@storybook/csf-tools': '7.0.0-alpha.23',
40
- '@storybook/docs-tools': '7.0.0-alpha.23',
41
- '@storybook/ember': '7.0.0-alpha.23',
42
- '@storybook/html': '7.0.0-alpha.23',
43
- '@storybook/html-webpack5': '7.0.0-alpha.23',
44
- '@storybook/instrumenter': '7.0.0-alpha.23',
45
- '@storybook/node-logger': '7.0.0-alpha.23',
46
- '@storybook/postinstall': '7.0.0-alpha.23',
47
- '@storybook/preact': '7.0.0-alpha.23',
48
- '@storybook/preact-webpack5': '7.0.0-alpha.23',
49
- '@storybook/preset-html-webpack': '7.0.0-alpha.23',
50
- '@storybook/preset-preact-webpack': '7.0.0-alpha.23',
51
- '@storybook/preset-react-webpack': '7.0.0-alpha.23',
52
- '@storybook/preset-server-webpack': '7.0.0-alpha.23',
53
- '@storybook/preset-svelte-webpack': '7.0.0-alpha.23',
54
- '@storybook/preset-vue-webpack': '7.0.0-alpha.23',
55
- '@storybook/preset-vue3-webpack': '7.0.0-alpha.23',
56
- '@storybook/preset-web-components-webpack': '7.0.0-alpha.23',
57
- '@storybook/preview-web': '7.0.0-alpha.23',
58
- '@storybook/react': '7.0.0-alpha.23',
59
- '@storybook/react-webpack5': '7.0.0-alpha.23',
60
- '@storybook/router': '7.0.0-alpha.23',
61
- '@storybook/server': '7.0.0-alpha.23',
62
- '@storybook/server-webpack5': '7.0.0-alpha.23',
63
- '@storybook/source-loader': '7.0.0-alpha.23',
64
- '@storybook/store': '7.0.0-alpha.23',
65
- '@storybook/svelte': '7.0.0-alpha.23',
66
- '@storybook/svelte-webpack5': '7.0.0-alpha.23',
67
- '@storybook/telemetry': '7.0.0-alpha.23',
68
- '@storybook/theming': '7.0.0-alpha.23',
69
- '@storybook/ui': '7.0.0-alpha.23',
70
- '@storybook/vue': '7.0.0-alpha.23',
71
- '@storybook/vue-webpack5': '7.0.0-alpha.23',
72
- '@storybook/vue3': '7.0.0-alpha.23',
73
- '@storybook/vue3-webpack5': '7.0.0-alpha.23',
74
- '@storybook/web-components': '7.0.0-alpha.23',
75
- '@storybook/web-components-webpack5': '7.0.0-alpha.23',
76
- sb: '7.0.0-alpha.23',
77
- storybook: '7.0.0-alpha.23'
3
+ '@storybook/addon-a11y': '7.0.0-alpha.24',
4
+ '@storybook/addon-actions': '7.0.0-alpha.24',
5
+ '@storybook/addon-backgrounds': '7.0.0-alpha.24',
6
+ '@storybook/addon-controls': '7.0.0-alpha.24',
7
+ '@storybook/addon-docs': '7.0.0-alpha.24',
8
+ '@storybook/addon-essentials': '7.0.0-alpha.24',
9
+ '@storybook/addon-highlight': '7.0.0-alpha.24',
10
+ '@storybook/addon-interactions': '7.0.0-alpha.24',
11
+ '@storybook/addon-jest': '7.0.0-alpha.24',
12
+ '@storybook/addon-links': '7.0.0-alpha.24',
13
+ '@storybook/addon-measure': '7.0.0-alpha.24',
14
+ '@storybook/addon-outline': '7.0.0-alpha.24',
15
+ '@storybook/addon-storyshots': '7.0.0-alpha.24',
16
+ '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.24',
17
+ '@storybook/addon-storysource': '7.0.0-alpha.24',
18
+ '@storybook/addon-toolbars': '7.0.0-alpha.24',
19
+ '@storybook/addon-viewport': '7.0.0-alpha.24',
20
+ '@storybook/addons': '7.0.0-alpha.24',
21
+ '@storybook/angular': '7.0.0-alpha.24',
22
+ '@storybook/api': '7.0.0-alpha.24',
23
+ '@storybook/blocks': '7.0.0-alpha.24',
24
+ '@storybook/builder-manager': '7.0.0-alpha.24',
25
+ '@storybook/builder-webpack5': '7.0.0-alpha.24',
26
+ '@storybook/channel-postmessage': '7.0.0-alpha.24',
27
+ '@storybook/channel-websocket': '7.0.0-alpha.24',
28
+ '@storybook/channels': '7.0.0-alpha.24',
29
+ '@storybook/cli': '7.0.0-alpha.24',
30
+ '@storybook/client-api': '7.0.0-alpha.24',
31
+ '@storybook/client-logger': '7.0.0-alpha.24',
32
+ '@storybook/codemod': '7.0.0-alpha.24',
33
+ '@storybook/components': '7.0.0-alpha.24',
34
+ '@storybook/core-client': '7.0.0-alpha.24',
35
+ '@storybook/core-common': '7.0.0-alpha.24',
36
+ '@storybook/core-events': '7.0.0-alpha.24',
37
+ '@storybook/core-server': '7.0.0-alpha.24',
38
+ '@storybook/core-webpack': '7.0.0-alpha.24',
39
+ '@storybook/csf-tools': '7.0.0-alpha.24',
40
+ '@storybook/docs-tools': '7.0.0-alpha.24',
41
+ '@storybook/ember': '7.0.0-alpha.24',
42
+ '@storybook/html': '7.0.0-alpha.24',
43
+ '@storybook/html-webpack5': '7.0.0-alpha.24',
44
+ '@storybook/instrumenter': '7.0.0-alpha.24',
45
+ '@storybook/node-logger': '7.0.0-alpha.24',
46
+ '@storybook/postinstall': '7.0.0-alpha.24',
47
+ '@storybook/preact': '7.0.0-alpha.24',
48
+ '@storybook/preact-webpack5': '7.0.0-alpha.24',
49
+ '@storybook/preset-html-webpack': '7.0.0-alpha.24',
50
+ '@storybook/preset-preact-webpack': '7.0.0-alpha.24',
51
+ '@storybook/preset-react-webpack': '7.0.0-alpha.24',
52
+ '@storybook/preset-server-webpack': '7.0.0-alpha.24',
53
+ '@storybook/preset-svelte-webpack': '7.0.0-alpha.24',
54
+ '@storybook/preset-vue-webpack': '7.0.0-alpha.24',
55
+ '@storybook/preset-vue3-webpack': '7.0.0-alpha.24',
56
+ '@storybook/preset-web-components-webpack': '7.0.0-alpha.24',
57
+ '@storybook/preview-web': '7.0.0-alpha.24',
58
+ '@storybook/react': '7.0.0-alpha.24',
59
+ '@storybook/react-webpack5': '7.0.0-alpha.24',
60
+ '@storybook/router': '7.0.0-alpha.24',
61
+ '@storybook/server': '7.0.0-alpha.24',
62
+ '@storybook/server-webpack5': '7.0.0-alpha.24',
63
+ '@storybook/source-loader': '7.0.0-alpha.24',
64
+ '@storybook/store': '7.0.0-alpha.24',
65
+ '@storybook/svelte': '7.0.0-alpha.24',
66
+ '@storybook/svelte-webpack5': '7.0.0-alpha.24',
67
+ '@storybook/telemetry': '7.0.0-alpha.24',
68
+ '@storybook/theming': '7.0.0-alpha.24',
69
+ '@storybook/ui': '7.0.0-alpha.24',
70
+ '@storybook/vue': '7.0.0-alpha.24',
71
+ '@storybook/vue-webpack5': '7.0.0-alpha.24',
72
+ '@storybook/vue3': '7.0.0-alpha.24',
73
+ '@storybook/vue3-webpack5': '7.0.0-alpha.24',
74
+ '@storybook/web-components': '7.0.0-alpha.24',
75
+ '@storybook/web-components-webpack5': '7.0.0-alpha.24',
76
+ sb: '7.0.0-alpha.24',
77
+ storybook: '7.0.0-alpha.24'
78
78
  };
@@ -14,8 +14,8 @@ export declare abstract class JsPackageManager {
14
14
  abstract initPackageJson(): void;
15
15
  abstract getRunStorybookCommand(): string;
16
16
  abstract getRunCommand(command: string): string;
17
- abstract setRegistryURL(url: string): void;
18
- abstract getRegistryURL(): string;
17
+ setRegistryURL(url: string): void;
18
+ getRegistryURL(): string;
19
19
  readonly cwd?: string;
20
20
  constructor(options?: JsPackageManagerOptions);
21
21
  /**
@@ -13,8 +13,6 @@ export declare class NPMProxy extends JsPackageManager {
13
13
  needsLegacyPeerDeps(version: string): boolean;
14
14
  getInstallArgs(): string[];
15
15
  getUninstallArgs(): string[];
16
- setRegistryURL(url: string): void;
17
- getRegistryURL(): string;
18
16
  protected getResolutions(packageJson: PackageJson, versions: Record<string, string>): {
19
17
  overrides: any;
20
18
  };
@@ -5,8 +5,6 @@ export declare class Yarn1Proxy extends JsPackageManager {
5
5
  initPackageJson(): string;
6
6
  getRunStorybookCommand(): string;
7
7
  getRunCommand(command: string): string;
8
- setRegistryURL(url: string): void;
9
- getRegistryURL(): string;
10
8
  protected getResolutions(packageJson: PackageJson, versions: Record<string, string>): {
11
9
  resolutions: {
12
10
  [x: string]: string;
@@ -5,8 +5,6 @@ export declare class Yarn2Proxy extends JsPackageManager {
5
5
  initPackageJson(): string;
6
6
  getRunStorybookCommand(): string;
7
7
  getRunCommand(command: string): string;
8
- setRegistryURL(url: string): void;
9
- getRegistryURL(): string;
10
8
  protected getResolutions(packageJson: PackageJson, versions: Record<string, string>): {
11
9
  resolutions: {
12
10
  [x: string]: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/cli",
3
- "version": "7.0.0-alpha.23",
3
+ "version": "7.0.0-alpha.24",
4
4
  "description": "Storybook's CLI - easiest method of adding storybook to your projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -48,13 +48,13 @@
48
48
  "dependencies": {
49
49
  "@babel/core": "^7.12.10",
50
50
  "@babel/preset-env": "^7.12.11",
51
- "@storybook/codemod": "7.0.0-alpha.23",
52
- "@storybook/core-common": "7.0.0-alpha.23",
53
- "@storybook/core-server": "7.0.0-alpha.23",
54
- "@storybook/csf-tools": "7.0.0-alpha.23",
55
- "@storybook/node-logger": "7.0.0-alpha.23",
51
+ "@storybook/codemod": "7.0.0-alpha.24",
52
+ "@storybook/core-common": "7.0.0-alpha.24",
53
+ "@storybook/core-server": "7.0.0-alpha.24",
54
+ "@storybook/csf-tools": "7.0.0-alpha.24",
55
+ "@storybook/node-logger": "7.0.0-alpha.24",
56
56
  "@storybook/semver": "^7.3.2",
57
- "@storybook/telemetry": "7.0.0-alpha.23",
57
+ "@storybook/telemetry": "7.0.0-alpha.24",
58
58
  "boxen": "^5.1.2",
59
59
  "chalk": "^4.1.0",
60
60
  "commander": "^6.2.1",
@@ -81,7 +81,7 @@
81
81
  "update-notifier": "^5.0.1"
82
82
  },
83
83
  "devDependencies": {
84
- "@storybook/client-api": "7.0.0-alpha.23",
84
+ "@storybook/client-api": "7.0.0-alpha.24",
85
85
  "@types/cross-spawn": "^6.0.2",
86
86
  "@types/degit": "^2.8.3",
87
87
  "@types/prompts": "^2.0.9",
@@ -96,5 +96,5 @@
96
96
  "publishConfig": {
97
97
  "access": "public"
98
98
  },
99
- "gitHead": "0900e20acfbc12551c6a3f788b8de5dd6af5f80a"
99
+ "gitHead": "e3232cb426b8381afa48f42e6baa45fd9af9bc3a"
100
100
  }