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

[pull] next from storybookjs:next #105

Merged
merged 9 commits into from
Dec 23, 2024
3 changes: 2 additions & 1 deletion code/addons/test/src/node/vitest-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,14 @@ export class VitestManager {
const id = slash(file);
this.vitest?.logger.clearHighlightCache(id);
this.updateLastChanged(id);
this.storyCountForCurrentRun = 0;

// when watch mode is disabled, don't trigger any tests (below)
// but still invalidate the cache for the changed file, which is handled above
if (!this.testManager.config.watchMode) {
return;
}

this.storyCountForCurrentRun = 0;
await this.runAffectedTests(file);
}

Expand Down
47 changes: 47 additions & 0 deletions code/builders/builder-vite/src/optimizeDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,58 @@ const INCLUDE_CANDIDATES = [
'@emotion/core',
'@emotion/is-prop-valid',
'@emotion/styled',
'@storybook/addon-a11y/preview',
'@storybook/addon-backgrounds/preview',
'@storybook/addon-designs/blocks',
'@storybook/addon-docs/preview',
'@storybook/addon-essentials/actions/preview',
'@storybook/addon-essentials/actions/preview',
'@storybook/addon-essentials/backgrounds/preview',
'@storybook/addon-essentials/docs/preview',
'@storybook/addon-essentials/highlight/preview',
'@storybook/addon-essentials/measure/preview',
'@storybook/addon-essentials/outline/preview',
'@storybook/addon-essentials/viewport/preview',
'@storybook/addon-highlight/preview',
'@storybook/addon-links/preview',
'@storybook/addon-measure/preview',
'@storybook/addon-outline/preview',
'@storybook/addon-themes',
'@storybook/addon-themes/preview',
'@storybook/addon-viewport',
'@storybook/addon-viewport/preview',
'@storybook/blocks',
'@storybook/components',
'@storybook/experimental-addon-test/preview',
'@storybook/experimental-nextjs-vite/dist/preview.mjs',
'@storybook/html',
'@storybook/html/dist/entry-preview-docs.mjs',
'@storybook/html/dist/entry-preview.mjs',
'@storybook/preact',
'@storybook/preact/dist/entry-preview-docs.mjs',
'@storybook/preact/dist/entry-preview.mjs',
'@storybook/react > acorn-jsx',
'@storybook/react',
'@storybook/react/dist/entry-preview-docs.mjs',
'@storybook/react/dist/entry-preview-rsc.mjs',
'@storybook/react/dist/entry-preview.mjs',
'@storybook/svelte',
'@storybook/svelte/dist/entry-preview-docs.mjs',
'@storybook/svelte/dist/entry-preview.mjs',
'@storybook/theming',
'@storybook/vue3',
'@storybook/vue3/dist/entry-preview-docs.mjs',
'@storybook/vue3/dist/entry-preview.mjs',
'@storybook/web-components',
'@storybook/web-components/dist/entry-preview-docs.mjs',
'@storybook/web-components/dist/entry-preview.mjs',
'acorn-jsx',
'acorn-walk',
'acorn',
'airbnb-js-shims',
'ansi-to-html',
'axe-core',
'chromatic/isChromatic',
'color-convert',
'deep-object-diff',
'doctrine',
Expand Down Expand Up @@ -73,6 +115,8 @@ const INCLUDE_CANDIDATES = [
'lodash/upperFirst.js',
'lodash/upperFirst',
'memoizerific',
'mockdate',
'msw-storybook-addon',
'overlayscrollbars',
'polished',
'prettier/parser-babel',
Expand Down Expand Up @@ -100,8 +144,11 @@ const INCLUDE_CANDIDATES = [
'refractor/lang/typescript.js',
'refractor/lang/yaml.js',
'regenerator-runtime/runtime.js',
'sb-original/default-loader',
'sb-original/image-context',
'slash',
'store2',
'storybook/internal/preview/runtime',
'synchronous-promise',
'telejson',
'ts-dedent',
Expand Down
2 changes: 1 addition & 1 deletion code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"@storybook/csf": "0.1.12",
"better-opn": "^3.0.2",
"browser-assert": "^1.2.1",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || 0.24.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0",
"esbuild-register": "^3.5.0",
"jsdoc-type-pratt-parser": "^4.0.0",
"process": "^0.11.10",
Expand Down
4 changes: 2 additions & 2 deletions code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@types/babel__traverse@npm:^7.18.0": "patch:@types/babel__traverse@npm%3A7.20.6#~/.yarn/patches/@types-babel__traverse-npm-7.20.6-fac4243243.patch",
"@types/node": "^22.0.0",
"@vitest/expect@npm:2.0.5": "patch:@vitest/expect@npm%3A2.0.5#~/.yarn/patches/@vitest-expect-npm-2.0.5-8933466cce.patch",
"esbuild": "0.24.0",
"esbuild": "^0.24.0",
"playwright": "1.48.1",
"playwright-core": "1.48.1",
"serialize-javascript": "^3.1.0",
Expand Down Expand Up @@ -185,7 +185,7 @@
"cross-env": "^7.0.3",
"danger": "^12.3.3",
"es-toolkit": "^1.22.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || 0.24.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0",
"esbuild-loader": "^4.2.0",
"esbuild-plugin-alias": "^0.2.1",
"eslint": "8.57.1",
Expand Down
4 changes: 2 additions & 2 deletions code/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7125,7 +7125,7 @@ __metadata:
cross-env: "npm:^7.0.3"
danger: "npm:^12.3.3"
es-toolkit: "npm:^1.22.0"
esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || 0.24.0"
esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0"
esbuild-loader: "npm:^4.2.0"
esbuild-plugin-alias: "npm:^0.2.1"
eslint: "npm:8.57.1"
Expand Down Expand Up @@ -14518,7 +14518,7 @@ __metadata:
languageName: node
linkType: hard

"esbuild@npm:0.24.0":
"esbuild@npm:^0.24.0":
version: 0.24.0
resolution: "esbuild@npm:0.24.0"
dependencies:
Expand Down
4 changes: 2 additions & 2 deletions scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
]
},
"resolutions": {
"esbuild": "0.24.0",
"esbuild": "^0.24.0",
"serialize-javascript": "^3.1.0",
"type-fest": "~2.19"
},
Expand Down Expand Up @@ -108,7 +108,7 @@
"ejs": "^3.1.10",
"ejs-lint": "^2.0.0",
"es-toolkit": "^1.22.0",
"esbuild": "0.24.0",
"esbuild": "^0.24.0",
"esbuild-plugin-alias": "^0.2.1",
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "^18.0.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ __metadata:
ejs: "npm:^3.1.10"
ejs-lint: "npm:^2.0.0"
es-toolkit: "npm:^1.22.0"
esbuild: "npm:0.24.0"
esbuild: "npm:^0.24.0"
esbuild-plugin-alias: "npm:^0.2.1"
eslint: "npm:^8.57.0"
eslint-config-airbnb-typescript: "npm:^18.0.0"
Expand Down Expand Up @@ -5143,7 +5143,7 @@ __metadata:
languageName: node
linkType: hard

"esbuild@npm:0.24.0":
"esbuild@npm:^0.24.0":
version: 0.24.0
resolution: "esbuild@npm:0.24.0"
dependencies:
Expand Down
Loading