@storybook/cli 7.0.0-alpha.21 → 7.0.0-alpha.25

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.
Files changed (41) hide show
  1. package/dist/cjs/automigrate/fixes/builder-vite.js +1 -3
  2. package/dist/cjs/detect.js +2 -18
  3. package/dist/cjs/generators/RAX/index.js +1 -3
  4. package/dist/cjs/generators/baseGenerator.js +18 -14
  5. package/dist/cjs/initiate.js +10 -3
  6. package/dist/cjs/js-package-manager/JsPackageManager.js +59 -10
  7. package/dist/cjs/js-package-manager/JsPackageManagerFactory.js +25 -11
  8. package/dist/cjs/js-package-manager/NPMProxy.js +6 -0
  9. package/dist/cjs/js-package-manager/Yarn1Proxy.js +6 -0
  10. package/dist/cjs/js-package-manager/Yarn2Proxy.js +6 -0
  11. package/dist/cjs/js-package-manager/index.js +0 -13
  12. package/dist/cjs/repro-generators/scripts.js +1 -1
  13. package/dist/cjs/repro-templates.js +49 -14
  14. package/dist/cjs/versions.js +78 -75
  15. package/dist/esm/automigrate/fixes/builder-vite.js +1 -2
  16. package/dist/esm/detect.js +2 -17
  17. package/dist/esm/generators/RAX/index.js +1 -2
  18. package/dist/esm/generators/baseGenerator.js +18 -14
  19. package/dist/esm/initiate.js +10 -3
  20. package/dist/esm/js-package-manager/JsPackageManager.js +55 -9
  21. package/dist/esm/js-package-manager/JsPackageManagerFactory.js +25 -11
  22. package/dist/esm/js-package-manager/NPMProxy.js +6 -0
  23. package/dist/esm/js-package-manager/Yarn1Proxy.js +6 -0
  24. package/dist/esm/js-package-manager/Yarn2Proxy.js +6 -0
  25. package/dist/esm/js-package-manager/index.js +1 -2
  26. package/dist/esm/repro-generators/scripts.js +1 -1
  27. package/dist/esm/repro-templates.js +48 -15
  28. package/dist/esm/versions.js +78 -75
  29. package/dist/types/detect.d.ts +2 -2
  30. package/dist/types/js-package-manager/JsPackageManager.d.ts +13 -0
  31. package/dist/types/js-package-manager/JsPackageManagerFactory.d.ts +1 -1
  32. package/dist/types/js-package-manager/NPMProxy.d.ts +4 -0
  33. package/dist/types/js-package-manager/Yarn1Proxy.d.ts +6 -0
  34. package/dist/types/js-package-manager/Yarn2Proxy.d.ts +6 -0
  35. package/dist/types/js-package-manager/index.d.ts +0 -1
  36. package/dist/types/repro-templates.d.ts +54 -14
  37. package/dist/types/versions.d.ts +3 -0
  38. package/package.json +9 -16
  39. package/dist/cjs/js-package-manager/PackageJsonHelper.js +0 -33
  40. package/dist/esm/js-package-manager/PackageJsonHelper.js +0 -17
  41. package/dist/types/js-package-manager/PackageJsonHelper.d.ts +0 -3
