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 7.5.2 #24535

Merged
merged 7 commits into from
Oct 30, 2023
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 @@
## 7.5.2

- Addon-themes: Fix globals not being set when using absolute path - [#24596](https://github.com/storybookjs/storybook/pull/24596), thanks [@JReinhold](https://github.com/JReinhold)!
- CLI: Allow Yarn v4 in `link` command - [#24551](https://github.com/storybookjs/storybook/pull/24551), thanks [@yannbf](https://github.com/yannbf)!
- Next.js: Support v14.0.0 - [#24593](https://github.com/storybookjs/storybook/pull/24593), thanks [@nikospapcom](https://github.com/nikospapcom)!

## 7.5.1

- Angular: update wrong type for webpackStatsJson in start-storybook schema.json - [#24494](https://github.com/storybookjs/storybook/pull/24494), thanks [@LucaVazz](https://github.com/LucaVazz)!
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/code/addons/storyshots-core/ @ndelangen
/code/addons/storyshots-puppeteer/ @ndelangen
/code/addons/storysource/ @ndelangen
/code/addons/themes/ @JReinhold @Integrayshaun
/code/addons/toolbars/ @ndelangen @JReinhold
/code/addons/viewport/ @yannbf @ndelangen

Expand Down
10 changes: 3 additions & 7 deletions code/addons/themes/src/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import type { Renderer, ProjectAnnotations } from '@storybook/types';
import { GLOBAL_KEY } from './constants';

const preview: ProjectAnnotations<Renderer> = {
globals: {
// Required to make sure SB picks this up from URL params
[GLOBAL_KEY]: '',
},
export const globals: ProjectAnnotations<Renderer>['globals'] = {
// Required to make sure SB picks this up from URL params
[GLOBAL_KEY]: '',
};

export default preview;
6 changes: 3 additions & 3 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@
"@types/babel__core": "^7",
"@types/babel__plugin-transform-runtime": "^7",
"@types/babel__preset-env": "^7",
"next": "13.5.4",
"next": "^14.0.0",
"typescript": "^4.9.3",
"webpack": "^5.65.0"
},
"peerDependencies": {
"@next/font": "^13.0.0",
"next": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"@next/font": "^13.0.0|| ^14.0.0",
"next": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"webpack": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/src/images/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const configureImageDefaults = (baseConfig: WebpackConfig): void => {
'next/image': path.resolve(__dirname, './images/next-image'),
};

if (semver.satisfies(version, '^13.0.0')) {
if (semver.satisfies(version, '>=13.0.0')) {
resolve.alias = {
...resolve.alias,
'sb-original/next/legacy/image': require.resolve('next/legacy/image'),
Expand Down
12 changes: 2 additions & 10 deletions code/frameworks/nextjs/src/nextImport/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,11 @@ export function configureNextImport(baseConfig: WebpackConfig) {
const nextJSVersion = getNextjsVersion();

const isNext12 = semver.satisfies(nextJSVersion, '~12');
const isNext13 = semver.satisfies(nextJSVersion, '~13');
const isNextVersionSmallerThan12dot2 = semver.lt(nextJSVersion, '12.2.0');
const isNextVersionSmallerThan13 = semver.lt(nextJSVersion, '13.0.0');

baseConfig.plugins = baseConfig.plugins ?? [];

if (!isNext13) {
baseConfig.plugins.push(
new IgnorePlugin({
resourceRegExp: /next\/legacy\/image$/,
})
);
}

if (!isNext12 || isNextVersionSmallerThan12dot2) {
baseConfig.plugins.push(
new IgnorePlugin({
Expand All @@ -32,7 +23,8 @@ export function configureNextImport(baseConfig: WebpackConfig) {
if (isNextVersionSmallerThan13) {
baseConfig.plugins.push(
new IgnorePlugin({
resourceRegExp: /next\/dist\/shared\/lib\/hooks-client-context$/,
// ignore next/dist/shared/lib/hooks-client-context and next/legacy/image imports
resourceRegExp: /(next\/dist\/shared\/lib\/hooks-client-context|next\/legacy\/image)$/,
})
);
}
Expand Down
4 changes: 2 additions & 2 deletions code/lib/cli/src/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export const link = async ({ target, local, start }: LinkOptions) => {
shell: true,
}).stdout.toString();

if (!/^[23]\./.test(version)) {
logger.warn(`🚨 Expected yarn 2 or 3 in ${reproDir}!`);
if (!/^[2-4]\./.test(version)) {
logger.warn(`🚨 Expected yarn 2 or higher in ${reproDir}!`);
logger.warn('');
logger.warn('Please set it up with `yarn set version berry`,');
logger.warn(`then link '${reproDir}' with the '--local' flag.`);
Expand Down
3 changes: 2 additions & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,5 +328,6 @@
"Dependency Upgrades"
]
]
}
},
"deferredNextVersion": "7.5.2"
}
110 changes: 55 additions & 55 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4006,72 +4006,72 @@ __metadata:
languageName: node
linkType: hard

"@next/env@npm:13.5.4":
version: 13.5.4
resolution: "@next/env@npm:13.5.4"
checksum: 69c013047371bde6c4dc6d03ec77140059bd4e3db38c1991a8aa8a9c8ce4d1370b98a141145a6f60e23f32ce97a3040b448bfd0455b0d9e5ba6efda8df33c89f
"@next/env@npm:14.0.0":
version: 14.0.0
resolution: "@next/env@npm:14.0.0"
checksum: c43e81dbd162a29a4b380342e416209d69d731e8ced7688d09668ec8196f543e358ed65adad81a26e943c63a293d7a018552f8389b6b1ac95cd0f63f4ef257c0
languageName: node
linkType: hard

"@next/swc-darwin-arm64@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-darwin-arm64@npm:13.5.4"
"@next/swc-darwin-arm64@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-darwin-arm64@npm:14.0.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@next/swc-darwin-x64@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-darwin-x64@npm:13.5.4"
"@next/swc-darwin-x64@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-darwin-x64@npm:14.0.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@next/swc-linux-arm64-gnu@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-arm64-gnu@npm:13.5.4"
"@next/swc-linux-arm64-gnu@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-linux-arm64-gnu@npm:14.0.0"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@next/swc-linux-arm64-musl@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-arm64-musl@npm:13.5.4"
"@next/swc-linux-arm64-musl@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-linux-arm64-musl@npm:14.0.0"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@next/swc-linux-x64-gnu@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-x64-gnu@npm:13.5.4"
"@next/swc-linux-x64-gnu@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-linux-x64-gnu@npm:14.0.0"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@next/swc-linux-x64-musl@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-linux-x64-musl@npm:13.5.4"
"@next/swc-linux-x64-musl@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-linux-x64-musl@npm:14.0.0"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@next/swc-win32-arm64-msvc@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-win32-arm64-msvc@npm:13.5.4"
"@next/swc-win32-arm64-msvc@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-win32-arm64-msvc@npm:14.0.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@next/swc-win32-ia32-msvc@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-win32-ia32-msvc@npm:13.5.4"
"@next/swc-win32-ia32-msvc@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-win32-ia32-msvc@npm:14.0.0"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard

"@next/swc-win32-x64-msvc@npm:13.5.4":
version: 13.5.4
resolution: "@next/swc-win32-x64-msvc@npm:13.5.4"
"@next/swc-win32-x64-msvc@npm:14.0.0":
version: 14.0.0
resolution: "@next/swc-win32-x64-msvc@npm:14.0.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
Expand Down Expand Up @@ -7347,7 +7347,7 @@ __metadata:
fs-extra: ^11.1.0
image-size: ^1.0.0
loader-utils: ^3.2.0
next: 13.5.4
next: ^14.0.0
node-polyfill-webpack-plugin: ^2.0.1
pnp-webpack-plugin: ^1.7.0
postcss: ^8.4.21
Expand All @@ -7363,8 +7363,8 @@ __metadata:
typescript: ^4.9.3
webpack: ^5.65.0
peerDependencies:
"@next/font": ^13.0.0
next: ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0
"@next/font": ^13.0.0|| ^14.0.0
next: ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
webpack: ^5.0.0
Expand Down Expand Up @@ -23946,26 +23946,26 @@ __metadata:
languageName: node
linkType: hard

"next@npm:13.5.4":
version: 13.5.4
resolution: "next@npm:13.5.4"
dependencies:
"@next/env": 13.5.4
"@next/swc-darwin-arm64": 13.5.4
"@next/swc-darwin-x64": 13.5.4
"@next/swc-linux-arm64-gnu": 13.5.4
"@next/swc-linux-arm64-musl": 13.5.4
"@next/swc-linux-x64-gnu": 13.5.4
"@next/swc-linux-x64-musl": 13.5.4
"@next/swc-win32-arm64-msvc": 13.5.4
"@next/swc-win32-ia32-msvc": 13.5.4
"@next/swc-win32-x64-msvc": 13.5.4
"@swc/helpers": 0.5.2
busboy: 1.6.0
caniuse-lite: ^1.0.30001406
postcss: 8.4.31
styled-jsx: 5.1.1
watchpack: 2.4.0
"next@npm:^14.0.0":
version: 14.0.0
resolution: "next@npm:14.0.0"
dependencies:
"@next/env": "npm:14.0.0"
"@next/swc-darwin-arm64": "npm:14.0.0"
"@next/swc-darwin-x64": "npm:14.0.0"
"@next/swc-linux-arm64-gnu": "npm:14.0.0"
"@next/swc-linux-arm64-musl": "npm:14.0.0"
"@next/swc-linux-x64-gnu": "npm:14.0.0"
"@next/swc-linux-x64-musl": "npm:14.0.0"
"@next/swc-win32-arm64-msvc": "npm:14.0.0"
"@next/swc-win32-ia32-msvc": "npm:14.0.0"
"@next/swc-win32-x64-msvc": "npm:14.0.0"
"@swc/helpers": "npm:0.5.2"
busboy: "npm:1.6.0"
caniuse-lite: "npm:^1.0.30001406"
postcss: "npm:8.4.31"
styled-jsx: "npm:5.1.1"
watchpack: "npm:2.4.0"
peerDependencies:
"@opentelemetry/api": ^1.1.0
react: ^18.2.0
Expand Down Expand Up @@ -23997,7 +23997,7 @@ __metadata:
optional: true
bin:
next: dist/bin/next
checksum: 0b0bc7fa42844859a0444a79122a48b5e65116c30ce077a3edaaecd7cee1d7925214a659391ae6ecf8dc612869a7a646ab3a1a8aa12d074ff17e3f18c53a2621
checksum: cfb18a72d6e1d875efb1bb3806f9a06551f482c5cb87231e77e179a71d26f3d43700290988ad27e739302bfa7ff8ac8081aafd5456c39a2819fdd315617e5acf
languageName: node
linkType: hard

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":"7.5.1","info":{"plain":"- Angular: update wrong type for webpackStatsJson in start-storybook schema.json - [#24494](https://github.com/storybookjs/storybook/pull/24494), thanks [@LucaVazz](https://github.com/LucaVazz)!\n- Themes: Run postinstall in shell for windows - [#24389](https://github.com/storybookjs/storybook/pull/24389), thanks [@Integrayshaun](https://github.com/Integrayshaun)!"}}
{"version":"7.5.2","info":{"plain":"- Addon-themes: Fix globals not being set when using absolute path - [#24596](https://github.com/storybookjs/storybook/pull/24596), thanks [@JReinhold](https://github.com/JReinhold)!\n- CLI: Allow Yarn v4 in `link` command - [#24551](https://github.com/storybookjs/storybook/pull/24551), thanks [@yannbf](https://github.com/yannbf)!\n- Next.js: Support v14.0.0 - [#24593](https://github.com/storybookjs/storybook/pull/24593), thanks [@nikospapcom](https://github.com/nikospapcom)!"}}
2 changes: 1 addition & 1 deletion docs/versions/next.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"7.6.0-alpha.0","info":{"plain":"- UI: Fix className missing in syntaxhighlighter - [#24491](https://github.com/storybookjs/storybook/pull/24491), thanks [@ndelangen](https://github.com/ndelangen)!"}}
{"version":"7.6.0-alpha.3","info":{"plain":"- Action: Attach spies on actions across stories when defined in meta - [#24451](https://github.com/storybookjs/storybook/pull/24451), thanks [@kasperpeulen](https://github.com/kasperpeulen)!\n- Addon A11y: Avoid CSP issue - [#24477](https://github.com/storybookjs/storybook/pull/24477), thanks [@Marklb](https://github.com/Marklb)!\n- Addon-themes: Fix globals not being set when using absolute path - [#24596](https://github.com/storybookjs/storybook/pull/24596), thanks [@JReinhold](https://github.com/JReinhold)!\n- CLI: Allow Yarn v4 in `link` command - [#24551](https://github.com/storybookjs/storybook/pull/24551), thanks [@yannbf](https://github.com/yannbf)!\n- Core-Server: Ignore all node_module folders for watchpack - [#24553](https://github.com/storybookjs/storybook/pull/24553), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Core: Fix pnp support when cache dir is outside working dir - [#24572](https://github.com/storybookjs/storybook/pull/24572), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!\n- Manager: Update `store.settings.lastTrackedStoryId` - [#24115](https://github.com/storybookjs/storybook/pull/24115), thanks [@rashidshamloo](https://github.com/rashidshamloo)!\n- Next.js: Support v14.0.0 - [#24593](https://github.com/storybookjs/storybook/pull/24593), thanks [@nikospapcom](https://github.com/nikospapcom)!\n- Test: Create @storybook/test package based on vitest - [#24392](https://github.com/storybookjs/storybook/pull/24392), thanks [@kasperpeulen](https://github.com/kasperpeulen)!"}}