Skip to content

Commit

Permalink
Merge pull request #28991 from storybookjs/version-non-patch-from-8.3…
Browse files Browse the repository at this point in the history
….0-alpha.10

Release: Prerelease 8.3.0-alpha.11
  • Loading branch information
shilman authored Aug 29, 2024
2 parents 87c3757 + c9e5de1 commit ef411ce
Show file tree
Hide file tree
Showing 40 changed files with 69 additions and 89 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 8.3.0-alpha.11

- Addon Vitest: Fix tests potentially not existing in non-isolate mode - [#28993](https://github.com/storybookjs/storybook/pull/28993), thanks @yannbf!
- Builder-Vite: Fix 'condition node never be used' warning - [#28989](https://github.com/storybookjs/storybook/pull/28989), thanks @valentinpalkovic!
- CLI: Update spawn options in proxy.ts to support Windows - [#28990](https://github.com/storybookjs/storybook/pull/28990), thanks @valentinpalkovic!
- Next.js-Vite: Update next and vite-plugin-storybook-nextjs dependencies - [#28994](https://github.com/storybookjs/storybook/pull/28994), thanks @valentinpalkovic!

## 8.3.0-alpha.10

- Addon Vitest: Fix postinstall file types - [#28978](https://github.com/storybookjs/storybook/pull/28978), thanks @shilman!
Expand Down
3 changes: 1 addition & 2 deletions code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./decorator": {
"types": "./dist/decorator.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./actions/preview": {
"types": "./dist/actions/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./preset": "./dist/preset.js",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/storysource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preset": "./dist/preset.js",
"./manager": "./dist/manager.js",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/toolbars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./manager": "./dist/manager.js",
"./register": "./dist/manager.js",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./preview": {
"types": "./dist/preview.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/addons/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"node": "./dist/index.cjs"
"require": "./dist/index.cjs"
},
"./plugin": {
"types": "./dist/plugin/index.d.ts",
Expand Down
24 changes: 12 additions & 12 deletions code/core/src/csf-tools/vitest-plugin/transformer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('transformer', () => {
};
export default _meta;
export const Story = {};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Story", _testStory("Story", Story, _meta, []));
}
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('transformer', () => {
};
export default _meta;
export const Story = {};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Story", _testStory("Story", Story, _meta, []));
}
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('transformer', () => {
};
export default meta;
export const Story = {};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Story", _testStory("Story", Story, meta, []));
}
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('transformer', () => {
};
export default meta;
export const Story = {};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Story", _testStory("Story", Story, meta, []));
}
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('transformer', () => {
label: 'Primary Button'
}
};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Primary", _testStory("Primary", Primary, _meta, []));
}
Expand Down Expand Up @@ -240,7 +240,7 @@ describe('transformer', () => {
}
};
export { Primary };
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Primary", _testStory("Primary", Primary, _meta, []));
}
Expand Down Expand Up @@ -276,7 +276,7 @@ describe('transformer', () => {
};
export const Secondary = {};
export { Primary };
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Secondary", _testStory("Secondary", Secondary, _meta, []));
_test("Primary", _testStory("Primary", Primary, _meta, []));
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('transformer', () => {
export default _meta;
export const Story = {};
export const nonStory = 123;
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Story", _testStory("Story", Story, _meta, []));
}
Expand Down Expand Up @@ -365,7 +365,7 @@ describe('transformer', () => {
tags: ['include-me']
};
export const NotIncluded = {};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Included", _testStory("Included", Included, _meta, []));
}
Expand Down Expand Up @@ -396,7 +396,7 @@ describe('transformer', () => {
export const NotIncluded = {
tags: ['exclude-me']
};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Included", _testStory("Included", Included, _meta, []));
}
Expand Down Expand Up @@ -424,7 +424,7 @@ describe('transformer', () => {
export const Skipped = {
tags: ['skip-me']
};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Skipped", _testStory("Skipped", Skipped, _meta, ["skip-me"]));
}
Expand Down Expand Up @@ -456,7 +456,7 @@ describe('transformer', () => {
};
export default meta;
export const Primary = {};
const _isRunningFromThisFile = import.meta.url.includes(_expect.getState().testPath ?? globalThis.__vitest_worker__.filepath);
const _isRunningFromThisFile = import.meta.url.includes(globalThis.__vitest_worker__.filepath ?? _expect.getState().testPath);
if (_isRunningFromThisFile) {
_test("Primary", _testStory("Primary", Primary, meta, []));
}
Expand Down
6 changes: 4 additions & 2 deletions code/core/src/csf-tools/vitest-plugin/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ export async function vitestTransform({
// Combine testPath and filepath using the ?? operator
const nullishCoalescingExpression = t.logicalExpression(
'??',
testPathProperty,
filePathProperty
// TODO: switch order of testPathProperty and filePathProperty when the bug is fixed
// https://github.com/vitest-dev/vitest/issues/6367 (or probably just use testPathProperty)
filePathProperty,
testPathProperty
);

// Create the final expression: import.meta.url.includes(...)
Expand Down
3 changes: 1 addition & 2 deletions code/deprecated/csf-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
".": {
"types": "./shim.d.ts",
"import": "./shim.mjs",
"require": "./shim.js",
"node": "./shim.js"
"require": "./shim.js"
},
"./package.json": "./package.json"
},
Expand Down
3 changes: 1 addition & 2 deletions code/deprecated/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
".": {
"types": "./shim.d.ts",
"import": "./shim.mjs",
"require": "./shim.js",
"node": "./shim.js"
"require": "./shim.js"
},
"./utils": {
"types": "./utils.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions code/deprecated/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
".": {
"types": "./shim.d.ts",
"import": "./shim.mjs",
"require": "./shim.js",
"node": "./shim.js"
"require": "./shim.js"
},
"./create": {
"types": "./create.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/experimental-nextjs-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
"vite-plugin-storybook-nextjs": "^1.0.0"
},
"peerDependencies": {
"next": "^14.2.5",
"next": "^14.1.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
"storybook": "workspace:^",
"vite": "^5.0.0",
"vite-plugin-storybook-nextjs": "^1.0.0"
"vite-plugin-storybook-nextjs": "^1.0.8"
},
"peerDependenciesMeta": {
"typescript": {
Expand Down
3 changes: 1 addition & 2 deletions code/lib/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (['dev', 'build'].includes(args[0])) {
? [`create-storybook@${versions.storybook}`, ...args.slice(1)]
: [`@storybook/cli@${versions.storybook}`, ...args];
const command = ['npx', '--yes', ...proxiedArgs];
const child = spawn(command[0], command.slice(1), { stdio: 'inherit' });
const child = spawn(command[0], command.slice(1), { stdio: 'inherit', shell: true });
child.on('exit', (code) => {
if (code != null) {
process.exit(code);
Expand Down
3 changes: 1 addition & 2 deletions code/lib/instrumenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand Down
3 changes: 1 addition & 2 deletions code/lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"node": "./dist/index.js"
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
Expand Down
Loading

0 comments on commit ef411ce

Please sign in to comment.