@@ -1,4 +1,4 @@
1
- export default {
1
+ const craTemplates = {
2
2
  'cra/default-js': {
3
3
  name: 'Create React App (Javascript)',
4
4
  script: 'npx create-react-app .',
@@ -18,17 +18,50 @@ export default {
18
18
  renderer: '@storybook/react',
19
19
  builder: '@storybook/builder-webpack5'
20
20
  }
21
- } // FIXME: missing documentation.json
22
- // 'angular/latest': {
23
- // name: 'Angular (latest)',
24
- // script:
25
- // 'npx -p @angular/cli ng new angular-latest --directory . --routing=true --minimal=true --style=scss --skip-install=true --strict',
26
- // cadence: ['ci', 'daily', 'weekly'],
27
- // expected: {
28
- // framework: '@storybook/angular',
29
- // renderer: '@storybook/angular',
30
- // builder: '@storybook/builder-webpack5',
31
- // },
32
- // },
33
-
34
- };
21
+ }
22
+ };
23
+ const reactViteTemplates = {
24
+ 'react-vite/default-js': {
25
+ name: 'React Vite (JS)',
26
+ script: 'yarn create vite . --template react',
27
+ cadence: ['ci', 'daily', 'weekly'],
28
+ expected: {
29
+ framework: '@storybook/react-vite',
30
+ renderer: '@storybook/react',
31
+ builder: '@storybook/builder-vite'
32
+ }
33
+ },
34
+ 'react-vite/default-ts': {
35
+ name: 'React Vite (TS)',
36
+ script: 'yarn create vite . --template react-ts',
37
+ cadence: ['ci', 'daily', 'weekly'],
38
+ expected: {
39
+ framework: '@storybook/react-vite',
40
+ renderer: '@storybook/react',
41
+ builder: '@storybook/builder-vite'
42
+ }
43
+ }
44
+ };
45
+ const vue3ViteTemplates = {
46
+ 'vue3-vite/default-js': {
47
+ name: 'Vue3 Vite (JS)',
48
+ script: 'yarn create vite . --template vue',
49
+ cadence: ['ci', 'daily', 'weekly'],
50
+ expected: {
51
+ framework: '@storybook/vue3-vite',
52
+ renderer: '@storybook/vue3',
53
+ builder: '@storybook/builder-vite'
54
+ }
55
+ },
56
+ 'vue3-vite/default-ts': {
57
+ name: 'Vue3 Vite (TS)',
58
+ script: 'yarn create vite . --template vue-ts',
59
+ cadence: ['ci', 'daily', 'weekly'],
60
+ expected: {
61
+ framework: '@storybook/vue3-vite',
62
+ renderer: '@storybook/vue3',
63
+ builder: '@storybook/builder-vite'
64
+ }
65
+ }
66
+ };
67
+ export default Object.assign({}, craTemplates, reactViteTemplates, vue3ViteTemplates);
@@ -1,78 +1,81 @@
1
1
  // auto generated file, do not edit
