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: Prerelease 8.6.0-alpha.3 #30394

Merged
merged 78 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
1b47ea8
Update @radix-ui/react-dialog
mrginglymus Dec 11, 2024
f49dbd9
Update @emotion packages to react19 type compatible versions
mrginglymus Dec 11, 2024
844ef0e
Update @storybook/theme types to remove reference to global JSX names…
mrginglymus Dec 11, 2024
9738e9a
Fix mdx.tsx build error
mrginglymus Dec 14, 2024
bc8d69e
Update markdown-to-jsx to a compatible version
mrginglymus Dec 14, 2024
e821e70
Relax markdown-to-jsx specifier
mrginglymus Dec 18, 2024
a1f61f5
Merge branch 'next' into r19-type-compat
yannbf Dec 19, 2024
ea33075
Merge branch 'next' into r19-type-compat
yannbf Dec 24, 2024
66ea114
Merge branch 'next' into r19-type-compat
yannbf Jan 2, 2025
dad7a7a
fix type issues
yannbf Jan 2, 2025
c3018f7
Merge branch 'next' into r19-type-compat
mrginglymus Jan 6, 2025
7f7032e
Suppress dialog title error message
mrginglymus Jan 7, 2025
4319ca8
Merge branch 'next' into r19-type-compat
mrginglymus Jan 8, 2025
8a0c207
Merge branch 'next' into r19-type-compat
mrginglymus Jan 13, 2025
544de57
Build: Update CircleCI configuration to remove build-sandboxes job
valentinpalkovic Jan 23, 2025
fdc513a
Update my-component-play-function-with-canvas.md
kirjs Jan 23, 2025
5ad4751
fix: added additional react resolutions for next 15 or above sandboxes.
zhyd1997 Jan 24, 2025
e2a036d
Merge branch 'next' into patch-1
kirjs Jan 24, 2025
9fcd33e
RNWVite: Options documentation for react native web vite
dannyhw Jan 24, 2025
a0d6c9f
RNWVite: add example configurations
dannyhw Jan 26, 2025
73a49c2
Merge branch 'next' into r19-type-compat
JReinhold Jan 27, 2025
f6df62e
Run separate build and sandbox commands
valentinpalkovic Jan 27, 2025
6fd5bc7
Update CHANGELOG.md for v8.5.2 [skip ci]
storybook-bot Jan 27, 2025
3232bfa
Refactor CircleCI configuration to streamline sandbox creation and bu…
valentinpalkovic Jan 27, 2025
7c70b23
Update CircleCI configuration to improve telemetry verification and a…
valentinpalkovic Jan 27, 2025
e2ddbff
fix CI
valentinpalkovic Jan 27, 2025
7b2e8d1
Corepack fix
valentinpalkovic Jan 27, 2025
e2da9ce
Remove Corepack enable step from CircleCI configuration
valentinpalkovic Jan 27, 2025
65a22c3
Update Node.js
valentinpalkovic Jan 27, 2025
4499b69
Update yarn
valentinpalkovic Jan 27, 2025
783d8c9
Update yarn
valentinpalkovic Jan 27, 2025
f4602e5
Remove sort-package-json script
valentinpalkovic Jan 27, 2025
68498a4
Enable Corepack
valentinpalkovic Jan 27, 2025
d174db3
Merge pull request #30031 from mrginglymus/r19-type-compat
valentinpalkovic Jan 27, 2025
9410c65
Enable Corepack
valentinpalkovic Jan 27, 2025
62b420d
Update yarn
valentinpalkovic Jan 27, 2025
8900887
Enable Corepack
valentinpalkovic Jan 27, 2025
3133949
Update react-native-web-vite.mdx
shilman Jan 28, 2025
8ae89e5
Merge pull request #30380 from storybookjs/dannyhw/feat-rnw-options-docs
shilman Jan 28, 2025
06a77c3
Fix CircleCI config
valentinpalkovic Jan 28, 2025
5e4a3ce
Fix kitchen-sinks
valentinpalkovic Jan 28, 2025
ad15373
Increase resources for e2e tests
valentinpalkovic Jan 28, 2025
6de1340
Balance resource management for CircleCI jobs
valentinpalkovic Jan 28, 2025
00b6950
Balance resource management for CircleCI jobs
valentinpalkovic Jan 28, 2025
4c0a45e
Balance resource management for CircleCI jobs
valentinpalkovic Jan 28, 2025
9c5f7b7
Do not attach node_modules to workspace
valentinpalkovic Jan 28, 2025
2fde97a
Decrease build time on CI
valentinpalkovic Jan 28, 2025
dd53f5d
Fix linting
valentinpalkovic Jan 28, 2025
cd5fe5e
Fix sandbox directory lookup
valentinpalkovic Jan 28, 2025
0c7f7a7
Fix sandbox directory lookup
valentinpalkovic Jan 28, 2025
8e4f6c0
Reduce allocated ressources for unit test run
valentinpalkovic Jan 28, 2025
41058e0
Increase resources for vitest-integration job
valentinpalkovic Jan 28, 2025
8dd2923
Increase sharding for unit-tests
valentinpalkovic Jan 28, 2025
758b827
Increase CircleCI resources for unit-tests
valentinpalkovic Jan 28, 2025
e1fc499
Simplify create-sandboxes CI job
valentinpalkovic Jan 28, 2025
bae5b97
Merge branch 'next' into valentin/remove-build-sandboxes-step
valentinpalkovic Jan 28, 2025
3183d67
fix missing tag in registry command
yannbf Jan 28, 2025
c6b8ca7
Merge pull request #30400 from storybookjs/yann/add-tag-to-registry-c…
yannbf Jan 28, 2025
9d71989
Increase resource for pretty-docs CircleCI job
valentinpalkovic Jan 29, 2025
20fd62d
Merge remote-tracking branch 'origin/next' into valentin/remove-build…
valentinpalkovic Jan 29, 2025
359103f
Update chromatic extension to not show connection timeout modal twice
valentinpalkovic Jan 29, 2025
7c4bf47
Remove the server side check of whether all WS clients are connected
valentinpalkovic Jan 29, 2025
02ae2f3
Update MIGRATION.md
valentinpalkovic Jan 29, 2025
ced3644
Merge pull request #30409 from storybookjs/fix-typo-in-migration-docs
valentinpalkovic Jan 29, 2025
bb1e945
Merge pull request #30408 from storybookjs/valentin/fix-hmr-issue-in-…
valentinpalkovic Jan 29, 2025
d5e903a
Readd sort-package-json
valentinpalkovic Jan 29, 2025
9a820eb
add globals to extract
ndelangen Jan 29, 2025
0d7da86
Merge pull request #30360 from storybookjs/valentin/remove-build-sand…
valentinpalkovic Jan 29, 2025
f5d2026
Merge branch 'next' into norbert/extract-globals
ndelangen Jan 29, 2025
cd66ed5
Merge branch 'next' into fix/sandbox-yadong-issue-30302-1737722980988
valentinpalkovic Jan 29, 2025
39e324b
update snapshots
ndelangen Jan 29, 2025
1b0e8e5
Merge branch 'norbert/extract-globals' of https://github.com/storyboo…
ndelangen Jan 29, 2025
0f065e7
fix more tests
ndelangen Jan 29, 2025
c4ff1b4
Merge pull request #30415 from storybookjs/norbert/extract-globals
ndelangen Jan 29, 2025
db633c6
Merge pull request #30372 from zhyd1997/fix/sandbox-yadong-issue-3030…
valentinpalkovic Jan 29, 2025
da7b738
Merge branch 'next' into patch-1
jonniebigodes Jan 29, 2025
c9a7dfa
Merge pull request #30365 from kirjs/patch-1
jonniebigodes Jan 29, 2025
4fe4609
Write changelog for 8.6.0-alpha.3 [skip ci]
storybook-bot Jan 29, 2025
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
174 changes: 79 additions & 95 deletions .circleci/config.yml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
22.6.0
22.13.1

