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: Prerelease 8.0.0-alpha.9 #25493

Merged
merged 159 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
534e49c
Initial run-through deleting all ssv6 code
tmeasday Oct 30, 2023
01836ba
Convert all Preview Web code to async/await
tmeasday Oct 30, 2023
7e1e2b6
Small fixups
tmeasday Oct 30, 2023
d21b6b4
Remove public APIs from packages
tmeasday Oct 31, 2023
36f2199
Drop unused vars
tmeasday Oct 31, 2023
b3dcefe
Remove unused var
tmeasday Nov 1, 2023
4b9abd6
Drop `buildStoriesJson` flag
tmeasday Nov 1, 2023
fc2236c
Remove unused imports
tmeasday Nov 1, 2023
a80b47c
remove all references of storyStoreV7
ndelangen Nov 1, 2023
9ab83e8
delete unused files
ndelangen Nov 1, 2023
a71d368
remove unused files
ndelangen Nov 1, 2023
0d995eb
cleanup
ndelangen Nov 1, 2023
c66a48b
disable broken tests
ndelangen Nov 1, 2023
811c4e9
cleanup
ndelangen Nov 1, 2023
dc02dd3
Merge branch 'tom/remove-ssv6' into norbert/remove-storystorev7
ndelangen Nov 2, 2023
99dabfe
Merge branch 'release-8-0' into norbert/remove-storystorev7
ndelangen Nov 2, 2023
7403b82
fix
ndelangen Nov 2, 2023
1bbaa48
fix
ndelangen Nov 2, 2023
53b4827
Merge branch 'norbert/remove-storiesof' into norbert/remove-storystorev7
ndelangen Nov 2, 2023
0285cd1
cleanup
ndelangen Nov 2, 2023
b20ea34
Merge branch 'norbert/remove-storiesof' into norbert/remove-storystorev7
ndelangen Nov 2, 2023
a4ffcf1
make it work
ndelangen Nov 2, 2023
191cafc
Merge branch 'release-8-0' into norbert/remove-storystorev7
ndelangen Nov 24, 2023
4ab1b3e
update exports file
ndelangen Nov 24, 2023
15ad095
Merge branch 'next' into norbert/remove-storystorev7
ndelangen Dec 11, 2023
7f4f035
fix
ndelangen Dec 12, 2023
17784c1
Merge branch 'next' into norbert/remove-storystorev7
valentinpalkovic Dec 13, 2023
32747ee
Merge branch 'next' into norbert/remove-storystorev7
ndelangen Dec 19, 2023
c82ddc3
fixes
ndelangen Dec 19, 2023
1d520ad
CSF-tools: Allow type checking in storySort
honzahruby Dec 19, 2023
c906835
CLI: Never prompt for ESLint plugin
shilman Dec 20, 2023
6c48ab8
Merge branch 'next' into norbert/remove-storystorev7
ndelangen Dec 21, 2023
0688ef0
Remove Babel from webpack5 builder
valentinpalkovic Dec 28, 2023
cf05ed1
Remove babel cache preset from core-server
valentinpalkovic Dec 28, 2023
89ec937
Remove internal swc-webpack template
valentinpalkovic Dec 28, 2023
badd683
Adjust CLI Init to install appropriate Webpack5 compiler
valentinpalkovic Dec 28, 2023
d88b388
Do not apply default babel plugins for preact
valentinpalkovic Dec 28, 2023
2cfff03
Remove Preact 8 support
valentinpalkovic Dec 28, 2023
a3d0330
Remove fast-refresh
valentinpalkovic Dec 28, 2023
ce4f309
Remove deprecated code
valentinpalkovic Dec 28, 2023
83a0254
Update lock file
valentinpalkovic Dec 28, 2023
415e913
Docs: Writing addons changes for peer-deps
jonniebigodes Dec 28, 2023
5023619
Add custom babel-loader to Next.js
valentinpalkovic Dec 29, 2023
75a0937
Readd babel-plugin-react-docgen for testing purposes
valentinpalkovic Dec 29, 2023
c1d748a
Only use swc mode in Next.js for version gte 14
valentinpalkovic Dec 29, 2023
df14928
Readd webpack module.rules to babel and swc loader configuration
valentinpalkovic Dec 29, 2023
18b2788
Merge branch 'next' into docs_addons_changes
jonniebigodes Dec 29, 2023
f164cd1
Fix build step
valentinpalkovic Dec 29, 2023
ec5c571
Implement fast refresh for Next.js
valentinpalkovic Dec 29, 2023
b03d483
Add custom babel-loader to Ember.js
valentinpalkovic Dec 30, 2023
1f8db9e
Remove @swc/core package
valentinpalkovic Dec 30, 2023
9ed26ab
Add Migration note to Next.js SWC mode
valentinpalkovic Dec 30, 2023
105e3ff
Add Migration note for Preact
valentinpalkovic Dec 30, 2023
da46a9e
Add Migration note to drop support for Preact < 10
valentinpalkovic Dec 30, 2023
068cdf1
Add note to addon authors for optional babel usage
valentinpalkovic Dec 30, 2023
56ff8b2
Readd deleted snippets
valentinpalkovic Dec 30, 2023
bb9370c
Add Migration note for removing fastRefresh option
valentinpalkovic Dec 30, 2023
0da6d73
fix: import error
unional Dec 30, 2023
9661b7e
docs: misc cleanup on contributing guide
unional Dec 30, 2023
6808657
Add cache directory to babel-loaders
valentinpalkovic Jan 2, 2024
6c5b0b8
Add migration note for babel/swc removal
valentinpalkovic Jan 2, 2024
c82e215
Upgrade yarn.lock
valentinpalkovic Jan 2, 2024
ef3da4c
Merge remote-tracking branch 'origin/next' into valentin/remove-babel…
valentinpalkovic Jan 2, 2024
5bd0359
fix https://github.com/storybookjs/storybook/issues/25404
ndelangen Jan 3, 2024
c5e3e50
Merge branch 'next' into docs_addons_changes
jonniebigodes Jan 3, 2024
8439fb7
Merge branch 'next' into norbert/remove-storystorev7
ndelangen Jan 3, 2024
dbcade2
Merge remote-tracking branch 'origin/next' into valentin/remove-babel…
valentinpalkovic Jan 3, 2024
fc113e3
add migration note about react 18 in the manager
ndelangen Jan 3, 2024
b8db539
Add migration note for web-component projects
valentinpalkovic Jan 3, 2024
7295177
add migration notes about storiesOf removal
ndelangen Jan 3, 2024
71b8c2f
Update button-story-default-export-with-component.ts.mdx
wuzhuobin Jan 3, 2024
d7030fe
Merge branch 'next' into patch-2
jonniebigodes Jan 3, 2024
7252575
Update MIGRATION.md
ndelangen Jan 3, 2024
d2c59b3
fix: to support sanitize for case-insensitive trailing duplicate
ksugawara61 Jan 4, 2024
87cd401
Merge remote-tracking branch 'origin/next' into valentin/remove-babel…
valentinpalkovic Jan 4, 2024
0c78429
Add more details to SWC configuration option in TypeScript
valentinpalkovic Jan 5, 2024
b29c24f
Merge branch 'next' into valentin/remove-babel-from-webpack5-builder
valentinpalkovic Jan 5, 2024
0e638f6
Avoid implicit any in preact-webpack
valentinpalkovic Jan 5, 2024
e2d9306
Restructure dependencies in ember package.json
valentinpalkovic Jan 5, 2024
2b606eb
Add migration note for sb babelrc removal
valentinpalkovic Jan 5, 2024
3854cc2
Beautify Migration.md
valentinpalkovic Jan 5, 2024
30ac388
Beautify Migration.md
valentinpalkovic Jan 5, 2024
88c212a
Update lock file
valentinpalkovic Jan 5, 2024
ccbb6e4
Update snapshot
valentinpalkovic Jan 5, 2024
b8d0969
Format docs
valentinpalkovic Jan 5, 2024
2a83033
Add missing semver dep to cra preset
valentinpalkovic Jan 5, 2024
33f6196
Add compiler addon to package.json
valentinpalkovic Jan 5, 2024
7b18c3a
Add Compiler addons to verdaccio config
valentinpalkovic Jan 5, 2024
75087a2
Fix overridePresets loading in build-dev/static
valentinpalkovic Jan 5, 2024
c0c8ae2
fix package manager related issues
yannbf Jan 5, 2024
4754c78
Merge branch 'next' into norbert/remove-storystorev7
ndelangen Jan 5, 2024
66a2a69
Set enforce: pre to react docgen loader
valentinpalkovic Jan 5, 2024
1358226
remove docs references to storyStoreV7
ndelangen Jan 5, 2024
f04ab82
remove more
ndelangen Jan 5, 2024
7633037
upgrade to latest icons
ndelangen Jan 5, 2024
bb7452d
Setup a babel webpack5 react sandbox
valentinpalkovic Jan 5, 2024
e96fa9d
Merge branch 'next' into jeppe/fix-package-manager-issues
valentinpalkovic Jan 5, 2024
02f1825
Core: Remove deprecated createChannel APIs
yannbf Jan 5, 2024
548a5ba
Documentation: Add note about Yarn 1 dropped support
yannbf Jan 5, 2024
28b76a3
upgrades
ndelangen Jan 5, 2024
3e38d5d
fix typings
ndelangen Jan 5, 2024
8461727
fix snapshots
ndelangen Jan 5, 2024
e71db1b
fix typings
ndelangen Jan 5, 2024
98e5882
Merge branch 'next' into norbert/remove-storystorev7
ndelangen Jan 6, 2024
746513b
Merge pull request #25426 from storybookjs/norbert/fix-8-0-visual-tes…
shilman Jan 6, 2024
ef272b6
Merge branch 'next' into docs_addons_changes
jonniebigodes Jan 6, 2024
1217a9e
Merge pull request #25356 from storybookjs/docs_addons_changes
jonniebigodes Jan 6, 2024
2960fe1
Merge branch 'next' into patch-2
jonniebigodes Jan 7, 2024
9596420
Merge pull request #25439 from wuzhuobin/patch-2
jonniebigodes Jan 7, 2024
164c68c
Fix type hint for StoryObj type
nkabrown Jan 7, 2024
c017e0d
Add requested documentation changes
valentinpalkovic Jan 8, 2024
efe0ebd
Merge pull request #25488 from storybookjs/yann/add-yarn1-remark
valentinpalkovic Jan 8, 2024
93aea84
Merge remote-tracking branch 'origin/next' into valentin/remove-babel…
valentinpalkovic Jan 8, 2024
d343aef
Prettify docs
valentinpalkovic Jan 8, 2024
5c1a76d
Update yarn.lock
valentinpalkovic Jan 8, 2024
2ade10d
Downgrade markdown-to-jsx
valentinpalkovic Jan 8, 2024
be9c746
Merge pull request #25391 from unional/import-error2
shilman Jan 8, 2024
c1edba0
Merge branch 'next' into shilman/remove-eslint-prompt
shilman Jan 8, 2024
03cf69c
Remove buildStoriesJson references in docs
valentinpalkovic Jan 8, 2024
8bd86ad
Remove unnecessary await
valentinpalkovic Jan 8, 2024
d56f6ec
Merge branch 'next' into pr/25265
shilman Jan 8, 2024
4335bf3
Merge pull request #25289 from storybookjs/shilman/remove-eslint-prompt
shilman Jan 8, 2024
3f2597f
Merge branch 'next' into cont-clean
shilman Jan 8, 2024
6302cc6
Merge pull request #25497 from nkabrown/csfv3-story-object
shilman Jan 8, 2024
898557a
Merge pull request #25452 from ksugawara61/case-insensitive-trailing-…
shilman Jan 8, 2024
5ea8b27
Merge pull request #25393 from unional/cont-clean
shilman Jan 8, 2024
b1c571d
Add test
shilman Jan 8, 2024
e736dc7
Merge pull request #25265 from honzahruby/story-sort-types
shilman Jan 8, 2024
5a23de2
Add Parameters API reference
kylegach Jan 5, 2024
c4d3fc5
Address feedback
kylegach Jan 8, 2024
b023d3f
Merge pull request #25489 from storybookjs/api-ref-parameters
kylegach Jan 8, 2024
0711955
fix JsPackageMangerFactory tests
JReinhold Jan 8, 2024
b2aa22e
Merge branch 'jeppe/fix-package-manager-issues' of github.com:storybo…
JReinhold Jan 8, 2024
9796ff8
Update docs
valentinpalkovic Jan 9, 2024
a77b9aa
Update Node.js version requirement
valentinpalkovic Jan 9, 2024
9316dd2
Merge pull request #25516 from storybookjs/valentin/use-node-18-in-en…
valentinpalkovic Jan 9, 2024
8404f74
Merge pull request #24658 from storybookjs/norbert/remove-storystorev7
valentinpalkovic Jan 9, 2024
d86a123
Merge remote-tracking branch 'origin/next' into norbert/add-migration…
valentinpalkovic Jan 9, 2024
c6ffc8f
Merge pull request #25436 from storybookjs/norbert/add-migration-note…
valentinpalkovic Jan 9, 2024
27935a5
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
d19f82e
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
6c6946e
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
5b9fc33
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
10ad2a4
Merge remote-tracking branch 'origin/next' into valentin/remove-babel…
valentinpalkovic Jan 9, 2024
8aff1dd
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
bd4aa2c
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
618d45c
Update MIGRATION.md
valentinpalkovic Jan 9, 2024
c36950e
Docs: Doc Block Canvas fix link
jonniebigodes Jan 9, 2024
6fd14f9
Minor adjustment
jonniebigodes Jan 9, 2024
f854254
Merge pull request #25474 from storybookjs/jeppe/fix-package-manager-…
kasperpeulen Jan 9, 2024
7fcecb8
Merge branch 'next' into docs_api_doc_block_fix_broken_link
kylegach Jan 9, 2024
ab3bd2a
Merge pull request #25520 from storybookjs/docs_api_doc_block_fix_bro…
kylegach Jan 9, 2024
4dc764f
Merge pull request #25379 from storybookjs/valentin/remove-babel-from…
valentinpalkovic Jan 10, 2024
4583800
Merge remote-tracking branch 'origin/next' into yann/remove-deprecate…
valentinpalkovic Jan 10, 2024
0ba40c5
Merge pull request #25487 from storybookjs/yann/remove-deprecated-cre…
valentinpalkovic Jan 10, 2024
b2e4cfb
Apply suggestions from code review
ndelangen Jan 10, 2024
6db4d1d
Merge branch 'next' into norbert/migration-note-react18-manager
ndelangen Jan 10, 2024
feb4a6a
Merge pull request #25435 from storybookjs/norbert/migration-note-rea…
ndelangen Jan 10, 2024
3cbbc09
Write changelog for 8.0.0-alpha.9 [skip ci]
storybook-bot Jan 10, 2024
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
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.0.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ nodeLinker: node-modules