2
2
  export default {
3
- '@storybook/addon-a11y': '7.0.0-alpha.21',
4
- '@storybook/addon-actions': '7.0.0-alpha.21',
5
- '@storybook/addon-backgrounds': '7.0.0-alpha.21',
6
- '@storybook/addon-controls': '7.0.0-alpha.21',
7
- '@storybook/addon-docs': '7.0.0-alpha.21',
8
- '@storybook/addon-essentials': '7.0.0-alpha.21',
9
- '@storybook/addon-highlight': '7.0.0-alpha.21',
10
- '@storybook/addon-interactions': '7.0.0-alpha.21',
11
- '@storybook/addon-jest': '7.0.0-alpha.21',
12
- '@storybook/addon-links': '7.0.0-alpha.21',
13
- '@storybook/addon-measure': '7.0.0-alpha.21',
14
- '@storybook/addon-outline': '7.0.0-alpha.21',
15
- '@storybook/addon-storyshots': '7.0.0-alpha.21',
16
- '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.21',
17
- '@storybook/addon-storysource': '7.0.0-alpha.21',
18
- '@storybook/addon-toolbars': '7.0.0-alpha.21',
19
- '@storybook/addon-viewport': '7.0.0-alpha.21',
20
- '@storybook/addons': '7.0.0-alpha.21',
21
- '@storybook/angular': '7.0.0-alpha.21',
22
- '@storybook/api': '7.0.0-alpha.21',
23
- '@storybook/blocks': '7.0.0-alpha.21',
24
- '@storybook/builder-manager': '7.0.0-alpha.21',
25
- '@storybook/builder-webpack5': '7.0.0-alpha.21',
26
- '@storybook/channel-postmessage': '7.0.0-alpha.21',
27
- '@storybook/channel-websocket': '7.0.0-alpha.21',
28
- '@storybook/channels': '7.0.0-alpha.21',
29
- '@storybook/cli': '7.0.0-alpha.21',
30
- '@storybook/client-api': '7.0.0-alpha.21',
31
- '@storybook/client-logger': '7.0.0-alpha.21',
32
- '@storybook/codemod': '7.0.0-alpha.21',
33
- '@storybook/components': '7.0.0-alpha.21',
34
- '@storybook/core-client': '7.0.0-alpha.21',
35
- '@storybook/core-common': '7.0.0-alpha.21',
36
- '@storybook/core-events': '7.0.0-alpha.21',
37
- '@storybook/core-server': '7.0.0-alpha.21',
38
- '@storybook/core-webpack': '7.0.0-alpha.21',
39
- '@storybook/csf-tools': '7.0.0-alpha.21',
40
- '@storybook/docs-tools': '7.0.0-alpha.21',
41
- '@storybook/ember': '7.0.0-alpha.21',
42
- '@storybook/html': '7.0.0-alpha.21',
43
- '@storybook/html-webpack5': '7.0.0-alpha.21',
44
- '@storybook/instrumenter': '7.0.0-alpha.21',
45
- '@storybook/node-logger': '7.0.0-alpha.21',
46
- '@storybook/postinstall': '7.0.0-alpha.21',
47
- '@storybook/preact': '7.0.0-alpha.21',
48
- '@storybook/preact-webpack5': '7.0.0-alpha.21',
49
- '@storybook/preset-html-webpack': '7.0.0-alpha.21',
50
- '@storybook/preset-preact-webpack': '7.0.0-alpha.21',
51
- '@storybook/preset-react-webpack': '7.0.0-alpha.21',
52
- '@storybook/preset-server-webpack': '7.0.0-alpha.21',
53
- '@storybook/preset-svelte-webpack': '7.0.0-alpha.21',
54
- '@storybook/preset-vue-webpack': '7.0.0-alpha.21',
55
- '@storybook/preset-vue3-webpack': '7.0.0-alpha.21',
56
- '@storybook/preset-web-components-webpack': '7.0.0-alpha.21',
57
- '@storybook/preview-web': '7.0.0-alpha.21',
58
- '@storybook/react': '7.0.0-alpha.21',
59
- '@storybook/react-webpack5': '7.0.0-alpha.21',
60
- '@storybook/router': '7.0.0-alpha.21',
61
- '@storybook/server': '7.0.0-alpha.21',
62
- '@storybook/server-webpack5': '7.0.0-alpha.21',
63
- '@storybook/source-loader': '7.0.0-alpha.21',
64
- '@storybook/store': '7.0.0-alpha.21',
65
- '@storybook/svelte': '7.0.0-alpha.21',
66
- '@storybook/svelte-webpack5': '7.0.0-alpha.21',
67
- '@storybook/telemetry': '7.0.0-alpha.21',
68
- '@storybook/theming': '7.0.0-alpha.21',
69
- '@storybook/ui': '7.0.0-alpha.21',
70
- '@storybook/vue': '7.0.0-alpha.21',
71
- '@storybook/vue-webpack5': '7.0.0-alpha.21',
72
- '@storybook/vue3': '7.0.0-alpha.21',
73
- '@storybook/vue3-webpack5': '7.0.0-alpha.21',
74
- '@storybook/web-components': '7.0.0-alpha.21',
75
- '@storybook/web-components-webpack5': '7.0.0-alpha.21',
76
- sb: '7.0.0-alpha.21',
77
- storybook: '7.0.0-alpha.21'
3
+ '@storybook/addon-a11y': '7.0.0-alpha.25',
4
+ '@storybook/addon-actions': '7.0.0-alpha.25',
5
+ '@storybook/addon-backgrounds': '7.0.0-alpha.25',
6
+ '@storybook/addon-controls': '7.0.0-alpha.25',
7
+ '@storybook/addon-docs': '7.0.0-alpha.25',
8
+ '@storybook/addon-essentials': '7.0.0-alpha.25',
9
+ '@storybook/addon-highlight': '7.0.0-alpha.25',
10
+ '@storybook/addon-interactions': '7.0.0-alpha.25',
11
+ '@storybook/addon-jest': '7.0.0-alpha.25',
12
+ '@storybook/addon-links': '7.0.0-alpha.25',
13
+ '@storybook/addon-measure': '7.0.0-alpha.25',
14
+ '@storybook/addon-outline': '7.0.0-alpha.25',
15
+ '@storybook/addon-storyshots': '7.0.0-alpha.25',
16
+ '@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.25',
17
+ '@storybook/addon-storysource': '7.0.0-alpha.25',
18
+ '@storybook/addon-toolbars': '7.0.0-alpha.25',
19
+ '@storybook/addon-viewport': '7.0.0-alpha.25',
20
+ '@storybook/addons': '7.0.0-alpha.25',
21
+ '@storybook/angular': '7.0.0-alpha.25',
22
+ '@storybook/api': '7.0.0-alpha.25',
23
+ '@storybook/blocks': '7.0.0-alpha.25',
24
+ '@storybook/builder-manager': '7.0.0-alpha.25',
25
+ '@storybook/builder-vite': '7.0.0-alpha.25',
26
+ '@storybook/builder-webpack5': '7.0.0-alpha.25',
27
+ '@storybook/channel-postmessage': '7.0.0-alpha.25',
28
+ '@storybook/channel-websocket': '7.0.0-alpha.25',
29
+ '@storybook/channels': '7.0.0-alpha.25',
30
+ '@storybook/cli': '7.0.0-alpha.25',
31
+ '@storybook/client-api': '7.0.0-alpha.25',
32
+ '@storybook/client-logger': '7.0.0-alpha.25',
33
+ '@storybook/codemod': '7.0.0-alpha.25',
34
+ '@storybook/components': '7.0.0-alpha.25',
35
+ '@storybook/core-client': '7.0.0-alpha.25',
36
+ '@storybook/core-common': '7.0.0-alpha.25',
37
+ '@storybook/core-events': '7.0.0-alpha.25',
38
+ '@storybook/core-server': '7.0.0-alpha.25',
39
+ '@storybook/core-webpack': '7.0.0-alpha.25',
40
+ '@storybook/csf-tools': '7.0.0-alpha.25',
41
+ '@storybook/docs-tools': '7.0.0-alpha.25',
42
+ '@storybook/ember': '7.0.0-alpha.25',
43
+ '@storybook/html': '7.0.0-alpha.25',
44
+ '@storybook/html-webpack5': '7.0.0-alpha.25',
45
+ '@storybook/instrumenter': '7.0.0-alpha.25',
46
+ '@storybook/node-logger': '7.0.0-alpha.25',
47
+ '@storybook/postinstall': '7.0.0-alpha.25',
48
+ '@storybook/preact': '7.0.0-alpha.25',
49
+ '@storybook/preact-webpack5': '7.0.0-alpha.25',
50
+ '@storybook/preset-html-webpack': '7.0.0-alpha.25',
51
+ '@storybook/preset-preact-webpack': '7.0.0-alpha.25',
52
+ '@storybook/preset-react-webpack': '7.0.0-alpha.25',
53
+ '@storybook/preset-server-webpack': '7.0.0-alpha.25',
54
+ '@storybook/preset-svelte-webpack': '7.0.0-alpha.25',
55
+ '@storybook/preset-vue-webpack': '7.0.0-alpha.25',
56
+ '@storybook/preset-vue3-webpack': '7.0.0-alpha.25',
57
+ '@storybook/preset-web-components-webpack': '7.0.0-alpha.25',
58
+ '@storybook/preview-web': '7.0.0-alpha.25',
59
+ '@storybook/react': '7.0.0-alpha.25',
60
+ '@storybook/react-vite': '7.0.0-alpha.25',
61
+ '@storybook/react-webpack5': '7.0.0-alpha.25',
62
+ '@storybook/router': '7.0.0-alpha.25',
63
+ '@storybook/server': '7.0.0-alpha.25',
64
+ '@storybook/server-webpack5': '7.0.0-alpha.25',
65
+ '@storybook/source-loader': '7.0.0-alpha.25',
66
+ '@storybook/store': '7.0.0-alpha.25',
67
+ '@storybook/svelte': '7.0.0-alpha.25',
68
+ '@storybook/svelte-webpack5': '7.0.0-alpha.25',
69
+ '@storybook/telemetry': '7.0.0-alpha.25',
70
+ '@storybook/theming': '7.0.0-alpha.25',
71
+ '@storybook/ui': '7.0.0-alpha.25',
72
+ '@storybook/vue': '7.0.0-alpha.25',
73
+ '@storybook/vue-webpack5': '7.0.0-alpha.25',
74
+ '@storybook/vue3': '7.0.0-alpha.25',
75
+ '@storybook/vue3-vite': '7.0.0-alpha.25',
76
+ '@storybook/vue3-webpack5': '7.0.0-alpha.25',
77
+ '@storybook/web-components': '7.0.0-alpha.25',
78
+ '@storybook/web-components-webpack5': '7.0.0-alpha.25',
79
+ sb: '7.0.0-alpha.25',
80
+ storybook: '7.0.0-alpha.25'
78
81
  };
