Skip to content

Commit

Permalink
Merge pull request #25882 from storybookjs/version-non-patch-from-8.0…
Browse files Browse the repository at this point in the history
….0-beta.0

Release: Prerelease 8.0.0-beta.1
  • Loading branch information
shilman authored Feb 6, 2024
2 parents 33099fd + 96e28b5 commit a25273b
Show file tree
Hide file tree
Showing 69 changed files with 443 additions and 510 deletions.
67 changes: 1 addition & 66 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ executors:
default: "small"
working_directory: /tmp/storybook
docker:
- image: mcr.microsoft.com/playwright:v1.41.1-jammy
- image: mcr.microsoft.com/playwright:v1.36.0-focal
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand Down Expand Up @@ -359,19 +359,6 @@ jobs:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.14.0
nvm alias default 18.14.0
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Running Test Runner
command: yarn task --task test-runner --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner) --no-link --start-from=never --junit
Expand All @@ -392,19 +379,6 @@ jobs:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.14.0
nvm alias default 18.14.0
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Running Test Runner in Dev mode
command: yarn task --task test-runner-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner-dev) --no-link --start-from=never --junit
Expand Down Expand Up @@ -444,19 +418,6 @@ jobs:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.14.0
nvm alias default 18.14.0
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Running E2E Tests
command: yarn task --task e2e-tests --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests) --no-link --start-from=never --junit
Expand All @@ -480,19 +441,6 @@ jobs:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.14.0
nvm alias default 18.14.0
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Running E2E Tests
command: yarn task --task e2e-tests-dev --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev) --no-link --start-from=never --junit
Expand All @@ -516,19 +464,6 @@ jobs:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.14.0
nvm alias default 18.14.0
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Running Bench
command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 8.0.0-beta.1

