Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"devDependencies": {
"@radix-ui/react-tabs": "1.0.4",
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"@testing-library/react": "^14.0.0",
"execa": "^9.5.2",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"dependencies": {
"@mdx-js/react": "^3.0.0",
"@storybook/csf-plugin": "workspace:*",
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"@storybook/react-dom-shim": "workspace:*",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/onboarding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@neoconfetti/react": "^1.0.0",
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-joyride": "^2.8.2",
Expand Down
2 changes: 1 addition & 1 deletion code/addons/pseudo-states/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"prep": "jiti ../../../scripts/build/build-package.ts"
},
"devDependencies": {
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.8.3"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"ts-dedent": "^2.0.0"
},
"devDependencies": {
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.8.3"
Expand Down
2 changes: 1 addition & 1 deletion code/addons/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"prompts": "^2.4.0",
"ts-dedent": "^2.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions code/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^1.6.0",
"@storybook/icons": "^2.0.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/user-event": "^14.6.1",
"@vitest/expect": "3.2.4",
"@vitest/mocker": "3.2.4",
"@vitest/spy": "3.2.4",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0",
"recast": "^0.23.5",
"semver": "^7.6.2",
"use-sync-external-store": "^1.5.0",
Expand Down Expand Up @@ -279,7 +279,7 @@
"ejs": "^3.1.10",
"empathic": "^2.0.0",
"es-toolkit": "^1.36.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0",
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0 || ^0.26.0 || ^0.27.0",
"execa": "^8.0.1",
"exsolve": "^1.0.7",
"fetch-retry": "^6.0.0",
Expand Down
1 change: 1 addition & 0 deletions code/core/src/__tests/storybook-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('StorybookError', () => {
class TestError extends StorybookError {
constructor(documentation?: StorybookError['documentation']) {
super({
name: 'TestError',
category: 'TEST_CATEGORY',
code: 123,
message: 'This is a test error.',
Expand Down
3 changes: 3 additions & 0 deletions code/core/src/manager-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum Category {
export class ProviderDoesNotExtendBaseProviderError extends StorybookError {
constructor() {
super({
name: 'ProviderDoesNotExtendBaseProviderError',
category: Category.MANAGER_UI,
code: 1,
message: `The Provider passed into Storybook's UI is not extended from the base Provider. Please check your Provider implementation.`,
Expand All @@ -37,6 +38,7 @@ export class UncaughtManagerError extends StorybookError {
}
) {
super({
name: 'UncaughtManagerError',
category: Category.MANAGER_UNCAUGHT,
code: 1,
message: data.error.message,
Expand All @@ -53,6 +55,7 @@ export class StatusTypeIdMismatchError extends StorybookError {
}
) {
super({
name: 'StatusTypeIdMismatchError',
category: Category.MANAGER_API,
code: 1,
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
Expand Down
22 changes: 22 additions & 0 deletions code/core/src/preview-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export enum Category {
export class MissingStoryAfterHmrError extends StorybookError {
constructor(public data: { storyId: string }) {
super({
name: 'MissingStoryAfterHmrError',
category: Category.PREVIEW_API,
code: 1,
message: dedent`
Expand All @@ -55,6 +56,7 @@ export class MissingStoryAfterHmrError extends StorybookError {
export class ImplicitActionsDuringRendering extends StorybookError {
constructor(public data: { phase: string; name: string; deprecated: boolean }) {
super({
name: 'ImplicitActionsDuringRendering',
category: Category.PREVIEW_API,
code: 2,
documentation:
Expand All @@ -75,6 +77,7 @@ export class ImplicitActionsDuringRendering extends StorybookError {
export class CalledExtractOnStoreError extends StorybookError {
constructor() {
super({
name: 'CalledExtractOnStoreError',
category: Category.PREVIEW_API,
code: 3,
message: dedent`
Expand All @@ -88,6 +91,7 @@ export class CalledExtractOnStoreError extends StorybookError {
export class MissingRenderToCanvasError extends StorybookError {
constructor() {
super({
name: 'MissingRenderToCanvasError',
category: Category.PREVIEW_API,
code: 4,
message: dedent`
Expand All @@ -103,6 +107,7 @@ export class MissingRenderToCanvasError extends StorybookError {
export class CalledPreviewMethodBeforeInitializationError extends StorybookError {
constructor(public data: { methodName: string }) {
super({
name: 'CalledPreviewMethodBeforeInitializationError',
category: Category.PREVIEW_API,
code: 5,
message: dedent`
Expand All @@ -120,6 +125,7 @@ export class CalledPreviewMethodBeforeInitializationError extends StorybookError
export class StoryIndexFetchError extends StorybookError {
constructor(public data: { text: string }) {
super({
name: 'StoryIndexFetchError',
category: Category.PREVIEW_API,
code: 6,
message: dedent`
Expand All @@ -139,6 +145,7 @@ export class StoryIndexFetchError extends StorybookError {
export class MdxFileWithNoCsfReferencesError extends StorybookError {
constructor(public data: { storyId: string }) {
super({
name: 'MdxFileWithNoCsfReferencesError',
category: Category.PREVIEW_API,
code: 7,
message: dedent`
Expand All @@ -154,6 +161,7 @@ export class MdxFileWithNoCsfReferencesError extends StorybookError {
export class EmptyIndexError extends StorybookError {
constructor() {
super({
name: 'EmptyIndexError',
category: Category.PREVIEW_API,
code: 8,
message: dedent`
Expand All @@ -168,6 +176,7 @@ export class EmptyIndexError extends StorybookError {
export class NoStoryMatchError extends StorybookError {
constructor(public data: { storySpecifier: string }) {
super({
name: 'NoStoryMatchError',
category: Category.PREVIEW_API,
code: 9,
message: dedent`
Expand All @@ -183,6 +192,7 @@ export class NoStoryMatchError extends StorybookError {
export class MissingStoryFromCsfFileError extends StorybookError {
constructor(public data: { storyId: string }) {
super({
name: 'MissingStoryFromCsfFileError',
category: Category.PREVIEW_API,
code: 10,
message: dedent`
Expand All @@ -201,6 +211,7 @@ export class MissingStoryFromCsfFileError extends StorybookError {
export class StoryStoreAccessedBeforeInitializationError extends StorybookError {
constructor() {
super({
name: 'StoryStoreAccessedBeforeInitializationError',
category: Category.PREVIEW_API,
code: 11,
message: dedent`
Expand All @@ -213,8 +224,11 @@ export class StoryStoreAccessedBeforeInitializationError extends StorybookError
}

export class MountMustBeDestructuredError extends StorybookError {
// name: 'MountMustBeDestructuredError';
constructor(public data: { playFunction: string }) {
// this.name = 'MountMustBeDestructuredError';
super({
name: 'MountMustBeDestructuredError',
category: Category.PREVIEW_API,
code: 12,
message: dedent`
Expand Down Expand Up @@ -242,6 +256,7 @@ export class MountMustBeDestructuredError extends StorybookError {
export class NoRenderFunctionError extends StorybookError {
constructor(public data: { id: string }) {
super({
name: 'NoRenderFunctionError',
category: Category.PREVIEW_API,
code: 14,
message: dedent`
Expand All @@ -254,6 +269,7 @@ export class NoRenderFunctionError extends StorybookError {
export class NoStoryMountedError extends StorybookError {
constructor() {
super({
name: 'NoStoryMountedError',
category: Category.PREVIEW_API,
code: 15,
message: dedent`
Expand Down Expand Up @@ -284,6 +300,7 @@ export class StatusTypeIdMismatchError extends StorybookError {
}
) {
super({
name: 'StatusTypeIdMismatchError',
category: Category.PREVIEW_API,
code: 16,
message: `Status has typeId "${data.status.typeId}" but was added to store with typeId "${data.typeId}". Full status: ${JSON.stringify(
Expand All @@ -298,6 +315,7 @@ export class StatusTypeIdMismatchError extends StorybookError {
export class NextJsSharpError extends StorybookError {
constructor() {
super({
name: 'NextJsSharpError',
category: Category.FRAMEWORK_NEXTJS,
code: 1,
documentation: 'https://storybook.js.org/docs/get-started/nextjs#faq',
Expand All @@ -313,6 +331,7 @@ export class NextJsSharpError extends StorybookError {
export class NextjsRouterMocksNotAvailable extends StorybookError {
constructor(public data: { importType: string }) {
super({
name: 'NextjsRouterMocksNotAvailable',
category: Category.FRAMEWORK_NEXTJS,
code: 2,
message: dedent`
Expand All @@ -325,6 +344,7 @@ export class NextjsRouterMocksNotAvailable extends StorybookError {
export class UnknownArgTypesError extends StorybookError {
constructor(public data: { type: object; language: string }) {
super({
name: 'UnknownArgTypesError',
category: Category.DOCS_TOOLS,
code: 1,
documentation: 'https://github.com/storybookjs/storybook/issues/26606',
Expand All @@ -344,6 +364,7 @@ export class UnknownArgTypesError extends StorybookError {
export class UnsupportedViewportDimensionError extends StorybookError {
constructor(public data: { dimension: string; value: string }) {
super({
name: 'UnsupportedViewportDimensionError',
category: Category.ADDON_VITEST,
code: 1,
// TODO: Add documentation about viewports support
Expand All @@ -363,6 +384,7 @@ export class UnsupportedViewportDimensionError extends StorybookError {
export class ElementA11yParameterError extends StorybookError {
constructor() {
super({
name: 'ElementA11yParameterError',
category: Category.ADDON_A11Y,
code: 1,
documentation:
Expand Down
Loading
Loading