Skip to content

Commit

Permalink
Merge pull request #24499 from storybookjs/version-patch-from-7.5.0
Browse files Browse the repository at this point in the history
Release: Patch 7.5.1
  • Loading branch information
ndelangen authored Oct 19, 2023
2 parents abdf20b + 31cc277 commit e38a5b3
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18
18.18.2
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 7.5.1

- Angular: update wrong type for webpackStatsJson in start-storybook schema.json - [#24494](https://github.com/storybookjs/storybook/pull/24494), thanks [@LucaVazz](https://github.com/LucaVazz)!
- Themes: Run postinstall in shell for windows - [#24389](https://github.com/storybookjs/storybook/pull/24389), thanks [@Integrayshaun](https://github.com/Integrayshaun)!

## 7.5.0

Storybook 7.5 enhances your Storybook experience with several key updates:
Expand Down
21 changes: 14 additions & 7 deletions code/addons/themes/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
const { spawn } = require('child_process');

const PACKAGE_MANAGER_TO_COMMAND = {
npm: 'npx',
yarn1: 'npx',
yarn2: 'yarn dlx',
pnpm: 'pnpm dlx',
npm: ['npx'],
pnpm: ['pnpm', 'dlx'],
yarn1: ['npx'],
yarn2: ['yarn', 'dlx'],
};

module.exports = function postinstall(options) {
const command = PACKAGE_MANAGER_TO_COMMAND[options.packageManager];
const selectPackageManagerCommand = (packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager];

spawn(command, ['@storybook/auto-config', 'themes'], {
const spawnPackageManagerScript = async (packageManager, args) => {
const [command, ...baseArgs] = selectPackageManagerCommand(packageManager);

await spawn(command, [...baseArgs, ...args], {
stdio: 'inherit',
cwd: process.cwd(),
shell: true,
});
};

module.exports = async function postinstall({ packageManager = 'npm' }) {
await spawnPackageManagerScript(packageManager, ['@storybook/auto-config', 'themes']);
};
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"description": "URL path to be appended when visiting Storybook for the first time"
},
"webpackStatsJson": {
"type": "string",
"type": ["boolean", "string"],
"description": "Write Webpack Stats JSON to disk",
"default": false
},
Expand Down
24 changes: 12 additions & 12 deletions code/lib/cli/src/sandbox-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const baseTemplates = {
},
'react-vite/default-js': {
name: 'React Latest (Vite | JavaScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template react',
script: 'npm create vite --yes {{beforeDir}} -- --template react',
expected: {
framework: '@storybook/react-vite',
renderer: '@storybook/react',
Expand All @@ -160,7 +160,7 @@ const baseTemplates = {
},
'react-vite/default-ts': {
name: 'React Latest (Vite | TypeScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template react-ts',
script: 'npm create vite --yes {{beforeDir}} -- --template react-ts',
expected: {
framework: '@storybook/react-vite',
renderer: '@storybook/react',
Expand Down Expand Up @@ -215,7 +215,7 @@ const baseTemplates = {
},
'vue3-vite/default-js': {
name: 'Vue v3 (Vite | JavaScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template vue',
script: 'npm create vite --yes {{beforeDir}} -- --template vue',
expected: {
framework: '@storybook/vue3-vite',
renderer: '@storybook/vue3',
Expand All @@ -225,7 +225,7 @@ const baseTemplates = {
},
'vue3-vite/default-ts': {
name: 'Vue v3 (Vite | TypeScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template vue-ts',
script: 'npm create vite --yes {{beforeDir}} -- --template vue-ts',
expected: {
framework: '@storybook/vue3-vite',
renderer: '@storybook/vue3',
Expand Down Expand Up @@ -257,7 +257,7 @@ const baseTemplates = {
'html-vite/default-js': {
name: 'HTML Latest (Vite | JavaScript)',
script:
'npm create vite@beta --yes {{beforeDir}} -- --template vanilla && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
'npm create vite --yes {{beforeDir}} -- --template vanilla && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
expected: {
framework: '@storybook/html-vite',
renderer: '@storybook/html',
Expand All @@ -268,7 +268,7 @@ const baseTemplates = {
'html-vite/default-ts': {
name: 'HTML Latest (Vite | TypeScript)',
script:
'npm create vite@beta --yes {{beforeDir}} -- --template vanilla-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
'npm create vite --yes {{beforeDir}} -- --template vanilla-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
expected: {
framework: '@storybook/html-vite',
renderer: '@storybook/html',
Expand All @@ -278,7 +278,7 @@ const baseTemplates = {
},
'svelte-vite/default-js': {
name: 'Svelte Latest (Vite | JavaScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template svelte',
script: 'npm create vite --yes {{beforeDir}} -- --template svelte',
expected: {
framework: '@storybook/svelte-vite',
renderer: '@storybook/svelte',
Expand All @@ -288,7 +288,7 @@ const baseTemplates = {
},
'svelte-vite/default-ts': {
name: 'Svelte Latest (Vite | TypeScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template svelte-ts',
script: 'npm create vite --yes {{beforeDir}} -- --template svelte-ts',
expected: {
framework: '@storybook/svelte-vite',
renderer: '@storybook/svelte',
Expand Down Expand Up @@ -355,7 +355,7 @@ const baseTemplates = {
'lit-vite/default-js': {
name: 'Lit Latest (Vite | JavaScript)',
script:
'npm create vite@beta --yes {{beforeDir}} -- --template lit && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
'npm create vite --yes {{beforeDir}} -- --template lit && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
expected: {
framework: '@storybook/web-components-vite',
renderer: '@storybook/web-components',
Expand All @@ -367,7 +367,7 @@ const baseTemplates = {
'lit-vite/default-ts': {
name: 'Lit Latest (Vite | TypeScript)',
script:
'npm create vite@beta --yes {{beforeDir}} -- --template lit-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
'npm create vite --yes {{beforeDir}} -- --template lit-ts && cd {{beforeDir}} && echo "export default {}" > vite.config.js',
expected: {
framework: '@storybook/web-components-vite',
renderer: '@storybook/web-components',
Expand Down Expand Up @@ -424,7 +424,7 @@ const baseTemplates = {
},
'preact-vite/default-js': {
name: 'Preact Latest (Vite | JavaScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template preact',
script: 'npm create vite --yes {{beforeDir}} -- --template preact',
expected: {
framework: '@storybook/preact-vite',
renderer: '@storybook/preact',
Expand All @@ -434,7 +434,7 @@ const baseTemplates = {
},
'preact-vite/default-ts': {
name: 'Preact Latest (Vite | TypeScript)',
script: 'npm create vite@beta --yes {{beforeDir}} -- --template preact-ts',
script: 'npm create vite --yes {{beforeDir}} -- --template preact-ts',
expected: {
framework: '@storybook/preact-vite',
renderer: '@storybook/preact',
Expand Down
3 changes: 2 additions & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,6 @@
"Dependency Upgrades"
]
]
}
},
"deferredNextVersion": "7.5.1"
}
2 changes: 1 addition & 1 deletion docs/versions/latest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"7.5.0","info":{"plain":"- 💃🏼 Now supports Lit 3.0 and Vite 5 \n- 👻 storiesOf and storyStoreV6 officially deprecated \n- 🔨 Fix Webpack5 build errors not being propagated \n- 🀄 Support rename font import for Next.js \n- ⬆️ Upgrade react-docgen to 6.0.x and improve argTypes \n- ✨ Many Angular improvements such as introducing argsToTemplate , new schema debugging options, support for standalone directives, etc."}}
{"version":"7.5.1","info":{"plain":"- Angular: update wrong type for webpackStatsJson in start-storybook schema.json - [#24494](https://github.com/storybookjs/storybook/pull/24494), thanks [@LucaVazz](https://github.com/LucaVazz)!\n- Themes: Run postinstall in shell for windows - [#24389](https://github.com/storybookjs/storybook/pull/24389), thanks [@Integrayshaun](https://github.com/Integrayshaun)!"}}
2 changes: 1 addition & 1 deletion docs/versions/next.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"7.5.0-alpha.7","info":{"plain":"- Angular: Allow loading standalone directives - [#24448](https://github.com/storybookjs/storybook/pull/24448), thanks [@osnoser1](https://github.com/osnoser1)!\n- Svelte: Fix docs generating when using `lang=\\\"ts\\\"` or optional chaining - [#24096](https://github.com/storybookjs/storybook/pull/24096), thanks [@j3rem1e](https://github.com/j3rem1e)!\n- Vite: Support Vite 5 - [#24395](https://github.com/storybookjs/storybook/pull/24395), thanks [@IanVS](https://github.com/IanVS)!"}}
{"version":"7.6.0-alpha.0","info":{"plain":"- UI: Fix className missing in syntaxhighlighter - [#24491](https://github.com/storybookjs/storybook/pull/24491), thanks [@ndelangen](https://github.com/ndelangen)!"}}

0 comments on commit e38a5b3

Please sign in to comment.