From 8e477597c522c2d808dc31ec9b0d237ddfa8f36d Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 9 May 2023 09:05:16 +0200 Subject: [PATCH 1/8] make sandbox names consistent --- code/lib/cli/src/sandbox-templates.ts | 58 +++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 6b3bc9b96668..c0072ff0f375 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -66,7 +66,7 @@ export type Template = { const baseTemplates = { 'cra/default-js': { - name: 'Create React App (Javascript)', + name: 'Create React App (JavaScript)', script: 'npx create-react-app .', expected: { // TODO: change this to @storybook/cra once that package is created @@ -77,7 +77,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'cra/default-ts': { - name: 'Create React App (Typescript)', + name: 'Create React App (TypeScript)', script: 'npx create-react-app . --template typescript', // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -120,7 +120,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'react-vite/default-js': { - name: 'React Vite (JS)', + name: 'React Vite (JavaScript)', script: 'npm create vite@latest --yes . -- --template react', expected: { framework: '@storybook/react-vite', @@ -130,7 +130,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'react-vite/default-ts': { - name: 'React Vite (TS)', + name: 'React Vite (TypeScript)', script: 'npm create vite@latest --yes . -- --template react-ts', expected: { framework: '@storybook/react-vite', @@ -139,7 +139,7 @@ const baseTemplates = { }, }, 'react-webpack/18-ts': { - name: 'React 18 Webpack5 (TS)', + name: 'React Webpack (TypeScript)', script: 'yarn create webpack5-react .', expected: { framework: '@storybook/react-webpack5', @@ -149,7 +149,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'react-webpack/17-ts': { - name: 'React 17 Webpack5 (TS)', + name: 'React v17 Webpack (TypeScript)', script: 'yarn create webpack5-react . --version-react="17" --version-react-dom="17"', expected: { framework: '@storybook/react-webpack5', @@ -159,7 +159,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'solid-vite/default-js': { - name: 'SolidJS Vite (JS)', + name: 'SolidJS Vite (JavaScript)', script: 'npx degit solidjs/templates/js .', expected: { framework: 'storybook-solidjs-vite', @@ -171,7 +171,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'solid-vite/default-ts': { - name: 'SolidJS Vite (TS)', + name: 'SolidJS Vite (TypeScript)', script: 'npx degit solidjs/templates/ts .', expected: { framework: 'storybook-solidjs-vite', @@ -183,7 +183,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'vue3-vite/default-js': { - name: 'Vue3 Vite (JS)', + name: 'Vue v3 Vite (JavaScript)', script: 'npm create vite@latest --yes . -- --template vue', expected: { framework: '@storybook/vue3-vite', @@ -193,7 +193,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'vue3-vite/default-ts': { - name: 'Vue3 Vite (TS)', + name: 'Vue v3 Vite (TypeScript)', script: 'npm create vite@latest --yes . -- --template vue-ts', expected: { framework: '@storybook/vue3-vite', @@ -203,7 +203,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'vue2-vite/2.7-js': { - name: 'Vue2 Vite (vue 2.7 JS)', + name: 'Vue v2 Vite (JavaScript)', script: 'npx create-vue@2 {{beforeDir}} --default', expected: { framework: '@storybook/vue-vite', @@ -214,7 +214,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'html-webpack/default': { - name: 'HTML Webpack5', + name: 'HTML Webpack', script: 'yarn create webpack5-html .', expected: { framework: '@storybook/html-webpack5', @@ -224,7 +224,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'html-vite/default-js': { - name: 'HTML Vite JS', + name: 'HTML Vite (JavaScript)', script: 'npm create vite@latest --yes . -- --template vanilla && echo "export default {}" > vite.config.js', expected: { @@ -235,7 +235,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'html-vite/default-ts': { - name: 'HTML Vite TS', + name: 'HTML Vite (TypeScript)', script: 'npm create vite@latest --yes . -- --template vanilla-ts && echo "export default {}" > vite.config.js', expected: { @@ -246,7 +246,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-vite/default-js': { - name: 'Svelte Vite (JS)', + name: 'Svelte Vite (JavaScript)', script: 'npm create vite@latest --yes . -- --template svelte', expected: { framework: '@storybook/svelte-vite', @@ -256,7 +256,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-vite/default-ts': { - name: 'Svelte Vite (TS)', + name: 'Svelte Vite (TypeScript)', script: 'npm create vite@latest --yes . -- --template svelte-ts', expected: { framework: '@storybook/svelte-vite', @@ -278,7 +278,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'angular-cli/default-ts': { - name: 'Angular CLI (latest)', + name: 'Angular CLI', script: 'npx -p @angular/cli ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -289,7 +289,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'angular-cli/14-ts': { - name: 'Angular CLI (Version 14)', + name: 'Angular CLI v14', script: 'npx -p @angular/cli@14 ng new angular-v14 --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -300,7 +300,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-kit/skeleton-js': { - name: 'Svelte Kit (JS)', + name: 'SvelteKit (JavaScript)', script: 'yarn create svelte-with-args --name=svelte-kit/skeleton-js --directory=. --template=skeleton --types=null --no-prettier --no-eslint --no-playwright --no-vitest', expected: { @@ -311,7 +311,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-kit/skeleton-ts': { - name: 'Svelte Kit (TS)', + name: 'SvelteKit (TypeScript)', script: 'yarn create svelte-with-args --name=svelte-kit/skeleton-ts --directory=. --template=skeleton --types=typescript --no-prettier --no-eslint --no-playwright --no-vitest', expected: { @@ -322,7 +322,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'lit-vite/default-js': { - name: 'Lit Vite (JS)', + name: 'Lit Vite (JavaScript)', script: 'npm create vite@latest --yes . -- --template lit && echo "export default {}" > vite.config.js', expected: { @@ -334,7 +334,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'lit-vite/default-ts': { - name: 'Lit Vite (TS)', + name: 'Lit Vite (TypeScript)', script: 'npm create vite@latest --yes . -- --template lit-ts && echo "export default {}" > vite.config.js', expected: { @@ -346,7 +346,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'vue-cli/default-js': { - name: 'Vue-CLI (Default JS)', + name: 'Vue v3 CLI (JavaScript)', script: 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge', expected: { framework: '@storybook/vue3-webpack5', @@ -357,7 +357,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'vue-cli/vue2-default-js': { - name: 'Vue-CLI (Vue2 JS)', + name: 'Vue v2 CLI (JavaScript)', script: 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge --preset="Default (Vue 2)"', expected: { @@ -369,7 +369,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'preact-webpack5/default-js': { - name: 'Preact CLI (Default JS)', + name: 'Preact CLI (JavaScript)', script: 'npx preact-cli create default {{beforeDir}} --name preact-app --yarn --no-install', expected: { framework: '@storybook/preact-webpack5', @@ -379,7 +379,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'preact-webpack5/default-ts': { - name: 'Preact CLI (Default TS)', + name: 'Preact CLI (TypeScript)', script: 'npx preact-cli create typescript {{beforeDir}} --name preact-app --yarn --no-install', expected: { framework: '@storybook/preact-webpack5', @@ -389,7 +389,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'preact-vite/default-js': { - name: 'Preact Vite (JS)', + name: 'Preact Vite (JavaScript)', script: 'npm create vite@latest --yes . -- --template preact', expected: { framework: '@storybook/preact-vite', @@ -399,7 +399,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'preact-vite/default-ts': { - name: 'Preact Vite (TS)', + name: 'Preact Vite (TypeScript)', script: 'npm create vite@latest --yes . -- --template preact-ts', expected: { framework: '@storybook/preact-vite', @@ -409,7 +409,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'qwik-vite/default-ts': { - name: 'Qwik CLI (Default TS)', + name: 'Qwik CLI (TypeScript)', script: 'yarn create qwik basic {{beforeDir}} --no-install', // TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. inDevelopment: true, From 9e9458cc02a4da8fbdf03e821c2f918444ce17eb Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 10 May 2023 13:37:11 +0200 Subject: [PATCH 2/8] other sandbox naming scheme --- code/lib/cli/src/sandbox-templates.ts | 69 ++++++++++++++------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index c0072ff0f375..ae7be781c769 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -13,6 +13,11 @@ export type Cadence = keyof typeof templatesByCadence; export type Template = { /** * Readable name for the template, which will be used for feedback and the status page + * Follows the naming scheme when it makes sense: + * [- ] (JS|TS) + * React Latest - Webpack (TS) + * Next.js v12 (JS) + * Angular CLI Prerelease */ name: string; /** @@ -66,7 +71,7 @@ export type Template = { const baseTemplates = { 'cra/default-js': { - name: 'Create React App (JavaScript)', + name: 'Create React App Latest (JS)', script: 'npx create-react-app .', expected: { // TODO: change this to @storybook/cra once that package is created @@ -77,7 +82,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'cra/default-ts': { - name: 'Create React App (TypeScript)', + name: 'Create React App Latest (TS)', script: 'npx create-react-app . --template typescript', // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test'], @@ -89,7 +94,7 @@ const baseTemplates = { }, }, 'nextjs/12-js': { - name: 'Next.js v12 (JavaScript)', + name: 'Next.js v12 (JS)', script: 'yarn create next-app {{beforeDir}} -e https://github.com/vercel/next.js/tree/next-12-3-2/examples/hello-world && cd {{beforeDir}} && npm pkg set "dependencies.next"="^12.2.0" && yarn && git add . && git commit --amend --no-edit && cd ..', expected: { @@ -100,7 +105,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'nextjs/default-js': { - name: 'Next.js (JavaScript)', + name: 'Next.js Latest (JS)', script: 'yarn create next-app {{beforeDir}} --javascript --eslint', expected: { framework: '@storybook/nextjs', @@ -110,7 +115,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'nextjs/default-ts': { - name: 'Next.js (TypeScript)', + name: 'Next.js Latest (TS)', script: 'yarn create next-app {{beforeDir}} --typescript --eslint', expected: { framework: '@storybook/nextjs', @@ -120,7 +125,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'react-vite/default-js': { - name: 'React Vite (JavaScript)', + name: 'React Vite (JS)', script: 'npm create vite@latest --yes . -- --template react', expected: { framework: '@storybook/react-vite', @@ -130,7 +135,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'react-vite/default-ts': { - name: 'React Vite (TypeScript)', + name: 'React Latest - Vite (TS)', script: 'npm create vite@latest --yes . -- --template react-ts', expected: { framework: '@storybook/react-vite', @@ -139,7 +144,7 @@ const baseTemplates = { }, }, 'react-webpack/18-ts': { - name: 'React Webpack (TypeScript)', + name: 'React Latest - Webpack (TS)', script: 'yarn create webpack5-react .', expected: { framework: '@storybook/react-webpack5', @@ -149,7 +154,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'react-webpack/17-ts': { - name: 'React v17 Webpack (TypeScript)', + name: 'React v17 - Webpack (TS)', script: 'yarn create webpack5-react . --version-react="17" --version-react-dom="17"', expected: { framework: '@storybook/react-webpack5', @@ -159,7 +164,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'solid-vite/default-js': { - name: 'SolidJS Vite (JavaScript)', + name: 'SolidJS Latest - Vite (JS)', script: 'npx degit solidjs/templates/js .', expected: { framework: 'storybook-solidjs-vite', @@ -171,7 +176,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'solid-vite/default-ts': { - name: 'SolidJS Vite (TypeScript)', + name: 'SolidJS Latest - Vite (TS)', script: 'npx degit solidjs/templates/ts .', expected: { framework: 'storybook-solidjs-vite', @@ -183,7 +188,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'vue3-vite/default-js': { - name: 'Vue v3 Vite (JavaScript)', + name: 'Vue v3 - Vite (JS)', script: 'npm create vite@latest --yes . -- --template vue', expected: { framework: '@storybook/vue3-vite', @@ -193,7 +198,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'vue3-vite/default-ts': { - name: 'Vue v3 Vite (TypeScript)', + name: 'Vue v3 - Vite (TS)', script: 'npm create vite@latest --yes . -- --template vue-ts', expected: { framework: '@storybook/vue3-vite', @@ -203,7 +208,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'vue2-vite/2.7-js': { - name: 'Vue v2 Vite (JavaScript)', + name: 'Vue v2 - Vite (JS)', script: 'npx create-vue@2 {{beforeDir}} --default', expected: { framework: '@storybook/vue-vite', @@ -214,7 +219,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'html-webpack/default': { - name: 'HTML Webpack', + name: 'HTML - Webpack', script: 'yarn create webpack5-html .', expected: { framework: '@storybook/html-webpack5', @@ -224,7 +229,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'html-vite/default-js': { - name: 'HTML Vite (JavaScript)', + name: 'HTML - Vite (JS)', script: 'npm create vite@latest --yes . -- --template vanilla && echo "export default {}" > vite.config.js', expected: { @@ -235,7 +240,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'html-vite/default-ts': { - name: 'HTML Vite (TypeScript)', + name: 'HTML - Vite (TS)', script: 'npm create vite@latest --yes . -- --template vanilla-ts && echo "export default {}" > vite.config.js', expected: { @@ -246,7 +251,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-vite/default-js': { - name: 'Svelte Vite (JavaScript)', + name: 'Svelte Latest - Vite (JS)', script: 'npm create vite@latest --yes . -- --template svelte', expected: { framework: '@storybook/svelte-vite', @@ -256,7 +261,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-vite/default-ts': { - name: 'Svelte Vite (TypeScript)', + name: 'Svelte Latest - Vite (TS)', script: 'npm create vite@latest --yes . -- --template svelte-ts', expected: { framework: '@storybook/svelte-vite', @@ -267,7 +272,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'angular-cli/prerelease': { - name: 'Angular CLI (Prerelease)', + name: 'Angular CLI Prerelease', script: 'npx -p @angular/cli@next ng new angular-v16 --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -278,7 +283,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'angular-cli/default-ts': { - name: 'Angular CLI', + name: 'Angular CLI Latest', script: 'npx -p @angular/cli ng new angular-latest --directory . --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -300,7 +305,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-kit/skeleton-js': { - name: 'SvelteKit (JavaScript)', + name: 'SvelteKit Latest (JS)', script: 'yarn create svelte-with-args --name=svelte-kit/skeleton-js --directory=. --template=skeleton --types=null --no-prettier --no-eslint --no-playwright --no-vitest', expected: { @@ -311,7 +316,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'svelte-kit/skeleton-ts': { - name: 'SvelteKit (TypeScript)', + name: 'SvelteKit Latest (TS)', script: 'yarn create svelte-with-args --name=svelte-kit/skeleton-ts --directory=. --template=skeleton --types=typescript --no-prettier --no-eslint --no-playwright --no-vitest', expected: { @@ -322,7 +327,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'lit-vite/default-js': { - name: 'Lit Vite (JavaScript)', + name: 'Lit Latest - Vite (JS)', script: 'npm create vite@latest --yes . -- --template lit && echo "export default {}" > vite.config.js', expected: { @@ -334,7 +339,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'lit-vite/default-ts': { - name: 'Lit Vite (TypeScript)', + name: 'Lit Latest - Vite (TS)', script: 'npm create vite@latest --yes . -- --template lit-ts && echo "export default {}" > vite.config.js', expected: { @@ -346,7 +351,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'vue-cli/default-js': { - name: 'Vue v3 CLI (JavaScript)', + name: 'Vue v3 CLI (JS)', script: 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge', expected: { framework: '@storybook/vue3-webpack5', @@ -357,7 +362,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'vue-cli/vue2-default-js': { - name: 'Vue v2 CLI (JavaScript)', + name: 'Vue v2 CLI (JS)', script: 'npx -p @vue/cli vue create . --default --packageManager=yarn --force --merge --preset="Default (Vue 2)"', expected: { @@ -369,7 +374,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev'], }, 'preact-webpack5/default-js': { - name: 'Preact CLI (JavaScript)', + name: 'Preact Latest CLI (JS)', script: 'npx preact-cli create default {{beforeDir}} --name preact-app --yarn --no-install', expected: { framework: '@storybook/preact-webpack5', @@ -379,7 +384,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'preact-webpack5/default-ts': { - name: 'Preact CLI (TypeScript)', + name: 'Preact Latest CLI (TS)', script: 'npx preact-cli create typescript {{beforeDir}} --name preact-app --yarn --no-install', expected: { framework: '@storybook/preact-webpack5', @@ -389,7 +394,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'preact-vite/default-js': { - name: 'Preact Vite (JavaScript)', + name: 'Preact Latest - Vite (JS)', script: 'npm create vite@latest --yes . -- --template preact', expected: { framework: '@storybook/preact-vite', @@ -399,7 +404,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'preact-vite/default-ts': { - name: 'Preact Vite (TypeScript)', + name: 'Preact Latest - Vite (TS)', script: 'npm create vite@latest --yes . -- --template preact-ts', expected: { framework: '@storybook/preact-vite', @@ -409,7 +414,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev'], }, 'qwik-vite/default-ts': { - name: 'Qwik CLI (TypeScript)', + name: 'Qwik Latest CLI (TS)', script: 'yarn create qwik basic {{beforeDir}} --no-install', // TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. inDevelopment: true, From cf42d9775776e8b23a1df31bd8f3054d992e3116 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Tue, 29 Aug 2023 12:49:56 +0200 Subject: [PATCH 3/8] add strict type to name --- code/lib/cli/src/sandbox-templates.ts | 34 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index f4332722424e..4a2656d4c6fd 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -19,7 +19,7 @@ export type Template = { /** * Readable name for the template, which will be used for feedback and the status page * Follows the naming scheme when it makes sense: - * [- ] (JS|TS) + * <"v"version|"Latest"|"Prerelease"> [- ](JS|TS) * React Latest - Webpack (TS) * Next.js v12 (JS) * Angular CLI Prerelease @@ -76,6 +76,12 @@ export type Template = { isInternal?: boolean; }; +type BaseTemplates = Template & { + name: `${string} ${`v${number}` | 'Latest' | 'Prerelease'} ${`- ${string} ` | ''}(${ + | 'JS' + | 'TS'})`; +}; + const baseTemplates = { 'cra/default-js': { name: 'Create React App Latest (JS)', @@ -132,7 +138,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'react-vite/default-js': { - name: 'React Vite (JS)', + name: 'React Latest - Vite (JS)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template react', expected: { framework: '@storybook/react-vite', @@ -228,7 +234,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'html-webpack/default': { - name: 'HTML - Webpack', + name: 'HTML Latest - Webpack (JS)', script: 'yarn create webpack5-html {{beforeDir}}', expected: { framework: '@storybook/html-webpack5', @@ -238,7 +244,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'html-vite/default-js': { - name: 'HTML - Vite (JS)', + name: 'HTML Latest - Vite (JS)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template vanilla && cd {{beforeDir}} && echo "export default {}" > vite.config.js', expected: { @@ -249,7 +255,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'html-vite/default-ts': { - name: 'HTML - Vite (TS)', + name: 'HTML Latest - Vite (TS)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template vanilla-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js', expected: { @@ -281,7 +287,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'angular-cli/prerelease': { - name: 'Angular CLI Prerelease', + name: 'Angular CLI Prerelease (TS)', script: 'npx -p @angular/cli@next ng new angular-v16 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -292,7 +298,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'angular-cli/default-ts': { - name: 'Angular CLI Latest', + name: 'Angular CLI Latest (TS)', script: 'npx -p @angular/cli ng new angular-latest --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -303,7 +309,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'angular-cli/15-ts': { - name: 'Angular CLI v15', + name: 'Angular CLI v15 (TS)', script: 'npx -p @angular/cli@15 ng new angular-v15 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -360,7 +366,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'vue-cli/default-js': { - name: 'Vue v3 CLI (JS)', + name: 'Vue v3 - CLI (JS)', script: 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -372,7 +378,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'vue-cli/vue2-default-js': { - name: 'Vue v2 CLI (JS)', + name: 'Vue v2 - CLI (JS)', script: 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge --preset="Default (Vue 2)" && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -384,7 +390,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'preact-webpack5/default-js': { - name: 'Preact Latest CLI (JS)', + name: 'Preact Latest - CLI (JS)', script: 'npx preact-cli create default {{beforeDir}} --name preact-app --yarn --no-install && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -395,7 +401,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'preact-webpack5/default-ts': { - name: 'Preact Latest CLI (TS)', + name: 'Preact Latest - CLI (TS)', script: 'npx preact-cli create typescript {{beforeDir}} --name preact-app --yarn --no-install && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -426,7 +432,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'qwik-vite/default-ts': { - name: 'Qwik Latest CLI (TS)', + name: 'Qwik Latest - CLI (TS)', script: 'yarn create qwik basic {{beforeDir}}', // TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. inDevelopment: true, @@ -438,7 +444,7 @@ const baseTemplates = { // TODO: The community template does not provide standard stories, which is required for e2e tests. skipTasks: ['e2e-tests', 'e2e-tests-dev', 'bench'], }, -} satisfies Record; +} satisfies Record; /** * Internal templates reuse config from other templates and add extra config on top. From 148c524edf18135c928b8d165605c63f17c546ab Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 30 Aug 2023 08:59:11 +0200 Subject: [PATCH 4/8] change name template --- code/lib/cli/src/sandbox-templates.ts | 72 +++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index 4a2656d4c6fd..ba040e993b69 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -77,14 +77,14 @@ export type Template = { }; type BaseTemplates = Template & { - name: `${string} ${`v${number}` | 'Latest' | 'Prerelease'} ${`- ${string} ` | ''}(${ - | 'JS' - | 'TS'})`; + name: `${string} ${`v${number}` | 'Latest' | 'Prerelease'} (${'Webpack' | 'Vite'} | ${ + | 'JavaScript' + | 'TypeScript'})`; }; const baseTemplates = { 'cra/default-js': { - name: 'Create React App Latest (JS)', + name: 'Create React App Latest (Webpack | JavaScript)', script: 'npx create-react-app {{beforeDir}}', expected: { // TODO: change this to @storybook/cra once that package is created @@ -95,7 +95,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'cra/default-ts': { - name: 'Create React App Latest (TS)', + name: 'Create React App Latest (Webpack | TypeScript)', script: 'npx create-react-app {{beforeDir}} --template typescript', // Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed. skipTasks: ['smoke-test', 'bench'], @@ -107,7 +107,7 @@ const baseTemplates = { }, }, 'nextjs/12-js': { - name: 'Next.js v12 (JS)', + name: 'Next.js v12 (Webpack | JavaScript)', script: 'yarn create next-app {{beforeDir}} -e https://github.com/vercel/next.js/tree/next-12-3-2/examples/hello-world && cd {{beforeDir}} && npm pkg set "dependencies.next"="^12.2.0" && yarn && git add . && git commit --amend --no-edit && cd ..', expected: { @@ -118,7 +118,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'nextjs/default-js': { - name: 'Next.js Latest (JS)', + name: 'Next.js Latest (Webpack | JavaScript)', script: 'yarn create next-app {{beforeDir}} --javascript --eslint', expected: { framework: '@storybook/nextjs', @@ -128,7 +128,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'nextjs/default-ts': { - name: 'Next.js Latest (TS)', + name: 'Next.js Latest (Webpack | TypeScript)', script: 'yarn create next-app {{beforeDir}} --typescript --eslint', expected: { framework: '@storybook/nextjs', @@ -138,7 +138,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'react-vite/default-js': { - name: 'React Latest - Vite (JS)', + name: 'React Latest (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template react', expected: { framework: '@storybook/react-vite', @@ -148,7 +148,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'react-vite/default-ts': { - name: 'React Latest - Vite (TS)', + name: 'React Latest (Vite | TypeScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template react-ts', expected: { framework: '@storybook/react-vite', @@ -158,7 +158,7 @@ const baseTemplates = { skipTasks: ['bench'], }, 'react-webpack/18-ts': { - name: 'React Latest - Webpack (TS)', + name: 'React Latest (Webpack | TypeScript)', script: 'yarn create webpack5-react {{beforeDir}}', expected: { framework: '@storybook/react-webpack5', @@ -168,7 +168,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'react-webpack/17-ts': { - name: 'React v17 - Webpack (TS)', + name: 'React v17 (Webpack | TypeScript)', script: 'yarn create webpack5-react {{beforeDir}} --version-react="17" --version-react-dom="17"', expected: { @@ -179,7 +179,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'solid-vite/default-js': { - name: 'SolidJS Latest - Vite (JS)', + name: 'SolidJS Latest (Vite | JavaScript)', script: 'npx degit solidjs/templates/js {{beforeDir}}', expected: { framework: 'storybook-solidjs-vite', @@ -191,7 +191,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'solid-vite/default-ts': { - name: 'SolidJS Latest - Vite (TS)', + name: 'SolidJS Latest (Vite | TypeScript)', script: 'npx degit solidjs/templates/ts {{beforeDir}}', expected: { framework: 'storybook-solidjs-vite', @@ -203,7 +203,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'vue3-vite/default-js': { - name: 'Vue v3 - Vite (JS)', + name: 'Vue v3 (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template vue', expected: { framework: '@storybook/vue3-vite', @@ -213,7 +213,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'vue3-vite/default-ts': { - name: 'Vue v3 - Vite (TS)', + name: 'Vue v3 (Vite | TypeScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template vue-ts', expected: { framework: '@storybook/vue3-vite', @@ -223,7 +223,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'vue2-vite/2.7-js': { - name: 'Vue v2 - Vite (JS)', + name: 'Vue v2 (Vite | JavaScript)', script: 'npx create-vue@2 {{beforeDir}} --default', expected: { framework: '@storybook/vue-vite', @@ -234,7 +234,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'html-webpack/default': { - name: 'HTML Latest - Webpack (JS)', + name: 'HTML Latest (Webpack | JavaScript)', script: 'yarn create webpack5-html {{beforeDir}}', expected: { framework: '@storybook/html-webpack5', @@ -244,7 +244,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'html-vite/default-js': { - name: 'HTML Latest - Vite (JS)', + name: 'HTML Latest (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template vanilla && cd {{beforeDir}} && echo "export default {}" > vite.config.js', expected: { @@ -255,7 +255,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'html-vite/default-ts': { - name: 'HTML Latest - Vite (TS)', + name: 'HTML Latest (Vite | TypeScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template vanilla-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js', expected: { @@ -266,7 +266,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'svelte-vite/default-js': { - name: 'Svelte Latest - Vite (JS)', + name: 'Svelte Latest (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template svelte', expected: { framework: '@storybook/svelte-vite', @@ -276,7 +276,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'svelte-vite/default-ts': { - name: 'Svelte Latest - Vite (TS)', + name: 'Svelte Latest (Vite | TypeScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template svelte-ts', expected: { framework: '@storybook/svelte-vite', @@ -287,7 +287,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'angular-cli/prerelease': { - name: 'Angular CLI Prerelease (TS)', + name: 'Angular CLI Prerelease (Webpack | TypeScript)', script: 'npx -p @angular/cli@next ng new angular-v16 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -298,7 +298,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'angular-cli/default-ts': { - name: 'Angular CLI Latest (TS)', + name: 'Angular CLI Latest (Webpack | TypeScript)', script: 'npx -p @angular/cli ng new angular-latest --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -309,7 +309,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'angular-cli/15-ts': { - name: 'Angular CLI v15 (TS)', + name: 'Angular CLI v15 (Webpack | TypeScript)', script: 'npx -p @angular/cli@15 ng new angular-v15 --directory {{beforeDir}} --routing=true --minimal=true --style=scss --strict --skip-git --skip-install --package-manager=yarn', expected: { @@ -320,7 +320,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'svelte-kit/skeleton-js': { - name: 'SvelteKit Latest (JS)', + name: 'SvelteKit Latest (Vite | JavaScript)', script: 'yarn create svelte-with-args --name=svelte-kit/skeleton-js --directory={{beforeDir}} --template=skeleton --types=null --no-prettier --no-eslint --no-playwright --no-vitest', expected: { @@ -331,7 +331,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'svelte-kit/skeleton-ts': { - name: 'SvelteKit Latest (TS)', + name: 'SvelteKit Latest (Vite | TypeScript)', script: 'yarn create svelte-with-args --name=svelte-kit/skeleton-ts --directory={{beforeDir}} --template=skeleton --types=typescript --no-prettier --no-eslint --no-playwright --no-vitest', expected: { @@ -342,7 +342,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'lit-vite/default-js': { - name: 'Lit Latest - Vite (JS)', + name: 'Lit Latest (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template lit && cd {{beforeDir}} && echo "export default {}" > vite.config.js', expected: { @@ -354,7 +354,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'lit-vite/default-ts': { - name: 'Lit Latest - Vite (TS)', + name: 'Lit Latest (Vite | TypeScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template lit-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js', expected: { @@ -366,7 +366,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'vue-cli/default-js': { - name: 'Vue v3 - CLI (JS)', + name: 'Vue CLI v3 (Webpack | JavaScript)', script: 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -378,7 +378,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'vue-cli/vue2-default-js': { - name: 'Vue v2 - CLI (JS)', + name: 'Vue CLI v2 (Webpack | JavaScript)', script: 'npx -p @vue/cli vue create {{beforeDir}} --default --packageManager=yarn --force --merge --preset="Default (Vue 2)" && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -390,7 +390,7 @@ const baseTemplates = { skipTasks: ['smoke-test', 'e2e-tests-dev', 'bench'], }, 'preact-webpack5/default-js': { - name: 'Preact Latest - CLI (JS)', + name: 'Preact CLI Latest (Webpack | JavaScript)', script: 'npx preact-cli create default {{beforeDir}} --name preact-app --yarn --no-install && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -401,7 +401,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'preact-webpack5/default-ts': { - name: 'Preact Latest - CLI (TS)', + name: 'Preact CLI Latest (Webpack | TypeScript)', script: 'npx preact-cli create typescript {{beforeDir}} --name preact-app --yarn --no-install && cd {{beforeDir}} && echo "module.exports = {}" > webpack.config.js', expected: { @@ -412,7 +412,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'preact-vite/default-js': { - name: 'Preact Latest - Vite (JS)', + name: 'Preact Latest (Vite | JavaScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template preact', expected: { framework: '@storybook/preact-vite', @@ -422,7 +422,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'preact-vite/default-ts': { - name: 'Preact Latest - Vite (TS)', + name: 'Preact Latest (Vite | TypeScript)', script: 'npm create vite@latest --yes {{beforeDir}} -- --template preact-ts', expected: { framework: '@storybook/preact-vite', @@ -432,7 +432,7 @@ const baseTemplates = { skipTasks: ['e2e-tests-dev', 'bench'], }, 'qwik-vite/default-ts': { - name: 'Qwik Latest - CLI (TS)', + name: 'Qwik CLI Latest (Vite | TypeScript)', script: 'yarn create qwik basic {{beforeDir}}', // TODO: The community template does not provide standard stories, which is required for e2e tests. Reenable once it does. inDevelopment: true, From 3eec835f8c0710a17b8ca4fa91501671e443e6f4 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Wed, 30 Aug 2023 10:24:54 +0200 Subject: [PATCH 5/8] update template comment --- code/lib/cli/src/sandbox-templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/cli/src/sandbox-templates.ts b/code/lib/cli/src/sandbox-templates.ts index ba040e993b69..9d06a8054953 100644 --- a/code/lib/cli/src/sandbox-templates.ts +++ b/code/lib/cli/src/sandbox-templates.ts @@ -19,7 +19,7 @@ export type Template = { /** * Readable name for the template, which will be used for feedback and the status page * Follows the naming scheme when it makes sense: - * <"v"version|"Latest"|"Prerelease"> [- ](JS|TS) + * <"v"version|"Latest"|"Prerelease"> (<"Webpack"|"Vite"> | <"JavaScript"|"TypeScript">) * React Latest - Webpack (TS) * Next.js v12 (JS) * Angular CLI Prerelease From 2e9e19afc0f46d37eb9a0a2762b864ba8287ecc4 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 1 Sep 2023 10:55:09 +0200 Subject: [PATCH 6/8] add cjs entrypoints to errors in core events --- code/lib/core-events/manager-errors.js | 4 ++++ code/lib/core-events/preview-errors.js | 4 ++++ code/lib/core-events/server-errors.js | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 code/lib/core-events/manager-errors.js create mode 100644 code/lib/core-events/preview-errors.js create mode 100644 code/lib/core-events/server-errors.js diff --git a/code/lib/core-events/manager-errors.js b/code/lib/core-events/manager-errors.js new file mode 100644 index 000000000000..6a1ce1522c1b --- /dev/null +++ b/code/lib/core-events/manager-errors.js @@ -0,0 +1,4 @@ +// This is required for projects that require paths such as `@storybook/core-events/manager-errors` +// but in CJS, while not in ESM mode. Else an error like this will occur: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/manager-errors.js' +module.exports = require('./dist/errors/manager-errors'); diff --git a/code/lib/core-events/preview-errors.js b/code/lib/core-events/preview-errors.js new file mode 100644 index 000000000000..a98055ba796d --- /dev/null +++ b/code/lib/core-events/preview-errors.js @@ -0,0 +1,4 @@ +// This is required for projects that require paths such as `@storybook/core-events/preview-errors` +// but in CJS, while not in ESM mode. Else an error like this will occur: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/preview-errors.js' +module.exports = require('./dist/errors/preview-errors'); diff --git a/code/lib/core-events/server-errors.js b/code/lib/core-events/server-errors.js new file mode 100644 index 000000000000..5f4eb31a408c --- /dev/null +++ b/code/lib/core-events/server-errors.js @@ -0,0 +1,4 @@ +// This is required for projects that require paths such as `@storybook/core-events/server-errors` +// but in CJS, while not in ESM mode. Else an error like this will occur: +// ENOENT: no such file or directory, open '/xyz/node_modules/@storybook/core-events/server-errors.js' +module.exports = require('./dist/errors/server-errors'); From abd016e1e583fe5be5b8efd9a7b1e49544899f70 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Sun, 3 Sep 2023 21:42:57 +0200 Subject: [PATCH 7/8] add missing dependencies to core-common and cli --- code/lib/cli/package.json | 1 + code/lib/core-common/package.json | 1 + code/yarn.lock | 2 ++ 3 files changed, 4 insertions(+) diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 38a136285283..a3a5895bebce 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -61,6 +61,7 @@ "@ndelangen/get-tarball": "^3.0.7", "@storybook/codemod": "workspace:*", "@storybook/core-common": "workspace:*", + "@storybook/core-events": "workspace:*", "@storybook/core-server": "workspace:*", "@storybook/csf-tools": "workspace:*", "@storybook/node-logger": "workspace:*", diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index 3f216815b6db..c9b88741b60f 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -44,6 +44,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { + "@storybook/core-events": "workspace:*", "@storybook/node-logger": "workspace:*", "@storybook/types": "workspace:*", "@types/find-cache-dir": "^3.2.1", diff --git a/code/yarn.lock b/code/yarn.lock index 499d41bb6fc0..3969bd8d5185 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6560,6 +6560,7 @@ __metadata: "@storybook/client-api": "workspace:*" "@storybook/codemod": "workspace:*" "@storybook/core-common": "workspace:*" + "@storybook/core-events": "workspace:*" "@storybook/core-server": "workspace:*" "@storybook/csf-tools": "workspace:*" "@storybook/node-logger": "workspace:*" @@ -6708,6 +6709,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/core-common@workspace:lib/core-common" dependencies: + "@storybook/core-events": "workspace:*" "@storybook/node-logger": "workspace:*" "@storybook/types": "workspace:*" "@types/find-cache-dir": ^3.2.1 From ac2d8b23c9220687bb0541cb3205a0c113b8e505 Mon Sep 17 00:00:00 2001 From: storybook-bot <32066757+storybook-bot@users.noreply.github.com> Date: Mon, 4 Sep 2023 00:44:06 +0000 Subject: [PATCH 8/8] Write changelog for 7.5.0-alpha.1 --- CHANGELOG.prerelease.md | 4 ++++ code/package.json | 3 ++- docs/versions/next.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index 244983a576c0..cd2a36896cbb 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,7 @@ +## 7.5.0-alpha.1 + +- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)! + ## 7.5.0-alpha.0 - Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)! diff --git a/code/package.json b/code/package.json index eaa2b1cde6eb..ee30e334f9de 100644 --- a/code/package.json +++ b/code/package.json @@ -327,5 +327,6 @@ "Dependency Upgrades" ] ] - } + }, + "deferredNextVersion": "7.5.0-alpha.1" } diff --git a/docs/versions/next.json b/docs/versions/next.json index 93bfe5e23009..739652e36af9 100644 --- a/docs/versions/next.json +++ b/docs/versions/next.json @@ -1 +1 @@ -{"version":"7.5.0-alpha.0","info":{"plain":"- Addon API: Improve the updateStatus API - [#24007](https://github.com/storybookjs/storybook/pull/24007), thanks [@ndelangen](https://github.com/ndelangen)!\n- CLI: Add more information to `storybook info` command - [#24003](https://github.com/storybookjs/storybook/pull/24003), thanks [@JReinhold](https://github.com/JReinhold)!\n- CLI: Add uncaughtException handler - [#24018](https://github.com/storybookjs/storybook/pull/24018), thanks [@yannbf](https://github.com/yannbf)!\n- CLI: Remove random commas in storybook upgrade logs - [#22333](https://github.com/storybookjs/storybook/pull/22333), thanks [@joaonunomota](https://github.com/joaonunomota)!\n- Doc Blocks: Add `title` to `Meta` prop types - [#23370](https://github.com/storybookjs/storybook/pull/23370), thanks [@iqbalcodes6602](https://github.com/iqbalcodes6602)!\n- Docs: Fix TOC import - [#24047](https://github.com/storybookjs/storybook/pull/24047), thanks [@shilman](https://github.com/shilman)!\n- Docs: Fix table of contents scroll behavior - [#23986](https://github.com/storybookjs/storybook/pull/23986), thanks [@almoghaimo](https://github.com/almoghaimo)!\n- Telemetry: Filter addon options to protect sensitive info - [#24000](https://github.com/storybookjs/storybook/pull/24000), thanks [@shilman](https://github.com/shilman)!\n- Types: Remove `@types/react` dep from `@storybook/types` - [#24042](https://github.com/storybookjs/storybook/pull/24042), thanks [@JReinhold](https://github.com/JReinhold)!"}} +{"version":"7.5.0-alpha.1","info":{"plain":"- Core: Add CJS entrypoints to errors in core events - [#24038](https://github.com/storybookjs/storybook/pull/24038), thanks [@yannbf](https://github.com/yannbf)!"}}