Skip to content

Commit

Permalink
Merge branch 'next' into shilman/initial-globals
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman authored Jun 6, 2024
2 parents 686626e + 17b7512 commit 61d6ee7
Show file tree
Hide file tree
Showing 89 changed files with 472 additions and 547 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 8.1.6

- CLI: Only log the UpgradeStorybookToSameVersionError but continue the upgrade as normal - [#27217](https://github.com/storybookjs/storybook/pull/27217), thanks @kasperpeulen!
- Core: Replace ip function with a small helper function to address security concerns - [#27529](https://github.com/storybookjs/storybook/pull/27529), thanks @tony19!
- Tags: Fix unsafe project-level tags lookup - [#27511](https://github.com/storybookjs/storybook/pull/27511), thanks @shilman!
- Vite: Fix stats-plugin to normalize file names with posix paths - [#27218](https://github.com/storybookjs/storybook/pull/27218), thanks @AlexAtVista!

## 8.1.5

- CSF-Tools: Fix export specifier bug - [#27418](https://github.com/storybookjs/storybook/pull/27418), thanks @valentinpalkovic!
Expand Down
2 changes: 1 addition & 1 deletion [email protected][email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
12 changes: 6 additions & 6 deletions code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./decorator": {
"types": "./dist/decorator.d.ts",
"require": "./dist/decorator.js",
"import": "./dist/decorator.mjs"
"import": "./dist/decorator.mjs",
"require": "./dist/decorator.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./register.js": "./dist/manager.js",
Expand Down
1 change: 1 addition & 0 deletions code/addons/actions/src/loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const logActionsWhenMockCalled: LoaderFunction = (context) => {
const onMockCall = global.__STORYBOOK_TEST_ON_MOCK_CALL__ as typeof onMockCallType;
onMockCall((mock, args) => {
const name = mock.getMockName();
if (name === 'spy') return;

// TODO: Make this a configurable API in 8.2
if (
Expand Down
8 changes: 4 additions & 4 deletions code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
12 changes: 7 additions & 5 deletions code/addons/docs/docs/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,16 +259,18 @@ Example.parameters = {
};
```

Alternatively, you can provide a function in the `docs.transformSource` parameter. For example, the following snippet in `.storybook/preview.js` globally removes the arrow at the beginning of a function that returns a string:
Alternatively, you can provide a function in the `docs.source.transform` parameter. For example, the following snippet in `.storybook/preview.js` globally removes the arrow at the beginning of a function that returns a string:

```js
const SOURCE_REGEX = /^\(\) => `(.*)`$/;
export const parameters = {
docs: {
transformSource: (src, storyContext) => {
const match = SOURCE_REGEX.exec(src);
return match ? match[1] : src;
},
source: {
transform: (src, storyContext) => {
const match = SOURCE_REGEX.exec(src);
return match ? match[1] : src;
}
}
},
};
```
Expand Down
30 changes: 15 additions & 15 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,44 @@
"license": "MIT",
"exports": {
".": {
"node": "./dist/index.js",
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"node": "./dist/index.js",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./preset": {
"types": "./dist/preset.d.ts",
"require": "./dist/preset.js",
"import": "./dist/preset.js"
"import": "./dist/preset.js",
"require": "./dist/preset.js"
},
"./blocks": {
"types": "./dist/blocks.d.ts",
"require": "./dist/blocks.js",
"import": "./dist/blocks.mjs"
"import": "./dist/blocks.mjs",
"require": "./dist/blocks.js"
},
"./dist/preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./dist/preset": {
"types": "./dist/preset.d.ts",
"require": "./dist/preset.js"
},
"./dist/shims/mdx-react-shim": {
"types": "./dist/shims/mdx-react-shim.d.ts",
"require": "./dist/shims/mdx-react-shim.js",
"import": "./dist/shims/mdx-react-shim.mjs"
"import": "./dist/shims/mdx-react-shim.mjs",
"require": "./dist/shims/mdx-react-shim.js"
},
"./mdx-react-shim": {
"types": "./dist/shims/mdx-react-shim.d.ts",
"require": "./dist/shims/mdx-react-shim.js",
"import": "./dist/shims/mdx-react-shim.mjs"
"import": "./dist/shims/mdx-react-shim.mjs",
"require": "./dist/shims/mdx-react-shim.js"
},
"./mdx-loader": "./dist/mdx-loader.js",
"./svelte/HOC.svelte": "./svelte/HOC.svelte",
Expand Down
6 changes: 3 additions & 3 deletions code/addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"license": "MIT",
"exports": {
".": {
"node": "./dist/index.js",
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"node": "./dist/index.js",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./actions/preview": {
"types": "./dist/actions/preview.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions code/addons/highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./package.json": "./package.json"
},
Expand Down
8 changes: 4 additions & 4 deletions code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./preset": "./dist/preset.js",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
12 changes: 6 additions & 6 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"require": "./dist/react/index.js",
"import": "./dist/react/index.mjs"
"import": "./dist/react/index.mjs",
"require": "./dist/react/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
8 changes: 4 additions & 4 deletions code/addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./preset": "./dist/preset.js",
Expand Down
8 changes: 4 additions & 4 deletions code/addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/storysource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preset": "./dist/preset.js",
"./manager": "./dist/manager.js",
Expand Down
8 changes: 4 additions & 4 deletions code/addons/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./package.json": "./package.json",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/toolbars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
8 changes: 4 additions & 4 deletions code/addons/viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
"import": "./dist/preview.mjs",
"require": "./dist/preview.js"
},
"./manager": "./dist/manager.js",
"./package.json": "./package.json"
Expand Down
4 changes: 2 additions & 2 deletions code/builders/builder-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand Down
4 changes: 2 additions & 2 deletions code/builders/builder-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
".": {
"types": "./dist/index.d.ts",
"node": "./dist/index.js",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./input/iframe.html": "./input/iframe.html",
"./package.json": "./package.json"
Expand Down
Loading

0 comments on commit 61d6ee7

Please sign in to comment.