- Addon-docs: Fix MDX components not applied in Vite and theme loading twice - [#25925](https://github.com/storybookjs/storybook/pull/25925), thanks [@JReinhold](https://github.com/JReinhold)!
- Core: Fix React peer dependency warnings - [#25926](https://github.com/storybookjs/storybook/pull/25926), thanks [@JReinhold](https://github.com/JReinhold)!
- Core: Remove CSF batching, as it isn't required any more - [#25872](https://github.com/storybookjs/storybook/pull/25872), thanks [@tmeasday](https://github.com/tmeasday)!
- Next.js: Fix frameworkOptions resolution - [#25907](https://github.com/storybookjs/storybook/pull/25907), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- React Native: Fix init fails when package is already installed - [#25908](https://github.com/storybookjs/storybook/pull/25908), thanks [@dannyhw](https://github.com/dannyhw)!
- React Native: Remove watcher from init - [#25895](https://github.com/storybookjs/storybook/pull/25895), thanks [@dannyhw](https://github.com/dannyhw)!
- Test: Fix jest-dom matcher type imports - [#25869](https://github.com/storybookjs/storybook/pull/25869), thanks [@alitas](https://github.com/alitas)!
- UI: Fix overlapping on the ref button in the sidebar - [#25914](https://github.com/storybookjs/storybook/pull/25914), thanks [@cdedreuille](https://github.com/cdedreuille)!
- UI: Remove keyboard shortcut hint in search bar on mobile viewports - [#25866](https://github.com/storybookjs/storybook/pull/25866), thanks [@tusharwebd](https://github.com/tusharwebd)!

## 8.0.0-beta.0

- CLI: Add Visual Tests addon to `init` - [#25850](https://github.com/storybookjs/storybook/pull/25850), thanks [@shilman](https://github.com/shilman)!
Expand Down
13 changes: 13 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
- [Removed stories.json](#removed-storiesjson)
- [Removed `sb babelrc` command](#removed-sb-babelrc-command)
- [Changed interfaces for `@storybook/router` components](#changed-interfaces-for-storybookrouter-components)
- [Extract no longer batches](#extract-no-longer-batches)
- [Framework-specific changes](#framework-specific-changes)
- [React](#react)
- [`react-docgen` component analysis by default](#react-docgen-component-analysis-by-default)
- [Next.js](#nextjs)
- [Require Next.js 13.5 and up](#require-nextjs-135-and-up)
- [Automatic SWC mode detection](#automatic-swc-mode-detection)
- [RSC config moved to React renderer](#rsc-config-moved-to-react-renderer)
- [Vue](#vue)
- [Require Vue 3 and up](#require-vue-3-and-up)
- [Angular](#angular)
- [Require Angular 15 and up](#require-angular-15-and-up)
- [Svelte](#svelte)
Expand Down Expand Up @@ -710,6 +713,10 @@ The reasoning behind is to condense and provide some clarity to what's happened

The `hideOnly` prop has been removed from the `<Route />` component in `@storybook/router`. If needed this can be implemented manually with the `<Match />` component.

#### Extract no longer batches

`Preview.extract()` no longer loads CSF files in batches. This was a workaround for resource limitations that slowed down extract. This shouldn't affect behaviour.

### Framework-specific changes

#### React
Expand Down Expand Up @@ -749,6 +756,12 @@ Storybook 7.6 introduced a new feature flag, `experimentalNextRSC`, to enable Re

These flags have been renamed to `experimentalRSC` and `react.rsc`, respectively. This is a breaking change to accommodate RSC support in other, non-Next.js frameworks. For now, `@storybook/nextjs` is the only framework that supports it, and does so experimentally.

#### Vue

##### Require Vue 3 and up

Starting in 8.0, Storybook requires Vue 3 and up.

#### Angular

##### Require Angular 15 and up
Expand Down
2 changes: 1 addition & 1 deletion code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.3",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/icons": "^1.2.3",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/docs/props-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ This package relies on a variety of sub-packages to extract property information
| Framework | Underlying library | Docs | Open issues |
| -------------- | ---------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| React | `react-docgen` `react-docgen-typescript` | [Docs](../react/README.md#props-tables) | [Open issues](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22block%3A+props%22+label%3Abug+label%3A%22app%3A+react%22) |
| Vue 3 | `vue-docgen-api` | [Docs](../vue3/README.md#props-tables) | [Open issues](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22block%3A+props%22+label%3Abug+label%3A%22vue3%22) |
| Vue 3 | `vue-docgen-api` | [Docs](../vue3/README.md#props-tables) | [Open issues](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22block%3A+props%22+label%3Abug+label%3A%22vue3%22) |
| Angular | `compodoc` | [Docs](../angular/README.md#props-tables) | [Open issues](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22block%3A+props%22+label%3Abug+label%3A%22app%3A+angular%22) |
| Web-components | `custom-elements.json` | [Docs](../web-components/README.md#props-tables) | [Open issues](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22block%3A+props%22+label%3Abug+label%3A%22app%3A+web-components%22) |
| Ember | `yui-doc` | [Docs](../ember/README.md#props-tables) | [Open issues](https://github.com/storybookjs/storybook/issues?q=is%3Aopen+is%3Aissue+label%3A%22block%3A+props%22+label%3Abug+label%3A%22app%3A+ember%22) |
Expand Down
7 changes: 5 additions & 2 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@
"@storybook/react-dom-shim": "workspace:*",
"@storybook/theming": "workspace:*",
"@storybook/types": "workspace:*",
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"fs-extra": "^11.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"rehype-external-links": "^3.0.0",
"rehype-slug": "^6.0.0",
"ts-dedent": "^2.0.0"
Expand All @@ -122,6 +123,8 @@
"@mdx-js/mdx": "^3.0.0",
"@rollup/pluginutils": "^5.0.2",
"@storybook/test": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2",
"vite": "^4.0.4"
},
Expand Down
10 changes: 6 additions & 4 deletions code/addons/docs/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,26 @@ export const viteFinal = async (config: any, options: Options) => {
const { mdxPlugin } = await import('./plugins/mdx-plugin');

// Use the resolvedReact preset to alias react and react-dom to either the users version or the version shipped with addon-docs
const { react, reactDom } = await getResolvedReact(options);
const { react, reactDom, mdx } = await getResolvedReact(options);

const reactAliasPlugin = {
name: 'storybook:react-alias',
const packageDeduplicationPlugin = {
name: 'storybook:package-deduplication',
enforce: 'pre',
config: () => ({
resolve: {
alias: {
react,
'react-dom': reactDom,
'@mdx-js/react': mdx,
},
dedupe: ['@storybook/theming', '@storybook/components', '@storybook/blocks'],
},
}),
};

// add alias plugin early to ensure any other plugins that also add the aliases will override this
// eg. the preact vite plugin adds its own aliases
plugins.unshift(reactAliasPlugin);
plugins.unshift(packageDeduplicationPlugin);
plugins.push(mdxPlugin(options));

return config;
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.3",
"@storybook/types": "workspace:*",
"jest-mock": "^27.0.6",
"polished": "^4.2.2",
Expand All @@ -62,6 +61,7 @@
"@storybook/components": "workspace:*",
"@storybook/core-common": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/icons": "^1.2.3",
"@storybook/instrumenter": "workspace:*",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.3",
"tiny-invariant": "^1.3.1"
},
"devDependencies": {
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/icons": "^1.2.3",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.3",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/icons": "^1.2.3",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/types": "workspace:*",
Expand Down
96 changes: 59 additions & 37 deletions code/builders/builder-vite/input/iframe.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,66 @@
<!DOCTYPE html>
<!doctype html>
<!--suppress HtmlUnknownTarget -->
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Storybook</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<head>
<meta charset="utf-8" />
<title>Storybook</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-regular.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-italic.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-bold.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link
rel="prefetch"
href="./sb-common-assets/nunito-sans-bold-italic.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<link rel="stylesheet" href="./sb-common-assets/fonts.css" />

<link rel="prefetch" href="./sb-common-assets/nunito-sans-regular.woff2" as="font" type="font/woff2" crossorigin />
<link rel="prefetch" href="./sb-common-assets/nunito-sans-italic.woff2" as="font" type="font/woff2" crossorigin />
<link rel="prefetch" href="./sb-common-assets/nunito-sans-bold.woff2" as="font" type="font/woff2" crossorigin />
<link rel="prefetch" href="./sb-common-assets/nunito-sans-bold-italic.woff2" as="font" type="font/woff2" crossorigin />
<link rel="stylesheet" href="./sb-common-assets/fonts.css" />
<script>
window.CONFIG_TYPE = '[CONFIG_TYPE HERE]';
window.LOGLEVEL = '[LOGLEVEL HERE]';
window.FRAMEWORK_OPTIONS = '[FRAMEWORK_OPTIONS HERE]';
window.CHANNEL_OPTIONS = '[CHANNEL_OPTIONS HERE]';
window.FEATURES = '[FEATURES HERE]';
window.STORIES = '[STORIES HERE]';
window.DOCS_OPTIONS = '[DOCS_OPTIONS HERE]';
window.TAGS_OPTIONS = '[TAGS_OPTIONS HERE]';

<script>
window.CONFIG_TYPE = '[CONFIG_TYPE HERE]';
window.LOGLEVEL = '[LOGLEVEL HERE]';
window.FRAMEWORK_OPTIONS = '[FRAMEWORK_OPTIONS HERE]';
window.CHANNEL_OPTIONS = '[CHANNEL_OPTIONS HERE]';
window.FEATURES = '[FEATURES HERE]';
window.STORIES = '[STORIES HERE]';
window.DOCS_OPTIONS = '[DOCS_OPTIONS HERE]';
window.TAGS_OPTIONS = '[TAGS_OPTIONS HERE]';
('OTHER_GLOBLALS HERE');

('OTHER_GLOBLALS HERE');
// We do this so that "module && module.hot" etc. in Storybook source code
// doesn't fail (it will simply be disabled)
window.module = undefined;
window.global = window;
</script>
<!-- [HEAD HTML SNIPPET HERE] -->
</head>

// We do this so that "module && module.hot" etc. in Storybook source code
// doesn't fail (it will simply be disabled)
window.module = undefined;
window.global = window;
</script>
<!-- [HEAD HTML SNIPPET HERE] -->
</head>

<body>
<!-- [BODY HTML SNIPPET HERE] -->
<div id="storybook-root"></div>
<div id="storybook-docs"></div>
<script type="module" src="./sb-preview/runtime.js"></script>
<script type="module" src="/virtual:/@storybook/builder-vite/vite-app.js"></script>
</body>

</html>
<body>
<!-- [BODY HTML SNIPPET HERE] -->
<div id="storybook-root"></div>
<div id="storybook-docs"></div>
<script type="module" src="./sb-preview/runtime.js"></script>
<script type="module" src="/virtual:/@storybook/builder-vite/vite-app.js"></script>
</body>
</html>
Loading

0 comments on commit a25273b

Please sign in to comment.