894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.0.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ nodeLinker: node-modules

npmPublishAccess: public

yarnPath: .yarn/releases/yarn-4.3.0.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 8.5.2

- Addon Test: Support Vitest 3 browser.test.instances field - [#30309](https://github.com/storybookjs/storybook/pull/30309), thanks @valentinpalkovic!
- CLI: Corrected Next.js createScript for pnpm. - [#30304](https://github.com/storybookjs/storybook/pull/30304), thanks @zhyd1997!

## 8.5.1

- Addon Test: Replace `interaction test` -> `component test` - [#30333](https://github.com/storybookjs/storybook/pull/30333), thanks @kylegach!
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 8.6.0-alpha.3

- Core: Fix invalid Websocket termination - [#30408](https://github.com/storybookjs/storybook/pull/30408), thanks @valentinpalkovic!
- Core: Improve type compatibility with React 19 - [#30031](https://github.com/storybookjs/storybook/pull/30031), thanks @mrginglymus!
- Preview: Add `globals` to `extract()` - [#30415](https://github.com/storybookjs/storybook/pull/30415), thanks @ndelangen!

## 8.6.0-alpha.2

- Addon Test: Support Vitest 3 browser.test.instances field - [#30309](https://github.com/storybookjs/storybook/pull/30309), thanks @valentinpalkovic!
Expand Down
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@

Storybook now supports [Angular's experimental zoneless mode](https://angular.dev/guide/experimental/zoneless). This mode is intended to improve performance by removing Angular's zone.js dependency. To enable zoneless mode in your Angular Storybook, set the `experimentalZoneless` config in your `angular.json` file:

````diff
```diff
{
"projects": {
"your-project": {
Expand Down
934 changes: 934 additions & 0 deletions code/.yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions code/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ plugins:
- path: ../.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'

# See https://github.com/nrwl/nx/issues/22177
supportedArchitectures:
cpu:
- current
Expand All @@ -36,6 +35,4 @@ supportedArchitectures:
unsafeHttpWhitelist:
- localhost

yarnPath: ../.yarn/releases/yarn-4.3.0.cjs
# Sometimes you get a "The remote archive doesn't match the expected checksum" error, uncommenting this line will fix it
# checksumBehavior: 'update'
yarnPath: .yarn/releases/yarn-4.6.0.cjs
4 changes: 2 additions & 2 deletions code/addons/a11y/src/components/VisionSimulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ const getFilter = (filterName: string) => {
return `url('#${filterName}')`;
};

const Hidden = styled.div(() => ({
const Hidden = styled.div({
'&, & svg': {
position: 'absolute',
width: 0,
height: 0,
},
}));
});

const ColorIcon = styled.span<{ filter: string }>(
{
Expand Down
4 changes: 2 additions & 2 deletions code/addons/interactions/src/components/Interaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { MatcherResult } from './MatcherResult';
import { MethodCall } from './MethodCall';
import { StatusIcon } from './StatusIcon';

const MethodCallWrapper = styled.div(() => ({
const MethodCallWrapper = styled.div({
fontFamily: typography.fonts.mono,
fontSize: typography.size.s1,
overflowWrap: 'break-word',
inlineSize: 'calc( 100% - 40px )',
}));
});

const RowContainer = styled('div', {
shouldForwardProp: (prop) => !['call', 'pausedAt'].includes(prop.toString()),
Expand Down
4 changes: 2 additions & 2 deletions code/addons/onboarding/src/components/List/List.styled.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { styled } from 'storybook/internal/theming';

export const ListWrapper = styled.ul(() => ({
export const ListWrapper = styled.ul({
display: 'flex',
flexDirection: 'column',
rowGap: 16,
padding: 0,
margin: 0,
}));
});
4 changes: 2 additions & 2 deletions code/addons/test/src/components/Interaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { MatcherResult } from './MatcherResult';
import { MethodCall } from './MethodCall';
import { StatusIcon } from './StatusIcon';

const MethodCallWrapper = styled.div(() => ({
const MethodCallWrapper = styled.div({
fontFamily: typography.fonts.mono,
fontSize: typography.size.s1,
overflowWrap: 'break-word',
inlineSize: 'calc( 100% - 40px )',
}));
});

const RowContainer = styled('div', {
shouldForwardProp: (prop) => !['call', 'pausedAt'].includes(prop.toString()),
Expand Down
2 changes: 1 addition & 1 deletion code/addons/test/src/components/TestProviderRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export const TestProviderRender: FC<TestProviderRenderProps> = ({
icon={
state.crashed ? (
<TestStatusIcon status="critical" aria-label="status: crashed" />
) : // @ts-expect-error: TODO: Fix types
) : // @ts-expect-error @ghengeveld should check whether this is a bug or not
status === 'unknown' ? (
<TestStatusIcon status="unknown" aria-label="status: unknown" />
) : (
Expand Down
4 changes: 2 additions & 2 deletions code/addons/viewport/src/legacy/ToolLegacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ const flip = ({ width, height, ...styles }: ViewportStyles) => ({
width: height,
});

const ActiveViewportSize = styled.div(() => ({
const ActiveViewportSize = styled.div({
display: 'inline-flex',
alignItems: 'center',
}));
});

const ActiveViewportLabel = styled.div(({ theme }) => ({
display: 'inline-block',
Expand Down
4 changes: 2 additions & 2 deletions code/addons/viewport/src/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { BrowserIcon, MobileIcon, TabletIcon } from '@storybook/icons';

import type { Viewport, ViewportMap } from './types';

export const ActiveViewportSize = styled.div(() => ({
export const ActiveViewportSize = styled.div({
display: 'inline-flex',
alignItems: 'center',
}));
});

export const ActiveViewportLabel = styled.div(({ theme }) => ({
display: 'inline-block',
Expand Down
14 changes: 7 additions & 7 deletions code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,16 @@
"@babel/traverse": "^7.24.1",
"@babel/types": "^7.24.0",
"@discoveryjs/json-ext": "^0.5.3",
"@emotion/cache": "^11.11.0",
"@emotion/is-prop-valid": "^1.2.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@emotion/use-insertion-effect-with-fallbacks": "^1.0.1",
"@emotion/cache": "^11.14.0",
"@emotion/is-prop-valid": "^1.3.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@emotion/use-insertion-effect-with-fallbacks": "^1.2.0",
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@ndelangen/get-tarball": "^3.0.7",
"@polka/compression": "^1.0.0-next.28",
"@popperjs/core": "^2.6.0",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-scroll-area": "1.2.0-rc.7",
"@radix-ui/react-slot": "^1.0.2",
"@storybook/docs-mdx": "4.0.0-next.1",
Expand Down Expand Up @@ -369,7 +369,7 @@
"js-yaml": "^4.1.0",
"lazy-universal-dotenv": "^4.0.0",
"leven": "^4.0.0",
"markdown-to-jsx": "^7.4.5",
"markdown-to-jsx": "^7.7.2",
"memfs": "^4.11.1",
"memoizerific": "^1.11.3",
"nanoid": "^4.0.2",
Expand Down
4 changes: 2 additions & 2 deletions code/core/src/components/components/bar/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ const IconPlaceholder = styled.div(({ theme }) => ({
animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,
}));

const IconButtonSkeletonWrapper = styled.div(() => ({
const IconButtonSkeletonWrapper = styled.div({
marginTop: 6,
padding: 7,
height: 28,
}));
});

/** @deprecated This component will be removed in Storybook 9.0 */
export const IconButtonSkeleton = () => (
Expand Down
21 changes: 1 addition & 20 deletions code/core/src/core-server/utils/get-server-channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@ export class ServerChannelTransport {

private handler?: ChannelHandler;

isAlive = false;

private heartbeat() {
this.isAlive = true;
}

constructor(server: Server) {
this.heartbeat = this.heartbeat.bind(this);

this.socket = new WebSocketServer({ noServer: true });

server.on('upgrade', (request, socket, head) => {
Expand All @@ -36,29 +28,18 @@ export class ServerChannelTransport {
}
});
this.socket.on('connection', (wss) => {
this.isAlive = true;
wss.on('message', (raw) => {
const data = raw.toString();
const event =
typeof data === 'string' && isJSON(data)
? parse(data, { allowFunction: false, allowClass: false })
: data;
this.handler?.(event);
if (event.type === 'pong') {
this.heartbeat();
}
});
});

const interval = setInterval(() => {
this.socket.clients.forEach((ws) => {
if (this.isAlive === false) {
return ws.terminate();
}

this.isAlive = false;
this.send({ type: 'ping' });
});
this.send({ type: 'ping' });
}, HEARTBEAT_INTERVAL);

this.socket.on('close', function close() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const NotificationWithInteractiveStates = styled(Notification)({
const NotificationButton = NotificationWithInteractiveStates.withComponent('div');
const NotificationLink = NotificationWithInteractiveStates.withComponent(Link);

const NotificationIconWrapper = styled.div(() => ({
const NotificationIconWrapper = styled.div({
display: 'flex',
marginRight: 10,
alignItems: 'center',
Expand All @@ -102,7 +102,7 @@ const NotificationIconWrapper = styled.div(() => ({
width: 16,
height: 16,
},
}));
});

const NotificationTextWrapper = styled.div(({ theme }) => ({
width: '100%',
Expand Down
12 changes: 12 additions & 0 deletions code/core/src/preview-api/modules/preview-web/PreviewWeb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3793,6 +3793,9 @@ describe('PreviewWeb', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--a",
"initialArgs": {
"foo": "a",
Expand Down Expand Up @@ -3844,6 +3847,9 @@ describe('PreviewWeb', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--b",
"initialArgs": {
"foo": "b",
Expand Down Expand Up @@ -3876,6 +3882,9 @@ describe('PreviewWeb', () => {
"args": {},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--e",
"initialArgs": {},
"kind": "Component One",
Expand Down Expand Up @@ -3914,6 +3923,9 @@ describe('PreviewWeb', () => {
},
"component": undefined,
"componentId": "component-two",
"globals": {
"a": "b",
},
"id": "component-two--c",
"initialArgs": {
"foo": "c",
Expand Down
21 changes: 21 additions & 0 deletions code/core/src/preview-api/modules/store/StoryStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--a",
"initialArgs": {
"foo": "a",
Expand Down Expand Up @@ -471,6 +474,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--a",
"initialArgs": {
"foo": "a",
Expand Down Expand Up @@ -514,6 +520,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--b",
"initialArgs": {
"foo": "b",
Expand Down Expand Up @@ -557,6 +566,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-two",
"globals": {
"a": "b",
},
"id": "component-two--c",
"initialArgs": {
"foo": "c",
Expand Down Expand Up @@ -847,6 +859,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--a",
"initialArgs": {
"foo": "a",
Expand Down Expand Up @@ -890,6 +905,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-one",
"globals": {
"a": "b",
},
"id": "component-one--b",
"initialArgs": {
"foo": "b",
Expand Down Expand Up @@ -933,6 +951,9 @@ describe('StoryStore', () => {
},
"component": undefined,
"componentId": "component-two",
"globals": {
"a": "b",
},
"id": "component-two--c",
"initialArgs": {
"foo": "c",
Expand Down
10 changes: 9 additions & 1 deletion code/core/src/preview-api/modules/store/StoryStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,15 @@ export class StoryStore<TRenderer extends Renderer> {
}
return Object.assign(storyAcc, { [key]: value });
},
{ args: story.initialArgs }
{
//
args: story.initialArgs,
globals: {
...this.userGlobals.initialGlobals,
...this.userGlobals.globals,
...story.storyGlobals,
},
}
);
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@types/color-convert": "^2.0.0",
"color-convert": "^2.0.1",
"es-toolkit": "^1.22.0",
"markdown-to-jsx": "^7.4.5",
"markdown-to-jsx": "^7.7.2",
"memoizerific": "^1.11.3",
"polished": "^4.2.2",
"react-colorful": "^5.1.2",
Expand Down
Loading
Loading