Skip to content

Commit

Permalink
Merge pull request #28231 from storybookjs/version-patch-from-8.1.8
Browse files Browse the repository at this point in the history
Release: Patch 8.1.9
  • Loading branch information
shilman authored Jun 13, 2024
2 parents 001c9d8 + 20fc7d3 commit e62e022
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 8.1.9

- Addon-a11y: Workaround for Vite 5.3.0 compat - [#28241](https://github.com/storybookjs/storybook/pull/28241), thanks @shilman!
- CLI: Add `--no-dev` option to `init` - [#26918](https://github.com/storybookjs/storybook/pull/26918), thanks @fastfrwrd!
- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!

## 8.1.8

- Automigrations: Make VTA "learn more" link clickable - [#28020](https://github.com/storybookjs/storybook/pull/28020), thanks @deiga!
Expand Down
2 changes: 1 addition & 1 deletion code/addons/a11y/src/a11yRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const run = async (storyId: string, input: A11yParameters = defaultParameters) =
if (!active) {
active = true;
channel.emit(EVENTS.RUNNING);
const axe = (await import('axe-core')).default;
const { default: axe } = await import('axe-core');

const { element = '#storybook-root', config, options = {} } = input;
const htmlElement = document.querySelector(element as string);
Expand Down
11 changes: 11 additions & 0 deletions code/lib/cli/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ command('init')
.option('-y --yes', 'Answer yes to all prompts')
.option('-b --builder <webpack5 | vite>', 'Builder library')
.option('-l --linkable', 'Prepare installation for link (contributor helper)')
// due to how Commander handles default values and negated options, we have to elevate the default into Commander, and we have to specify `--dev`
// alongside `--no-dev` even if we are unlikely to directly use `--dev`. https://github.com/tj/commander.js/issues/2068#issuecomment-1804524585
.option(
'--dev',
'Launch the development server after completing initialization. Enabled by default',
process.env.CI !== 'true' && process.env.IN_STORYBOOK_SANDBOX !== 'true'
)
.option(
'--no-dev',
'Complete the initialization of Storybook without launching the Storybook development server'
)
.action((options: CommandOptions) => {
initiate(options).catch(() => process.exit(1));
});
Expand Down
1 change: 1 addition & 0 deletions code/lib/cli/src/generators/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ export type CommandOptions = {
disableTelemetry?: boolean;
enableCrashReports?: boolean;
debug?: boolean;
dev?: boolean;
};
2 changes: 1 addition & 1 deletion code/lib/cli/src/initiate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export async function doInitiate(options: CommandOptions): Promise<
);

return {
shouldRunDev: process.env.CI !== 'true' && process.env.IN_STORYBOOK_SANDBOX !== 'true',
shouldRunDev: !!options.dev && !options.skipInstall,
projectType,
packageManager,
storybookCommand,
Expand Down
1 change: 1 addition & 0 deletions code/lib/cli/src/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export const sandbox = async ({
process.chdir(templateDestination);
// we run doInitiate, instead of initiate, to avoid sending this init event to telemetry, because it's not a real world project
await doInitiate({
dev: process.env.CI !== 'true' && process.env.IN_STORYBOOK_SANBOX !== 'true',
...options,
});
process.chdir(before);
Expand Down
3 changes: 2 additions & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,6 @@
"Dependency Upgrades"
]
]
}
},
"deferredNextVersion": "8.1.9"
}
1 change: 1 addition & 0 deletions docs/api/cli-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Options include:
| `--debug` | Outputs more logs in the CLI to assist debugging<br/>`storybook init --debug` |
| `--disable-telemetry` | Disables Storybook's telemetry. Learn more about it [here](../configure/telemetry.md#how-to-opt-out)<br/>`storybook init --disable-telemetry` |
| `--enable-crash-reports` | Enables sending crash reports to Storybook's telemetry. Learn more about it [here](../configure/telemetry.md#crash-reports-disabled-by-default)<br/>`storybook init --enable-crash-reports` |
| `--no-dev` | Complete the initialization of Storybook without running the Storybook dev server<br/>`storybook init --no-dev` |

### `add`

Expand Down
2 changes: 1 addition & 1 deletion docs/versions/latest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"8.1.8","info":{"plain":"- Automigrations: Make VTA \\\"learn more\\\" link clickable - [#28020](https://github.com/storybookjs/storybook/pull/28020), thanks @deiga!\n- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!"}}
{"version":"8.1.9","info":{"plain":"- Addon-a11y: Workaround for Vite 5.3.0 compat - [#28241](https://github.com/storybookjs/storybook/pull/28241), thanks @shilman!\n- CLI: Add `--no-dev` option to `init` - [#26918](https://github.com/storybookjs/storybook/pull/26918), thanks @fastfrwrd!\n- CLI: Fix `init --skip-install` - [#28226](https://github.com/storybookjs/storybook/pull/28226), thanks @shilman!"}}

0 comments on commit e62e022

Please sign in to comment.