npmPublishAccess: public

yarnPath: .yarn/releases/yarn-4.0.0.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
13 changes: 13 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 8.0.0-alpha.9

- AutoTitle: Fix case-insensitive trailing duplicate - [#25452](https://github.com/storybookjs/storybook/pull/25452), thanks [@ksugawara61](https://github.com/ksugawara61)!
- CLI: Fix using wrong package managers in existing projects - [#25474](https://github.com/storybookjs/storybook/pull/25474), thanks [@JReinhold](https://github.com/JReinhold)!
- CLI: Never prompt for ESLint plugin - [#25289](https://github.com/storybookjs/storybook/pull/25289), thanks [@shilman](https://github.com/shilman)!
- CSF-tools: Allow type checking in storySort - [#25265](https://github.com/storybookjs/storybook/pull/25265), thanks [@honzahruby](https://github.com/honzahruby)!
- Core: Remove `storyStoreV7` feature flag - [#24658](https://github.com/storybookjs/storybook/pull/24658), thanks [@ndelangen](https://github.com/ndelangen)!
- Core: Remove deprecated createChannel APIs - [#25487](https://github.com/storybookjs/storybook/pull/25487), thanks [@yannbf](https://github.com/yannbf)!
- Node.js: Update version requirement to >= 18.0.0 - [#25516](https://github.com/storybookjs/storybook/pull/25516), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!
- Storysource: Fix import error - [#25391](https://github.com/storybookjs/storybook/pull/25391), thanks [@unional](https://github.com/unional)!
- UI: Fix sidebar top and bottom addon slots - [#25426](https://github.com/storybookjs/storybook/pull/25426), thanks [@ndelangen](https://github.com/ndelangen)!
- Webpack5: Remove babel and SWC compiler from builder - [#25379](https://github.com/storybookjs/storybook/pull/25379), thanks [@valentinpalkovic](https://github.com/valentinpalkovic)!

## 8.0.0-alpha.8

- Addon Links: Remove LinkTo from direct import - [#25418](https://github.com/storybookjs/storybook/pull/25418), thanks [@yannbf](https://github.com/yannbf)!
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ If you run `yarn start` and encounter the following error, try rerunning `yarn s
```sh
> NX ENOENT: no such file or directory, open 'storybook/code/node_modules/nx/package.json'
```

If you are a Storybook contributor and still experience issues, it is recommended that you verify your local Storybook instance for any unintentional local changes. To do this, you can use the following command:

```sh
Expand All @@ -37,11 +38,11 @@ By executing this command, you will be able to see which untracked or ignored fi

If you have forked the repository, you should [disable Github Actions for your repo](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository) as many of them (e.g. pushing to sandbox) will fail without proper authorization. In your Github repo, go to Settings > Actions > General > set the Actions Permissions to **Disable actions**.

# Running against different sandbox templates
## Running against different sandbox templates

You can also pick a specific template to use as your sandbox by running `yarn task`, which will prompt you to make further choices about which template you want and which task you want to run.

# Making code changes
## Making code changes

If you want to make code changes to Storybook packages while running a sandbox, you'll need to do the following:

Expand All @@ -56,10 +57,10 @@ yarn build --watch react core-server api addon-docs

3. If you are running the sandbox in "unlinked" mode you'll need to re-run the sandbox from the `publish` step to see the changes:

```
```sh
yarn task --task dev --template <your template> --start-from=publish
```

# Contributing to Storybook
## Contributing to Storybook

For further advice on how to contribute, please refer to our [NEW contributing guide on the Storybook website](https://storybook.js.org/docs/contribute).
223 changes: 219 additions & 4 deletions MIGRATION.md

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions RESOLUTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,4 @@ [email protected] (bug: 3.5.x): Type issues

## code/ui/components/package.json

[email protected] (bug: 2.3.x): The Scrollbar doesn't disappear anymore by default. It might has something to do with the `scrollbars.autoHideSuspend` option, which was introduced in 2.3.0. https://github.com/KingSora/OverlayScrollbars/blob/master/packages/overlayscrollbars/CHANGELOG.md#230

## code/package.json

@babel/core@^7.23.2: Make sure we use the latest version of @babel/traverse, which is a dependency of @babel/core, since it contains a fix for a vulnerability: https://security.snyk.io/vuln/SNYK-JS-BABELTRAVERSE-5962462
[email protected] (bug: 2.3.x): The Scrollbar doesn't disappear anymore by default. It might has something to do with the `scrollbars.autoHideSuspend` option, which was introduced in 2.3.0. https://github.com/KingSora/OverlayScrollbars/blob/master/packages/overlayscrollbars/CHANGELOG.md#230
5 changes: 3 additions & 2 deletions code/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ compressionLevel: 0

enableGlobalCache: true

installStatePath: ../.yarn/code-install-state.gz

logFilters:
- code: YN0005
level: discard
Expand All @@ -23,7 +25,6 @@ plugins:
unsafeHttpWhitelist:
- localhost

yarnPath: ../.yarn/releases/yarn-4.0.0.cjs
installStatePath: '../.yarn/code-install-state.gz'
yarnPath: ../.yarn/releases/yarn-4.0.2.cjs
# Sometimes you get a "The remote archive doesn't match the expected checksum" error, uncommenting this line will fix it
# checksumBehavior: 'update'
2 changes: 1 addition & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.1",
"@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/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.1",
"@storybook/icons": "^1.2.3",
"memoizerific": "^1.11.3",
"ts-dedent": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ Like [story parameters](https://storybook.js.org/docs/react/writing-stories/para

### How do controls work with MDX?

When importing stories from your CSF file into MDX, controls will work the same way. See [the documentation](https://storybook.js.org/docs/writing-docs/mdx#basic-example) for examples.
When importing stories from your CSF file into MDX, controls will work the same way. See [the documentation](https://storybook.js.org/docs/writing-docs/mdx#basic-example) for examples.
2 changes: 1 addition & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.1",
"@storybook/icons": "^1.2.3",
"@storybook/types": "workspace:*",
"jest-mock": "^27.0.6",
"polished": "^4.2.2",
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,7 +65,7 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.1",
"@storybook/icons": "^1.2.3",
"tiny-invariant": "^1.3.1"
},
"devDependencies": {
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,7 +55,7 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.1",
"@storybook/icons": "^1.2.3",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/storysource/preset.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './dist/preset';
require('./dist/preset');
2 changes: 1 addition & 1 deletion code/addons/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@storybook/client-logger": "workspace:*",
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/icons": "^1.2.1",
"@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/viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@storybook/components": "workspace:*",
"@storybook/core-events": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.2.1",
"@storybook/icons": "^1.2.3",
"@storybook/manager-api": "workspace:*",
"@storybook/preview-api": "workspace:*",
"@storybook/theming": "workspace:*",
Expand Down
48 changes: 0 additions & 48 deletions code/builders/builder-vite/src/codegen-entries.ts

This file was deleted.

116 changes: 0 additions & 116 deletions code/builders/builder-vite/src/codegen-iframe-script.ts

This file was deleted.

5 changes: 0 additions & 5 deletions code/builders/builder-vite/src/codegen-importfn-script.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as path from 'path';

import type { Options } from '@storybook/types';
import { logger } from '@storybook/node-logger';

import { listStories } from './list-stories';

Expand All @@ -28,11 +27,7 @@ function toImportPath(relativePath: string) {
async function toImportFn(stories: string[]) {
const { normalizePath } = await import('vite');
const objectEntries = stories.map((file) => {
const ext = path.extname(file);
const relativePath = normalizePath(path.relative(process.cwd(), file));
if (!['.js', '.jsx', '.ts', '.tsx', '.mdx', '.svelte', '.vue'].includes(ext)) {
logger.warn(`Cannot process ${ext} file with storyStoreV7: ${relativePath}`);
}

return ` '${toImportPath(relativePath)}': async () => import('/@fs/${file}')`;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export async function generateModernIframeScriptCode(options: Options, projectRo
window.__STORYBOOK_PREVIEW__ = window.__STORYBOOK_PREVIEW__ || new PreviewWeb();

window.__STORYBOOK_STORY_STORE__ = window.__STORYBOOK_STORY_STORE__ || window.__STORYBOOK_PREVIEW__.storyStore;
window.__STORYBOOK_CLIENT_API__ = window.__STORYBOOK_CLIENT_API__ || new ClientApi({ storyStore: window.__STORYBOOK_PREVIEW__.storyStore });
window.__STORYBOOK_PREVIEW__.initialize({ importFn, getProjectAnnotations });

${generateHMRHandler(frameworkName)};
Expand Down
17 changes: 2 additions & 15 deletions code/builders/builder-vite/src/plugins/code-generator-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import * as fs from 'fs';
import type { Plugin } from 'vite';
import type { Options } from '@storybook/types';
import { transformIframeHtml } from '../transform-iframe-html';
import { generateIframeScriptCode } from '../codegen-iframe-script';
import { generateModernIframeScriptCode } from '../codegen-modern-iframe-script';
import { generateImportFnScriptCode } from '../codegen-importfn-script';
import { generateVirtualStoryEntryCode, generatePreviewEntryCode } from '../codegen-entries';
import { generateAddonSetupCode } from '../codegen-set-addon-channel';

import {
Expand Down Expand Up @@ -90,27 +88,16 @@ export function codeGeneratorPlugin(options: Options): Plugin {
return undefined;
},
async load(id, config) {
const storyStoreV7 = options.features?.storyStoreV7;
if (id === virtualStoriesFile) {
if (storyStoreV7) {
return generateImportFnScriptCode(options);
}
return generateVirtualStoryEntryCode(options);
return generateImportFnScriptCode(options);
}

if (id === virtualAddonSetupFile) {
return generateAddonSetupCode();
}

if (id === virtualPreviewFile && !storyStoreV7) {
return generatePreviewEntryCode(options);
}

if (id === virtualFileId) {
if (storyStoreV7) {
return generateModernIframeScriptCode(options, projectRoot);
}
return generateIframeScriptCode(options, projectRoot);
return generateModernIframeScriptCode(options, projectRoot);
}

if (id === iframeId) {
Expand Down
Loading
Loading