Skip to content

Commit e3e78ef

Browse files
authored
Merge pull request #25012 from storybookjs/version-patch-from-7.6.0
Release: Patch 7.6.1
2 parents b64214c + 5fa66f7 commit e3e78ef

File tree

16 files changed

+76
-81
lines changed

16 files changed

+76
-81
lines changed

.circleci/config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -560,27 +560,27 @@ workflows:
560560
requires:
561561
- unit-tests
562562
- create-sandboxes:
563-
parallelism: 23
563+
parallelism: 21
564564
requires:
565565
- build
566566
- build-sandboxes:
567-
parallelism: 23
567+
parallelism: 21
568568
requires:
569569
- create-sandboxes
570570
- chromatic-sandboxes:
571-
parallelism: 20
571+
parallelism: 18
572572
requires:
573573
- build-sandboxes
574574
- e2e-production:
575-
parallelism: 18
575+
parallelism: 16
576576
requires:
577577
- build-sandboxes
578578
- e2e-dev:
579-
parallelism: 4
579+
parallelism: 2
580580
requires:
581581
- create-sandboxes
582582
- test-runner-production:
583-
parallelism: 18
583+
parallelism: 16
584584
requires:
585585
- build-sandboxes
586586
- bench:
@@ -614,30 +614,30 @@ workflows:
614614
requires:
615615
- build
616616
- create-sandboxes:
617-
parallelism: 38
617+
parallelism: 36
618618
requires:
619619
- build
620620
# - smoke-test-sandboxes: # disabled for now
621621
# requires:
622622
# - create-sandboxes
623623
- build-sandboxes:
624-
parallelism: 38
624+
parallelism: 36
625625
requires:
626626
- create-sandboxes
627627
- chromatic-sandboxes:
628-
parallelism: 35
628+
parallelism: 33
629629
requires:
630630
- build-sandboxes
631631
- e2e-production:
632-
parallelism: 33
632+
parallelism: 31
633633
requires:
634634
- build-sandboxes
635635
- e2e-dev:
636-
parallelism: 4
636+
parallelism: 2
637637
requires:
638638
- create-sandboxes
639639
- test-runner-production:
640-
parallelism: 33
640+
parallelism: 31
641641
requires:
642642
- build-sandboxes
643643
# TODO: reenable once we find out the source of flakyness

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 7.6.1
2+
3+
- Next.js: Fix AppRouterProvider usage - [#25032](https://github.com/storybookjs/storybook/pull/25032), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
4+
- SvelteKit: Fix HMR not working - [#25031](https://github.com/storybookjs/storybook/pull/25031), thanks [@JReinhold](https://github.com/JReinhold)!
5+
- Test: Downgrade @testing-library/user-event to 14.3.0 - [#25004](https://github.com/storybookjs/storybook/pull/25004), thanks [@kasperpeulen](https://github.com/kasperpeulen)!
6+
- Webpack: Fix exclude regex in react-docgen-loader - [#25030](https://github.com/storybookjs/storybook/pull/25030), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
7+
18
## 7.6.0
29

310
Storybook 7.6 is here with increased performance and much more!

code/frameworks/nextjs/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@
3232
"require": "./dist/image-context.js",
3333
"import": "./dist/image-context.mjs"
3434
},
35+
"./dist/routing/app-router-provider": {
36+
"types": "./dist/routing/app-router-provider.d.ts",
37+
"require": "./dist/routing/app-router-provider.js",
38+
"import": "./dist/routing/app-router-provider.mjs"
39+
},
40+
"./dist/routing/app-router-provider-mock": {
41+
"types": "./dist/routing/app-router-provider-mock.d.ts",
42+
"require": "./dist/routing/app-router-provider-mock.js",
43+
"import": "./dist/routing/app-router-provider-mock.mjs"
44+
},
3545
"./preset": {
3646
"types": "./dist/preset.d.ts",
3747
"require": "./dist/preset.js"
@@ -161,6 +171,8 @@
161171
"./src/images/next-future-image.tsx",
162172
"./src/images/next-legacy-image.tsx",
163173
"./src/images/next-image.tsx",
174+
"./src/routing/app-router-provider.tsx",
175+
"./src/routing/app-router-provider-mock.tsx",
164176
"./src/font/webpack/loader/storybook-nextjs-font-loader.ts",
165177
"./src/swc/next-swc-loader-patch.ts"
166178
],

code/frameworks/nextjs/src/dependency-map.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const mapping: Record<string, Record<string, string>> = {
1313
'next/dist/shared/lib/hooks-client-context.shared-runtime':
1414
'next/dist/shared/lib/hooks-client-context',
1515
},
16+
'<13.0.0': {
17+
'@storybook/nextjs/dist/routing/app-router-provider':
18+
'@storybook/nextjs/dist/routing/app-router-provider-mock',
19+
},
1620
'<13.5.0': {
1721
'next/dist/shared/lib/router-context.shared-runtime': 'next/dist/shared/lib/router-context',
1822
'next/dist/shared/lib/head-manager-context.shared-runtime':
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
3+
// The mock is used for Next.js < 13, where the AppRouterProvider doesn't exist
4+
export const AppRouterProvider: React.FC<React.PropsWithChildren<{}>> = ({ children }) => {
5+
return <>{children}</>;
6+
};

code/frameworks/nextjs/src/routing/decorator.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import * as React from 'react';
22
import type { Addon_StoryContext } from '@storybook/types';
33
import { action } from '@storybook/addon-actions';
4+
// @ts-expect-error Using absolute path import to 1) avoid prebundling and 2) being able to substitute the module for Next.js < 13
5+
// eslint-disable-next-line import/no-extraneous-dependencies
6+
import { AppRouterProvider } from '@storybook/nextjs/dist/routing/app-router-provider';
47
import { PageRouterProvider } from './page-router-provider';
5-
import type { AppRouterProvider as TAppRouterProvider } from './app-router-provider';
68
import type { RouteParams, NextAppDirectory } from './types';
79

810
const defaultRouterParams: RouteParams = {
@@ -17,19 +19,6 @@ export const RouterDecorator = (
1719
const nextAppDirectory =
1820
(parameters.nextjs?.appDirectory as NextAppDirectory | undefined) ?? false;
1921

20-
const [AppRouterProvider, setAppRouterProvider] = React.useState<
21-
typeof TAppRouterProvider | undefined
22-
>();
23-
24-
React.useEffect(() => {
25-
if (!nextAppDirectory) {
26-
return;
27-
}
28-
import('./app-router-provider').then((exports) =>
29-
setAppRouterProvider(() => exports.AppRouterProvider)
30-
);
31-
}, [nextAppDirectory]);
32-
3322
if (nextAppDirectory) {
3423
if (!AppRouterProvider) {
3524
return null;
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import { resolve } from 'node:path';
2-
import { mergeConfig, type Plugin } from 'vite';
2+
import type { Plugin } from 'vite';
33

44
export function mockSveltekitStores() {
55
return {
66
name: 'storybook:sveltekit-mock-stores',
7-
enforce: 'post',
8-
config: (config) =>
9-
mergeConfig(config, {
10-
resolve: {
11-
alias: {
12-
$app: resolve(__dirname, '../src/mocks/app/'),
13-
},
7+
config: () => ({
8+
resolve: {
9+
alias: {
10+
$app: resolve(__dirname, '../src/mocks/app/'),
1411
},
15-
}),
12+
},
13+
}),
1614
} satisfies Plugin;
1715
}

code/lib/cli/src/sandbox-templates.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -466,34 +466,6 @@ const baseTemplates = {
466466
* They will be hidden by default in the Storybook status page.
467467
*/
468468
const internalTemplates = {
469-
'internal/ssv6-vite': {
470-
...baseTemplates['react-vite/default-ts'],
471-
name: 'StoryStore v6 (react-vite/default-ts)',
472-
isInternal: true,
473-
modifications: {
474-
mainConfig: {
475-
features: {
476-
storyStoreV7: false,
477-
storyStoreV7MdxErrors: false,
478-
},
479-
},
480-
},
481-
skipTasks: ['bench'],
482-
},
483-
'internal/ssv6-webpack': {
484-
...baseTemplates['cra/default-ts'],
485-
name: 'StoryStore v6 (cra/default-ts)',
486-
isInternal: true,
487-
modifications: {
488-
mainConfig: {
489-
features: {
490-
storyStoreV7: false,
491-
storyStoreV7MdxErrors: false,
492-
},
493-
},
494-
},
495-
skipTasks: ['bench'],
496-
},
497469
'internal/swc-webpack': {
498470
...baseTemplates['react-webpack/18-ts'],
499471
name: 'SWC (react-webpack/18-ts)',
@@ -615,8 +587,6 @@ export const merged: TemplateKey[] = [
615587
'preact-vite/default-ts',
616588
'html-webpack/default',
617589
'html-vite/default-ts',
618-
'internal/ssv6-vite',
619-
'internal/ssv6-webpack',
620590
];
621591
export const daily: TemplateKey[] = [
622592
...merged,

code/lib/test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@storybook/preview-api": "workspace:*",
5050
"@testing-library/dom": "^9.3.1",
5151
"@testing-library/jest-dom": "^6.1.3",
52-
"@testing-library/user-event": "^14.4.3",
52+
"@testing-library/user-event": "14.3.0",
5353
"@types/chai": "^4",
5454
"@vitest/expect": "^0.34.2",
5555
"@vitest/spy": "^0.34.1",

code/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,5 +328,6 @@
328328
"Dependency Upgrades"
329329
]
330330
]
331-
}
331+
},
332+
"deferredNextVersion": "7.6.1"
332333
}

0 commit comments

Comments
 (0)