Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into kapser/test-package2
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Oct 27, 2023
2 parents 4f08e77 + 7726afc commit 4e993be
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 75 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ No process is defined for this.

### Merges to `main` without versioning

As described in more details in [the Patch Releases section](#patch-releases), there are scenarios where you want to patch [unreleasable](#which-changes-are-considered-releasable-and-what-does-it-mean) content back to `main` without bumping versions or publishing a new release. This happens automatically as long as all the unpicked patch pull requests have unreleasable labels. In that case the prepared patch pull request will change form slighty, to just cherry-picking the patches without bumping the versions.
As described in more details in [the Patch Releases section](#patch-releases), there are scenarios where you want to patch [unreleasable](#which-changes-are-considered-releasable-and-what-does-it-mean) content back to `main` without bumping versions or publishing a new release. This happens automatically as long as all the unpicked patch pull requests have unreleasable labels. In that case the prepared patch pull request will change form slightly, to just cherry-picking the patches without bumping the versions.

## FAQ

Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default {

### Options

You can be pass an options object for addional configuration if needed.
You can be pass an options object for additional configuration if needed.

For example:

Expand Down Expand Up @@ -864,7 +864,7 @@ Next.js comes with a lot of things for free out of the box like sass support, bu

Any webpack modifications desired for Storybook should be made in [.storybook/main.js](https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config).

Note: Not all webpack modifications are copy/paste-able between `next.config.js` and `.storybook/main.js`. It is recommended to do your reasearch on how to properly make your modifcation to Storybook's webpack config and on how [webpack works](https://webpack.js.org/concepts/).
Note: Not all webpack modifications are copy/paste-able between `next.config.js` and `.storybook/main.js`. It is recommended to do your research on how to properly make your modification to Storybook's webpack config and on how [webpack works](https://webpack.js.org/concepts/).

Below is an example of how to add svgr support to Storybook with this framework.

Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@
"@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 || ^14.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",
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
2 changes: 1 addition & 1 deletion code/lib/instrumenter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Storybook Instrumenter

The Storybook Instrumenter is used to patch a (3rd party) module to track and intercept function invocations for step-through debugging using the Interactions addon. In essense, the Instrumenter traverses a given object, recursively monkey-patching any functions to make them "tracked".
The Storybook Instrumenter is used to patch a (3rd party) module to track and intercept function invocations for step-through debugging using the Interactions addon. In essence, the Instrumenter traverses a given object, recursively monkey-patching any functions to make them "tracked".

During normal operation, tracked functions simply call through to their original function, forwarding the return value. As a side-effect, they also emit a `call` event whenever they are invoked.

Expand Down
2 changes: 1 addition & 1 deletion code/lib/postinstall/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Storybook Postinstall Utilties
# Storybook Postinstall Utilities

A minimal utility library for addons to update project configurations after the addon is installed via the [Storybook CLI](https://github.com/storybookjs/storybook/tree/main/lib/cli), e.g. `sb add docs`.

Expand Down
2 changes: 1 addition & 1 deletion code/presets/create-react-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = {

### Custom `react-scripts` packages

In most cases, this preset will find your `react-scripts` package, even if it's a fork of the offical `react-scripts`.
In most cases, this preset will find your `react-scripts` package, even if it's a fork of the official `react-scripts`.

In the event that it doesn't, you can set the package's name with `scriptsPackageName`.

Expand Down
96 changes: 48 additions & 48 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3973,72 +3973,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 @@ -7326,7 +7326,7 @@ __metadata:
fs-extra: "npm:^11.1.0"
image-size: "npm:^1.0.0"
loader-utils: "npm:^3.2.0"
next: "npm:13.5.4"
next: "npm:^14.0.0"
node-polyfill-webpack-plugin: "npm:^2.0.1"
pnp-webpack-plugin: "npm:^1.7.0"
postcss: "npm:^8.4.21"
Expand All @@ -7342,7 +7342,7 @@ __metadata:
typescript: "npm:^4.9.3"
webpack: "npm:^5.65.0"
peerDependencies:
"@next/font": ^13.0.0 || ^14.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
Expand Down Expand Up @@ -24118,20 +24118,20 @@ __metadata:
languageName: node
linkType: hard

"next@npm:13.5.4":
version: 13.5.4
resolution: "next@npm:13.5.4"
dependencies:
"@next/env": "npm:13.5.4"
"@next/swc-darwin-arm64": "npm:13.5.4"
"@next/swc-darwin-x64": "npm:13.5.4"
"@next/swc-linux-arm64-gnu": "npm:13.5.4"
"@next/swc-linux-arm64-musl": "npm:13.5.4"
"@next/swc-linux-x64-gnu": "npm:13.5.4"
"@next/swc-linux-x64-musl": "npm:13.5.4"
"@next/swc-win32-arm64-msvc": "npm:13.5.4"
"@next/swc-win32-ia32-msvc": "npm:13.5.4"
"@next/swc-win32-x64-msvc": "npm:13.5.4"
"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"
Expand Down Expand Up @@ -24169,7 +24169,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/api/main-config-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ Enable crash reports to be sent to Storybook [telemetry](../configure/telemetry.

Type: `RendererName`

<!-- TOOD: Is this used? Should it be documented? -->
<!-- TODO: Is this used? Should it be documented? -->
2 changes: 1 addition & 1 deletion docs/sharing/publish-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Examples: [Netlify](https://www.netlify.com/), [S3](https://aws.amazon.com/en/s3

## Search engine optimization (SEO)

If your Storybook is publically viewable, you may wish to configure how it is represented in search engine result pages.
If your Storybook is publicly viewable, you may wish to configure how it is represented in search engine result pages.

### Description

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DelayedStory: Story = {

const exampleElement = canvas.getByLabelText('example-element');

// The delay option set the ammount of milliseconds between characters being typed
// The delay option sets the amount of milliseconds between characters being typed
await userEvent.type(exampleElement, 'random string', {
delay: 100,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const DelayedStory = {

const exampleElement = canvas.getByLabelText('example-element');

// The delay option set the ammount of milliseconds between characters being typed
// The delay option sets the amount of milliseconds between characters being typed
await userEvent.type(exampleElement, 'random string', {
delay: 100,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DelayedStory: Story = {

const exampleElement = canvas.getByLabelText('example-element');

// The delay option set the ammount of milliseconds between characters being typed
// The delay option sets the amount of milliseconds between characters being typed
await userEvent.type(exampleElement, 'random string', {
delay: 100,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DelayedStory: Story = {

const exampleElement = canvas.getByLabelText('example-element');

// The delay option set the ammount of milliseconds between characters being typed
// The delay option sets the amount of milliseconds between characters being typed
await userEvent.type(exampleElement, 'random string', {
delay: 100,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const DelayedStory = {

const exampleElement = canvas.getByLabelText('example-element');

// The delay option set the ammount of milliseconds between characters being typed
// The delay option sets the amount of milliseconds between characters being typed
await userEvent.type(exampleElement, 'random string', {
delay: 100,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const DelayedStory: Story = {

const exampleElement = canvas.getByLabelText('example-element');

// The delay option set the ammount of milliseconds between characters being typed
// The delay option sets the amount of milliseconds between characters being typed
await userEvent.type(exampleElement, 'random string', {
delay: 100,
});
Expand Down

0 comments on commit 4e993be

Please sign in to comment.