Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ccae917

Browse files
committed
Merge branch 'next' into norbert/cli-with-ink
2 parents a3a3440 + 30a5263 commit ccae917

File tree

124 files changed

+2897
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2897
-208
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test-results
1616
.verdaccio-cache
1717
.next
1818
/.npmrc
19+
tsconfig.vitest-temp.json
1920

2021
# Yarn stuff
2122
/**/.yarn/*

CHANGELOG.prerelease.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 8.6.0-alpha.4
2+
3+
- Addon A11y: Make Vitest Axe optional - [#30442](https://github.com/storybookjs/storybook/pull/30442), thanks @valentinpalkovic!
4+
- Builder-Vite: Fix allowedHosts handling for custom hosts - [#30432](https://github.com/storybookjs/storybook/pull/30432), thanks @JSMike!
5+
- Vite: Fix add component UI invalidation - [#30438](https://github.com/storybookjs/storybook/pull/30438), thanks @shilman!
6+
17
## 8.6.0-alpha.3
28

39
- Core: Fix invalid Websocket termination - [#30408](https://github.com/storybookjs/storybook/pull/30408), thanks @valentinpalkovic!

code/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ module.exports = {
102102
'**/__tests__/**',
103103
'**/__testfixtures__/**',
104104
'**/*.test.*',
105+
'**/*.test-d.*',
105106
'**/*.stories.*',
106107
'**/*.mockdata.*',
107108
'**/template/**/*',

code/addons/a11y/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-a11y",
3-
"version": "8.6.0-alpha.3",
3+
"version": "8.6.0-alpha.4",
44
"description": "Test component compliance with web accessibility standards",
55
"keywords": [
66
"a11y",
@@ -68,8 +68,7 @@
6868
"dependencies": {
6969
"@storybook/addon-highlight": "workspace:*",
7070
"@storybook/test": "workspace:*",
71-
"axe-core": "^4.2.0",
72-
"vitest-axe": "^0.1.0"
71+
"axe-core": "^4.2.0"
7372
},
7473
"devDependencies": {
7574
"@storybook/global": "^5.0.0",
@@ -82,7 +81,8 @@
8281
"react-dom": "^18.2.0",
8382
"react-resize-detector": "^7.1.2",
8483
"resize-observer-polyfill": "^1.5.1",
85-
"typescript": "^5.7.3"
84+
"typescript": "^5.7.3",
85+
"vitest-axe": "^0.1.0"
8686
},
8787
"peerDependencies": {
8888
"storybook": "workspace:^"

code/addons/a11y/src/preview.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Source: https://github.com/chaance/vitest-axe/blob/main/src/to-have-no-violations.ts
2-
import * as matchers from 'vitest-axe/matchers';
3-
41
import type { AfterEach } from 'storybook/internal/types';
52

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

13-
expect.extend(matchers);
10+
let vitestMatchersExtended = false;
1411

1512
// eslint-disable-next-line @typescript-eslint/naming-convention
1613
export const experimental_afterEach: AfterEach<any> = async ({
@@ -54,6 +51,12 @@ export const experimental_afterEach: AfterEach<any> = async ({
5451
*/
5552
if (getIsVitestStandaloneRun()) {
5653
if (hasViolations) {
54+
if (!vitestMatchersExtended) {
55+
const { toHaveNoViolations } = await import('vitest-axe/matchers');
56+
expect.extend({ toHaveNoViolations });
57+
vitestMatchersExtended = true;
58+
}
59+
5760
// @ts-expect-error - todo - fix type extension of expect from @storybook/test
5861
expect(result).toHaveNoViolations();
5962
}

code/addons/actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-actions",
3-
"version": "8.6.0-alpha.3",
3+
"version": "8.6.0-alpha.4",
44
"description": "Get UI feedback when an action is performed on an interactive element",
55
"keywords": [
66
"storybook",

code/addons/backgrounds/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-backgrounds",
3-
"version": "8.6.0-alpha.3",
3+
"version": "8.6.0-alpha.4",
44
"description": "Switch backgrounds to view components in different settings",
55
"keywords": [
66
"addon",

code/addons/controls/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-controls",
3-
"version": "8.6.0-alpha.3",
3+
"version": "8.6.0-alpha.4",
44
"description": "Interact with component inputs dynamically in the Storybook UI",
55
"keywords": [
66
"addon",

code/addons/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-docs",
3-
"version": "8.6.0-alpha.3",
3+
"version": "8.6.0-alpha.4",
44
"description": "Document component usage and properties in Markdown",
55
"keywords": [
66
"addon",

code/addons/essentials/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-essentials",
3-
"version": "8.6.0-alpha.3",
3+
"version": "8.6.0-alpha.4",
44
"description": "Curated addons to bring out the best of Storybook",
55
"keywords": [
66
"addon",

0 commit comments

Comments
 (0)