Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Patch 8.1.9 #28231

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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!"}}