Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into valentin/support-docs…
Browse files Browse the repository at this point in the history
…-source-transform-async
  • Loading branch information
valentinpalkovic committed Feb 5, 2025
2 parents b1e5cb9 + 30a5263 commit 4448fc4
Show file tree
Hide file tree
Showing 163 changed files with 3,557 additions and 4,126 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test-results
.verdaccio-cache
.next
/.npmrc
tsconfig.vitest-temp.json

# Yarn stuff
/**/.yarn/*
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 8.5.3

- Preview: Add `globals` to `extract()` - [#30415](https://github.com/storybookjs/storybook/pull/30415), thanks @ndelangen!
- Vite: Fix add component UI invalidation - [#30438](https://github.com/storybookjs/storybook/pull/30438), thanks @shilman!

## 8.5.2

- Addon Test: Support Vitest 3 browser.test.instances field - [#30309](https://github.com/storybookjs/storybook/pull/30309), thanks @valentinpalkovic!
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 8.6.0-alpha.4

- Addon A11y: Make Vitest Axe optional - [#30442](https://github.com/storybookjs/storybook/pull/30442), thanks @valentinpalkovic!
- Builder-Vite: Fix allowedHosts handling for custom hosts - [#30432](https://github.com/storybookjs/storybook/pull/30432), thanks @JSMike!
- Vite: Fix add component UI invalidation - [#30438](https://github.com/storybookjs/storybook/pull/30438), thanks @shilman!

## 8.6.0-alpha.3

- Core: Fix invalid Websocket termination - [#30408](https://github.com/storybookjs/storybook/pull/30408), thanks @valentinpalkovic!
Expand Down
1 change: 1 addition & 0 deletions code/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module.exports = {
'**/__tests__/**',
'**/__testfixtures__/**',
'**/*.test.*',
'**/*.test-d.*',
'**/*.stories.*',
'**/*.mockdata.*',
'**/template/**/*',
Expand Down
8 changes: 4 additions & 4 deletions code/addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Test component compliance with web accessibility standards",
"keywords": [
"a11y",
Expand Down Expand Up @@ -68,8 +68,7 @@
"dependencies": {
"@storybook/addon-highlight": "workspace:*",
"@storybook/test": "workspace:*",
"axe-core": "^4.2.0",
"vitest-axe": "^0.1.0"
"axe-core": "^4.2.0"
},
"devDependencies": {
"@storybook/global": "^5.0.0",
Expand All @@ -82,7 +81,8 @@
"react-dom": "^18.2.0",
"react-resize-detector": "^7.1.2",
"resize-observer-polyfill": "^1.5.1",
"typescript": "^5.3.2"
"typescript": "^5.7.3",
"vitest-axe": "^0.1.0"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
11 changes: 7 additions & 4 deletions code/addons/a11y/src/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Source: https://github.com/chaance/vitest-axe/blob/main/src/to-have-no-violations.ts
import * as matchers from 'vitest-axe/matchers';

import type { AfterEach } from 'storybook/internal/types';

import { expect } from '@storybook/test';
Expand All @@ -10,7 +7,7 @@ import { A11Y_TEST_TAG } from './constants';
import type { A11yParameters } from './params';
import { getIsVitestRunning, getIsVitestStandaloneRun } from './utils';

expect.extend(matchers);
let vitestMatchersExtended = false;

// eslint-disable-next-line @typescript-eslint/naming-convention
export const experimental_afterEach: AfterEach<any> = async ({
Expand Down Expand Up @@ -54,6 +51,12 @@ export const experimental_afterEach: AfterEach<any> = async ({
*/
if (getIsVitestStandaloneRun()) {
if (hasViolations) {
if (!vitestMatchersExtended) {
const { toHaveNoViolations } = await import('vitest-axe/matchers');
expect.extend({ toHaveNoViolations });
vitestMatchersExtended = true;
}

// @ts-expect-error - todo - fix type extension of expect from @storybook/test
expect(result).toHaveNoViolations();
}
Expand Down
4 changes: 2 additions & 2 deletions code/addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Get UI feedback when an action is performed on an interactive element",
"keywords": [
"storybook",
Expand Down Expand Up @@ -79,7 +79,7 @@
"react-dom": "^18.2.0",
"react-inspector": "^6.0.0",
"telejson": "^7.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Switch backgrounds to view components in different settings",
"keywords": [
"addon",
Expand Down Expand Up @@ -63,7 +63,7 @@
"@storybook/icons": "^1.2.12",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/controls/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-controls",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Interact with component inputs dynamically in the Storybook UI",
"keywords": [
"addon",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-docs",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Document component usage and properties in Markdown",
"keywords": [
"addon",
Expand Down Expand Up @@ -118,7 +118,7 @@
"react-dom": "^18.2.0",
"rehype-external-links": "^3.0.0",
"rehype-slug": "^6.0.0",
"typescript": "^5.3.2",
"typescript": "^5.7.3",
"vite": "^4.0.4"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions code/addons/essentials/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-essentials",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Curated addons to bring out the best of Storybook",
"keywords": [
"addon",
Expand Down Expand Up @@ -101,7 +101,7 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/gfm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-mdx-gfm",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "GitHub Flavored Markdown in Storybook",
"keywords": [
"addon",
Expand Down Expand Up @@ -48,7 +48,7 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/highlight/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-highlight",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Highlight DOM nodes within your stories",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -55,7 +55,7 @@
},
"devDependencies": {
"@types/webpack-env": "^1.16.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/interactions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-interactions",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Automate, test and debug user interactions",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -66,7 +66,7 @@
"formik": "^2.2.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/src/mocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const getInteractions = (finalStatus: CallStates) =>
.filter((call) => call.interceptable)
.map((call) => ({
...call,
childCallIds: [],
childCallIds: [] as any[],
isCollapsed: false,
isHidden: false,
toggleCollapsed: () => {},
Expand Down
4 changes: 2 additions & 2 deletions code/addons/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
Expand Down Expand Up @@ -62,7 +62,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-resize-detector": "^7.1.2",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-links",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Link stories together to build demos and prototypes with your UI components",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -70,7 +70,7 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
Expand Down
4 changes: 2 additions & 2 deletions code/addons/measure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-measure",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Inspect layouts by visualizing the box model",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -74,7 +74,7 @@
"@storybook/icons": "^1.2.12",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-onboarding",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -54,7 +54,7 @@
"react-dom": "^18.2.0",
"react-joyride": "^2.8.2",
"react-use-measure": "^2.1.1",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/outline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-outline",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Outline all elements with CSS to help with layout placement and alignment",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -64,7 +64,7 @@
"@storybook/icons": "^1.2.12",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/storysource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-storysource",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "View a story’s source code to see how it works and paste into your app",
"keywords": [
"addon",
Expand Down Expand Up @@ -56,7 +56,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-syntax-highlighter": "^15.5.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/experimental-addon-test",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Integrate Vitest with Storybook",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -115,7 +115,7 @@
"tinyglobby": "^0.2.10",
"tree-kill": "^1.2.2",
"ts-dedent": "^2.2.0",
"typescript": "^5.3.2",
"typescript": "^5.7.3",
"vitest": "^3.0.2"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions code/addons/themes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-themes",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Switch between multiple themes for you components in Storybook",
"keywords": [
"css",
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"devDependencies": {
"@storybook/icons": "^1.2.12",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/toolbars/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-toolbars",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Create your own toolbar items that control story rendering",
"keywords": [
"addon",
Expand Down Expand Up @@ -52,7 +52,7 @@
"devDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions code/addons/viewport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-viewport",
"version": "8.6.0-alpha.3",
"version": "8.6.0-alpha.4",
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
"keywords": [
"addon",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@storybook/icons": "^1.2.12",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.2"
"typescript": "^5.7.3"
},
"peerDependencies": {
"storybook": "workspace:^"
Expand Down
Loading

0 comments on commit 4448fc4

Please sign in to comment.