Skip to content

Commit 6ebe665

Browse files
committed
Merge branch 'next' into norbert/share-channel-events
2 parents 50a69cb + 95ff0df commit 6ebe665

File tree

64 files changed

+897
-469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+897
-469
lines changed

CHANGELOG.prerelease.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 10.3.0-alpha.4
2+
3+
- Addon-Vitest: Support vite/vitest config with deferred export - [#33755](https://github.com/storybookjs/storybook/pull/33755), thanks @valentinpalkovic!
4+
- Controls: Allow story argTypes to override control: false from meta - [#33729](https://github.com/storybookjs/storybook/pull/33729), thanks @jonathan-fulton!
5+
- Manager: Update logic to use base path instead of full pathname - [#33686](https://github.com/storybookjs/storybook/pull/33686), thanks @JSMike!
6+
- Manifests: Use correct story name - [#33709](https://github.com/storybookjs/storybook/pull/33709), thanks @JReinhold!
7+
- Toolbar: Remove extra toolbar divider when zoom controls not shown - [#33731](https://github.com/storybookjs/storybook/pull/33731), thanks @jonathan-fulton!
8+
19
## 10.3.0-alpha.3
210

311
- Angular: Storybook fails with unknown option silent - [#33736](https://github.com/storybookjs/storybook/pull/33736), thanks @tanujbhaud!

code/addons/a11y/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-a11y",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards",
55
"keywords": [
66
"a11y",

code/addons/a11y/src/postinstall.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import { JsPackageManagerFactory } from 'storybook/internal/common';
1+
import { JsPackageManagerFactory, versions } from 'storybook/internal/common';
22

33
import type { PostinstallOptions } from '../../../lib/cli-storybook/src/add';
44

55
export default async function postinstall(options: PostinstallOptions) {
6-
const args = ['storybook', 'automigrate', 'addon-a11y-addon-test'];
6+
const args = [
7+
options.skipInstall ? `storybook@${versions.storybook}` : `storybook`,
8+
'automigrate',
9+
'addon-a11y-addon-test',
10+
];
711

812
args.push('--loglevel', 'silent');
913
args.push('--skip-doctor');
@@ -25,5 +29,5 @@ export default async function postinstall(options: PostinstallOptions) {
2529
configDir: options.configDir,
2630
});
2731

28-
await jsPackageManager.runPackageCommand({ args });
32+
await jsPackageManager.runPackageCommand({ args, useRemotePkg: !!options.skipInstall });
2933
}

code/addons/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-docs",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Docs: Document UI components automatically with stories and MDX",
55
"keywords": [
66
"docs",

code/addons/links/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-links",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Links: Link stories together to build demos and prototypes with your UI components",
55
"keywords": [
66
"storybook",

code/addons/onboarding/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-onboarding",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Onboarding: Help new users learn how to write stories",
55
"keywords": [
66
"storybook",

code/addons/pseudo-states/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "storybook-addon-pseudo-states",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Pseudo-states addon: Manipulate CSS pseudo states",
55
"keywords": [
66
"storybook",

code/addons/themes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-themes",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Themes addon: Switch between themes from the toolbar",
55
"keywords": [
66
"css",

code/addons/vitest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-vitest",
3-
"version": "10.3.0-alpha.3",
3+
"version": "10.3.0-alpha.4",
44
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
55
"keywords": [
66
"storybook",

code/addons/vitest/src/postinstall.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
formatFileContent,
1010
getProjectRoot,
1111
getStorybookInfo,
12+
versions,
1213
} from 'storybook/internal/common';
1314
import { CLI_COLORS } from 'storybook/internal/node-logger';
1415
import type { StorybookError } from 'storybook/internal/server-errors';
@@ -161,6 +162,7 @@ export default async function postInstall(options: PostinstallOptions) {
161162
if (!options.skipInstall) {
162163
await addonVitestService.installPlaywright({
163164
yes: options.yes,
165+
useRemotePkg: !!options.skipInstall,
164166
});
165167
} else {
166168
logger.warn(dedent`
@@ -229,11 +231,11 @@ export default async function postInstall(options: PostinstallOptions) {
229231

230232
const getTemplateName = () => {
231233
if (isVitest4OrNewer) {
232-
return 'vitest.config.4.template.ts';
234+
return 'vitest.config.4.template';
233235
} else if (isVitest3_2To4) {
234-
return 'vitest.config.3.2.template.ts';
236+
return 'vitest.config.3.2.template';
235237
}
236-
return 'vitest.config.template.ts';
238+
return 'vitest.config.template';
237239
};
238240

239241
// If there's an existing workspace file, we update that file to include the Storybook Addon Vitest plugin.
@@ -249,7 +251,7 @@ export default async function postInstall(options: PostinstallOptions) {
249251
return;
250252
}
251253

252-
const workspaceTemplate = await loadTemplate('vitest.workspace.template.ts', {
254+
const workspaceTemplate = await loadTemplate('vitest.workspace.template', {
253255
EXTENDS_WORKSPACE: viteConfigFile
254256
? relative(dirname(vitestWorkspaceFile), viteConfigFile)
255257
: '',
@@ -358,7 +360,7 @@ export default async function postInstall(options: PostinstallOptions) {
358360
if (a11yAddon) {
359361
try {
360362
const command = [
361-
'storybook',
363+
options.skipInstall ? `storybook@${versions.storybook}` : `storybook`,
362364
'automigrate',
363365
'addon-a11y-addon-test',
364366
'--loglevel',
@@ -381,7 +383,12 @@ export default async function postInstall(options: PostinstallOptions) {
381383

382384
await prompt.executeTask(
383385
// TODO: Remove stdio: 'ignore' once we have a way to log the output of the command properly
384-
() => packageManager.runPackageCommand({ args: command, stdio: 'ignore' }),
386+
() =>
387+
packageManager.runPackageCommand({
388+
args: command,
389+
stdio: 'ignore',
390+
useRemotePkg: !!options.skipInstall,
391+
}),
385392
{
386393
intro: 'Setting up a11y addon for @storybook/addon-vitest',
387394
error: 'Failed to setup a11y addon for @storybook/addon-vitest',

0 commit comments

Comments
 (0)