@@ -9,8 +9,8 @@ export declare function detectFrameworkPreset(packageJson?: Partial<Pick<Package
9
9
  */
10
10
  export declare function detectBuilder(packageManager: JsPackageManager): CoreBuilder;
11
11
  export declare function isStorybookInstalled(dependencies: Pick<PackageJson, 'devDependencies'> | false, force?: boolean): false | ProjectType.ALREADY_HAS_STORYBOOK;
12
- export declare function detectLanguage(): SupportedLanguage;
13
- export declare function detect(options?: {
12
+ export declare function detectLanguage(packageJson?: PackageJson): SupportedLanguage;
13
+ export declare function detect(packageJson: PackageJson, options?: {
14
14
  force?: boolean;
15
15
  html?: boolean;
16
16
  }): ProjectType;
@@ -6,15 +6,25 @@ import { PackageJson, PackageJsonWithDepsAndDevDeps } from './PackageJson';
6
6
  * @return A tuple of 2 elements: [packageName, packageVersion]
7
7
  */
8
8
  export declare function getPackageDetails(pkg: string): [string, string?];
9
+ interface JsPackageManagerOptions {
10
+ cwd?: string;
11
+ }
9
12
  export declare abstract class JsPackageManager {
10
13
  abstract readonly type: 'npm' | 'yarn1' | 'yarn2';
11
14
  abstract initPackageJson(): void;
12
15
  abstract getRunStorybookCommand(): string;
13
16
  abstract getRunCommand(command: string): string;
17
+ setRegistryURL(url: string): void;
18
+ getRegistryURL(): string;
19
+ readonly cwd?: string;
20
+ constructor(options?: JsPackageManagerOptions);
14
21
  /**
15
22
  * Install dependencies listed in `package.json`
16
23
  */
17
24
  installDependencies(): void;
25
+ packageJsonPath(): string;
26
+ readPackageJson(): PackageJson;
27
+ writePackageJson(packageJson: PackageJson): void;
18
28
  /**
19
29
  * Read the `package.json` file available in the directory the command was call from
20
30
  * If there is no `package.json` it will create one.
@@ -91,9 +101,11 @@ export declare abstract class JsPackageManager {
91
101
  }): void;
92
102
  addESLintConfig(): void;
93
103
  addScripts(scripts: Record<string, string>): void;
104
+ addPackageResolutions(versions: Record<string, string>): void;
94
105
  protected abstract runInstall(): void;
95
106
  protected abstract runAddDeps(dependencies: string[], installAsDevDependencies: boolean): void;
96
107
  protected abstract runRemoveDeps(dependencies: string[]): void;
108
+ protected abstract getResolutions(packageJson: PackageJson, versions: Record<string, string>): Record<string, any>;
97
109
  /**
98
110
  * Get the latest or all versions of the input package available on npmjs.com
99
111
  *
@@ -103,3 +115,4 @@ export declare abstract class JsPackageManager {
103
115
  protected abstract runGetVersions<T extends boolean>(packageName: string, fetchAllVersions: T): Promise<T extends true ? string[] : string>;
104
116
  executeCommand(command: string, args: string[], stdio?: 'pipe' | 'inherit'): string;
105
117
  }
118
+ export {};
@@ -1,4 +1,4 @@
1
1
  import { JsPackageManager } from './JsPackageManager';
2
2
  export declare class JsPackageManagerFactory {
3
- static getPackageManager(forceNpmUsage?: boolean): JsPackageManager;
3
+ static getPackageManager(forceNpmUsage?: boolean, cwd?: string): JsPackageManager;
4
4
  }
@@ -1,4 +1,5 @@
1
1
  import { JsPackageManager } from './JsPackageManager';
2
+ import type { PackageJson } from './PackageJson';
2
3
  export declare class NPMProxy extends JsPackageManager {
3
4
  readonly type = "npm";
4
5
  installArgs: string[] | undefined;
@@ -12,6 +13,9 @@ export declare class NPMProxy extends JsPackageManager {
12
13
  needsLegacyPeerDeps(version: string): boolean;
13
14
  getInstallArgs(): string[];
14
15
  getUninstallArgs(): string[];
16
+ protected getResolutions(packageJson: PackageJson, versions: Record<string, string>): {
17
+ overrides: any;
18
+ };
15
19
  protected runInstall(): void;
16
20
  protected runAddDeps(dependencies: string[], installAsDevDependencies: boolean): void;
17
21
  protected runRemoveDeps(dependencies: string[]): void;
@@ -1,9 +1,15 @@
1
1
  import { JsPackageManager } from './JsPackageManager';
2
+ import type { PackageJson } from './PackageJson';
2
3
  export declare class Yarn1Proxy extends JsPackageManager {
3
4
  readonly type = "yarn1";
4
5
  initPackageJson(): string;
5
6
  getRunStorybookCommand(): string;
6
7
  getRunCommand(command: string): string;
8
+ protected getResolutions(packageJson: PackageJson, versions: Record<string, string>): {
9
+ resolutions: {
10
+ [x: string]: string;
11
+ };
12
+ };
7
13
  protected runInstall(): void;
8
14
  protected runAddDeps(dependencies: string[], installAsDevDependencies: boolean): void;
9
15
  protected runRemoveDeps(dependencies: string[]): void;
@@ -1,9 +1,15 @@
1
1
  import { JsPackageManager } from './JsPackageManager';
2
+ import type { PackageJson } from './PackageJson';
2
3
  export declare class Yarn2Proxy extends JsPackageManager {
3
4
  readonly type = "yarn2";
4
5
  initPackageJson(): string;
5
6
  getRunStorybookCommand(): string;
6
7
  getRunCommand(command: string): string;
8
+ protected getResolutions(packageJson: PackageJson, versions: Record<string, string>): {
9
+ resolutions: {
10
+ [x: string]: string;
11
+ };
12
+ };
7
13
  protected runInstall(): void;
8
14
  protected runAddDeps(dependencies: string[], installAsDevDependencies: boolean): void;
9
15
  protected runRemoveDeps(dependencies: string[]): void;
@@ -1,4 +1,3 @@
1
1
  export * from './JsPackageManagerFactory';
2
2
  export * from './JsPackageManager';
3
3
  export * from './PackageJson';
4
- export * from './PackageJsonHelper';
@@ -1,22 +1,62 @@
1
1
  declare const _default: {
2
+ readonly 'vue3-vite/default-js': {
3
+ name: string;
4
+ script: string;
5
+ cadence: string[];
6
+ expected: {
7
+ framework: string;
8
+ renderer: string;
9
+ builder: string;
10
+ };
11
+ };
12
+ readonly 'vue3-vite/default-ts': {
13
+ name: string;
14
+ script: string;
15
+ cadence: string[];
16
+ expected: {
17
+ framework: string;
18
+ renderer: string;
19
+ builder: string;
20
+ };
21
+ };
22
+ readonly 'react-vite/default-js': {
23
+ name: string;
24
+ script: string;
25
+ cadence: string[];
26
+ expected: {
27
+ framework: string;
28
+ renderer: string;
29
+ builder: string;
30
+ };
31
+ };
32
+ readonly 'react-vite/default-ts': {
33
+ name: string;
34
+ script: string;
35
+ cadence: string[];
36
+ expected: {
37
+ framework: string;
38
+ renderer: string;
39
+ builder: string;
40
+ };
41
+ };
2
42
  readonly 'cra/default-js': {
3
- readonly name: "Create React App (Javascript)";
4
- readonly script: "npx create-react-app .";
5
- readonly cadence: readonly ["ci", "daily", "weekly"];
6
- readonly expected: {
7
- readonly framework: "@storybook/cra";
8
- readonly renderer: "@storybook/react";
9
- readonly builder: "@storybook/builder-webpack5";
43
+ name: string;
44
+ script: string;
45
+ cadence: string[];
46
+ expected: {
47
+ framework: string;
48
+ renderer: string;
49
+ builder: string;
10
50
  };
11
51
  };
12
52
  readonly 'cra/default-ts': {
13
- readonly name: "Create React App (Typescript)";
14
- readonly script: "npx create-react-app . --template typescript";
15
- readonly cadence: readonly ["ci", "daily", "weekly"];
16
- readonly expected: {
17
- readonly framework: "@storybook/cra";
18
- readonly renderer: "@storybook/react";
19
- readonly builder: "@storybook/builder-webpack5";
53
+ name: string;
54
+ script: string;
55
+ cadence: string[];
56
+ expected: {
57
+ framework: string;
58
+ renderer: string;
59
+ builder: string;
20
60
  };
21
61
  };
22
62
  };
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  '@storybook/api': string;
22
22
  '@storybook/blocks': string;
23
23
  '@storybook/builder-manager': string;
24
+ '@storybook/builder-vite': string;
24
25
  '@storybook/builder-webpack5': string;
25
26
  '@storybook/channel-postmessage': string;
26
27
  '@storybook/channel-websocket': string;
@@ -55,6 +56,7 @@ declare const _default: {
55
56
  '@storybook/preset-web-components-webpack': string;
56
57
  '@storybook/preview-web': string;
57
58
  '@storybook/react': string;
59
+ '@storybook/react-vite': string;
58
60
  '@storybook/react-webpack5': string;
59
61
  '@storybook/router': string;
60
62
  '@storybook/server': string;
@@ -69,6 +71,7 @@ declare const _default: {
69
71
  '@storybook/vue': string;
70
72
  '@storybook/vue-webpack5': string;
71
73
  '@storybook/vue3': string;
74
+ '@storybook/vue3-vite': string;
72
75
  '@storybook/vue3-webpack5': string;
73
76
  '@storybook/web-components': string;
74
77
  '@storybook/web-components-webpack5': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/cli",
3
- "version": "7.0.0-alpha.21",
3
+ "version": "7.0.0-alpha.25",
4
4
  "description": "Storybook's CLI - easiest method of adding storybook to your projects",
5
5
  "keywords": [
6
6
  "cli",
@@ -22,13 +22,6 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "author": "Storybook Team",
25
- "typesVersions": {
26
- "<3.8": {
27
- "*": [
28
- "ts3.4/*"
29
- ]
30
- }
31
- },
32
25
  "bin": {
33
26
  "getstorybook": "./bin/index.js",
34
27
  "sb": "./bin/index.js"
@@ -48,13 +41,13 @@
48
41
  "dependencies": {
49
42
  "@babel/core": "^7.12.10",
50
43
  "@babel/preset-env": "^7.12.11",
51
- "@storybook/codemod": "7.0.0-alpha.21",
52
- "@storybook/core-common": "7.0.0-alpha.21",
53
- "@storybook/core-server": "7.0.0-alpha.21",
54
- "@storybook/csf-tools": "7.0.0-alpha.21",
55
- "@storybook/node-logger": "7.0.0-alpha.21",
44
+ "@storybook/codemod": "7.0.0-alpha.25",
45
+ "@storybook/core-common": "7.0.0-alpha.25",
46
+ "@storybook/core-server": "7.0.0-alpha.25",
47
+ "@storybook/csf-tools": "7.0.0-alpha.25",
48
+ "@storybook/node-logger": "7.0.0-alpha.25",
56
49
  "@storybook/semver": "^7.3.2",
57
- "@storybook/telemetry": "7.0.0-alpha.21",
50
+ "@storybook/telemetry": "7.0.0-alpha.25",
58
51
  "boxen": "^5.1.2",
59
52
  "chalk": "^4.1.0",
60
53
  "commander": "^6.2.1",
@@ -81,7 +74,7 @@
81
74
  "update-notifier": "^5.0.1"
82
75
  },
83
76
  "devDependencies": {
84
- "@storybook/client-api": "7.0.0-alpha.21",
77
+ "@storybook/client-api": "7.0.0-alpha.25",
85
78
  "@types/cross-spawn": "^6.0.2",
86
79
  "@types/degit": "^2.8.3",
87
80
  "@types/prompts": "^2.0.9",
@@ -96,5 +89,5 @@
96
89
  "publishConfig": {
97
90
  "access": "public"
98
91
  },
99
- "gitHead": "d8cdc5b21af68e69c6eefeaae0e1efadd06947ea"
92
+ "gitHead": "058af8bac4892d95fdfe755dedfd826cb4508fdc"
100
93
  }
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.readPackageJson = readPackageJson;
7
- exports.writePackageJson = writePackageJson;
8
-
9
- var _path = _interopRequireDefault(require("path"));
10
-
11
- var _fs = _interopRequireDefault(require("fs"));
12
-
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
- function readPackageJson() {
16
- const packageJsonPath = _path.default.resolve('package.json');
17
-
18
- if (!_fs.default.existsSync(packageJsonPath)) {
19
- throw new Error(`Could not read package.json file at ${packageJsonPath}`);
20
- }
21
-
22
- const jsonContent = _fs.default.readFileSync(packageJsonPath, 'utf8');
23
-
24
- return JSON.parse(jsonContent);
25
- }
26
-
27
- function writePackageJson(packageJson) {
28
- const content = `${JSON.stringify(packageJson, null, 2)}\n`;
29
-
30
- const packageJsonPath = _path.default.resolve('package.json');
31
-
32
- _fs.default.writeFileSync(packageJsonPath, content, 'utf8');
33
- }
@@ -1,17 +0,0 @@
1
- import path from 'path';
2
- import fs from 'fs';
3
- export function readPackageJson() {
4
- const packageJsonPath = path.resolve('package.json');
5
-
6
- if (!fs.existsSync(packageJsonPath)) {
7
- throw new Error(`Could not read package.json file at ${packageJsonPath}`);
8
- }
9
-
10
- const jsonContent = fs.readFileSync(packageJsonPath, 'utf8');
11
- return JSON.parse(jsonContent);
12
- }
13
- export function writePackageJson(packageJson) {
14
- const content = `${JSON.stringify(packageJson, null, 2)}\n`;
15
- const packageJsonPath = path.resolve('package.json');
16
- fs.writeFileSync(packageJsonPath, content, 'utf8');
17
- }
@@ -1,3 +0,0 @@
1
- import type { PackageJson } from '@storybook/core-common';
2
- export declare function readPackageJson(): PackageJson;
3
- export declare function writePackageJson(packageJson: PackageJson): void;