Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/core-events

Package Overview
Dependencies
Maintainers
7
Versions
1864
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/core-events - npm Package Compare versions

Comparing version 8.0.0-alpha.9 to 8.0.0-alpha.10

78

dist/errors/preview-errors.d.ts

@@ -57,3 +57,79 @@ import { S as StorybookError } from '../storybook-error-32ac504c.js';

}
declare class CalledExtractOnStoreError extends StorybookError {
readonly category = Category.PREVIEW_API;
readonly code = 3;
template(): string;
}
declare class MissingRenderToCanvasError extends StorybookError {
readonly category = Category.PREVIEW_API;
readonly code = 4;
readonly documentation = "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field";
template(): string;
}
declare class CalledPreviewMethodBeforeInitializationError extends StorybookError {
data: {
methodName: string;
};
readonly category = Category.PREVIEW_API;
readonly code = 5;
constructor(data: {
methodName: string;
});
template(): string;
}
declare class StoryIndexFetchError extends StorybookError {
data: {
text: string;
};
readonly category = Category.PREVIEW_API;
readonly code = 6;
constructor(data: {
text: string;
});
template(): string;
}
declare class MdxFileWithNoCsfReferencesError extends StorybookError {
data: {
storyId: string;
};
readonly category = Category.PREVIEW_API;
readonly code = 7;
constructor(data: {
storyId: string;
});
template(): string;
}
declare class EmptyIndexError extends StorybookError {
readonly category = Category.PREVIEW_API;
readonly code = 8;
template(): string;
}
declare class NoStoryMatchError extends StorybookError {
data: {
storySpecifier: string;
};
readonly category = Category.PREVIEW_API;
readonly code = 9;
constructor(data: {
storySpecifier: string;
});
template(): string;
}
declare class MissingStoryFromCsfFileError extends StorybookError {
data: {
storyId: string;
};
readonly category = Category.PREVIEW_API;
readonly code = 10;
constructor(data: {
storyId: string;
});
template(): string;
}
declare class StoryStoreAccessedBeforeInitializationError extends StorybookError {
readonly category = Category.PREVIEW_API;
readonly code = 11;
template(): string;
}
export { Category, ImplicitActionsDuringRendering, MissingStoryAfterHmrError };
export { CalledExtractOnStoreError, CalledPreviewMethodBeforeInitializationError, Category, EmptyIndexError, ImplicitActionsDuringRendering, MdxFileWithNoCsfReferencesError, MissingRenderToCanvasError, MissingStoryAfterHmrError, MissingStoryFromCsfFileError, NoStoryMatchError, StoryIndexFetchError, StoryStoreAccessedBeforeInitializationError };

@@ -1,2 +0,2 @@

"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preview_errors_exports={};__export(preview_errors_exports,{Category:()=>Category,ImplicitActionsDuringRendering:()=>ImplicitActionsDuringRendering,MissingStoryAfterHmrError:()=>MissingStoryAfterHmrError});module.exports=__toCommonJS(preview_errors_exports);var import_ts_dedent=__toESM(require("ts-dedent"));var StorybookError=class extends Error{constructor(){super(...arguments);this.data={};this.documentation=!1;this.fromStorybook=!0}get fullErrorCode(){let paddedCode=String(this.code).padStart(4,"0");return`SB_${this.category}_${paddedCode}`}get name(){let errorName=this.constructor.name;return`${this.fullErrorCode} (${errorName})`}get message(){let page;return this.documentation===!0?page=`https://storybook.js.org/error/${this.fullErrorCode}`:typeof this.documentation=="string"?page=this.documentation:Array.isArray(this.documentation)&&(page=`
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preview_errors_exports={};__export(preview_errors_exports,{CalledExtractOnStoreError:()=>CalledExtractOnStoreError,CalledPreviewMethodBeforeInitializationError:()=>CalledPreviewMethodBeforeInitializationError,Category:()=>Category,EmptyIndexError:()=>EmptyIndexError,ImplicitActionsDuringRendering:()=>ImplicitActionsDuringRendering,MdxFileWithNoCsfReferencesError:()=>MdxFileWithNoCsfReferencesError,MissingRenderToCanvasError:()=>MissingRenderToCanvasError,MissingStoryAfterHmrError:()=>MissingStoryAfterHmrError,MissingStoryFromCsfFileError:()=>MissingStoryFromCsfFileError,NoStoryMatchError:()=>NoStoryMatchError,StoryIndexFetchError:()=>StoryIndexFetchError,StoryStoreAccessedBeforeInitializationError:()=>StoryStoreAccessedBeforeInitializationError});module.exports=__toCommonJS(preview_errors_exports);var import_ts_dedent=__toESM(require("ts-dedent"));var StorybookError=class extends Error{constructor(){super(...arguments);this.data={};this.documentation=!1;this.fromStorybook=!0}get fullErrorCode(){let paddedCode=String(this.code).padStart(4,"0");return`SB_${this.category}_${paddedCode}`}get name(){let errorName=this.constructor.name;return`${this.fullErrorCode} (${errorName})`}get message(){let page;return this.documentation===!0?page=`https://storybook.js.org/error/${this.fullErrorCode}`:typeof this.documentation=="string"?page=this.documentation:Array.isArray(this.documentation)&&(page=`
${this.documentation.map(doc=>` - ${doc}`).join(`

@@ -23,2 +23,50 @@ `)}`),`${this.template()}${page!=null?`

}
`}};0&&(module.exports={Category,ImplicitActionsDuringRendering,MissingStoryAfterHmrError});
`}},CalledExtractOnStoreError=class extends StorybookError{constructor(){super(...arguments);this.category="PREVIEW_API";this.code=3}template(){return import_ts_dedent.default`
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
You probably meant to call \`await preview.extract()\` which does the above for you.`}},MissingRenderToCanvasError=class extends StorybookError{constructor(){super(...arguments);this.category="PREVIEW_API";this.code=4;this.documentation="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"}template(){return import_ts_dedent.default`
Expected your framework's preset to export a \`renderToCanvas\` field.
Perhaps it needs to be upgraded for Storybook 6.4?`}},CalledPreviewMethodBeforeInitializationError=class extends StorybookError{constructor(data){super();this.data=data;this.category="PREVIEW_API";this.code=5}template(){return import_ts_dedent.default`
Called \`Preview.${this.data.methodName}()\` before initialization.
The preview needs to load the story index before most methods can be called. If you want
to call \`${this.data.methodName}\`, try \`await preview.initializationPromise;\` first.
If you didn't call the above code, then likely it was called by an addon that needs to
do the above.`}},StoryIndexFetchError=class extends StorybookError{constructor(data){super();this.data=data;this.category="PREVIEW_API";this.code=6}template(){return import_ts_dedent.default`
Error fetching \`/index.json\`:
${this.data.text}
If you are in development, this likely indicates a problem with your Storybook process,
check the terminal for errors.
If you are in a deployed Storybook, there may have been an issue deploying the full Storybook
build.`}},MdxFileWithNoCsfReferencesError=class extends StorybookError{constructor(data){super();this.data=data;this.category="PREVIEW_API";this.code=7}template(){return import_ts_dedent.default`
Tried to render docs entry ${this.data.storyId} but it is a MDX file that has no CSF
references, or autodocs for a CSF file that some doesn't refer to itself.
This likely is an internal error in Storybook's indexing, or you've attached the
\`attached-mdx\` tag to an MDX file that is not attached.`}},EmptyIndexError=class extends StorybookError{constructor(){super(...arguments);this.category="PREVIEW_API";this.code=8}template(){return import_ts_dedent.default`
Couldn't find any stories in your Storybook.
- Please check your stories field of your main.js config: does it match correctly?
- Also check the browser console and terminal for error messages.`}},NoStoryMatchError=class extends StorybookError{constructor(data){super();this.data=data;this.category="PREVIEW_API";this.code=9}template(){return import_ts_dedent.default`
Couldn't find story matching '${this.data.storySpecifier}'.
- Are you sure a story with that id exists?
- Please check your stories field of your main.js config.
- Also check the browser console and terminal for error messages.`}},MissingStoryFromCsfFileError=class extends StorybookError{constructor(data){super();this.data=data;this.category="PREVIEW_API";this.code=10}template(){return import_ts_dedent.default`
Couldn't find story matching id '${this.data.storyId}' after importing a CSF file.
The file was indexed as if the story was there, but then after importing the file in the browser
we didn't find the story. Possible reasons:
- You are using a custom story indexer that is misbehaving.
- You have a custom file loader that is removing or renaming exports.
Please check your browser console and terminal for errors that may explain the issue.`}},StoryStoreAccessedBeforeInitializationError=class extends StorybookError{constructor(){super(...arguments);this.category="PREVIEW_API";this.code=11}template(){return import_ts_dedent.default`
Cannot access the Story Store until the index is ready.
It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will
remove access to the store entirely`}};0&&(module.exports={CalledExtractOnStoreError,CalledPreviewMethodBeforeInitializationError,Category,EmptyIndexError,ImplicitActionsDuringRendering,MdxFileWithNoCsfReferencesError,MissingRenderToCanvasError,MissingStoryAfterHmrError,MissingStoryFromCsfFileError,NoStoryMatchError,StoryIndexFetchError,StoryStoreAccessedBeforeInitializationError});

26

dist/errors/server-errors.d.ts

@@ -225,19 +225,23 @@ import { S as StorybookError } from '../storybook-error-32ac504c.js';

}
declare class ConflictingVersionTagsError extends StorybookError {
declare class UpgradeStorybookToLowerVersionError extends StorybookError {
data: {
beforeVersion: string;
currentVersion: string;
};
readonly category = Category.CLI_UPGRADE;
readonly code = 1;
readonly code = 3;
constructor(data: {
beforeVersion: string;
currentVersion: string;
});
template(): string;
}
declare class UpgradeStorybookPackagesError extends StorybookError {
declare class UpgradeStorybookToSameVersionError extends StorybookError {
data: {
command: string;
args: string[];
errorMessage: string;
beforeVersion: string;
};
readonly category = Category.CLI_UPGRADE;
readonly code = 2;
readonly code = 4;
constructor(data: {
command: string;
args: string[];
errorMessage: string;
beforeVersion: string;
});

@@ -247,2 +251,2 @@ template(): string;

export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, ConflictingVersionTagsError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, InvalidFrameworkNameError, InvalidStoriesEntryError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NxProjectDetectedError, UpgradeStorybookPackagesError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, InvalidFrameworkNameError, InvalidStoriesEntryError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NxProjectDetectedError, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };

@@ -1,2 +0,2 @@

"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var server_errors_exports={};__export(server_errors_exports,{AngularLegacyBuildOptionsError:()=>AngularLegacyBuildOptionsError,Category:()=>Category,ConflictingStaticDirConfigError:()=>ConflictingStaticDirConfigError,ConflictingVersionTagsError:()=>ConflictingVersionTagsError,CouldNotEvaluateFrameworkError:()=>CouldNotEvaluateFrameworkError,CriticalPresetLoadError:()=>CriticalPresetLoadError,GenerateNewProjectOnInitError:()=>GenerateNewProjectOnInitError,GoogleFontsDownloadError:()=>GoogleFontsDownloadError,GoogleFontsLoadingError:()=>GoogleFontsLoadingError,InvalidFrameworkNameError:()=>InvalidFrameworkNameError,InvalidStoriesEntryError:()=>InvalidStoriesEntryError,MissingAngularJsonError:()=>MissingAngularJsonError,MissingBuilderError:()=>MissingBuilderError,MissingFrameworkFieldError:()=>MissingFrameworkFieldError,NoMatchingExportError:()=>NoMatchingExportError,NxProjectDetectedError:()=>NxProjectDetectedError,UpgradeStorybookPackagesError:()=>UpgradeStorybookPackagesError,WebpackCompilationError:()=>WebpackCompilationError,WebpackInvocationError:()=>WebpackInvocationError,WebpackMissingStatsError:()=>WebpackMissingStatsError});module.exports=__toCommonJS(server_errors_exports);var import_ts_dedent=__toESM(require("ts-dedent"));var StorybookError=class extends Error{constructor(){super(...arguments);this.data={};this.documentation=!1;this.fromStorybook=!0}get fullErrorCode(){let paddedCode=String(this.code).padStart(4,"0");return`SB_${this.category}_${paddedCode}`}get name(){let errorName=this.constructor.name;return`${this.fullErrorCode} (${errorName})`}get message(){let page;return this.documentation===!0?page=`https://storybook.js.org/error/${this.fullErrorCode}`:typeof this.documentation=="string"?page=this.documentation:Array.isArray(this.documentation)&&(page=`
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var server_errors_exports={};__export(server_errors_exports,{AngularLegacyBuildOptionsError:()=>AngularLegacyBuildOptionsError,Category:()=>Category,ConflictingStaticDirConfigError:()=>ConflictingStaticDirConfigError,CouldNotEvaluateFrameworkError:()=>CouldNotEvaluateFrameworkError,CriticalPresetLoadError:()=>CriticalPresetLoadError,GenerateNewProjectOnInitError:()=>GenerateNewProjectOnInitError,GoogleFontsDownloadError:()=>GoogleFontsDownloadError,GoogleFontsLoadingError:()=>GoogleFontsLoadingError,InvalidFrameworkNameError:()=>InvalidFrameworkNameError,InvalidStoriesEntryError:()=>InvalidStoriesEntryError,MissingAngularJsonError:()=>MissingAngularJsonError,MissingBuilderError:()=>MissingBuilderError,MissingFrameworkFieldError:()=>MissingFrameworkFieldError,NoMatchingExportError:()=>NoMatchingExportError,NxProjectDetectedError:()=>NxProjectDetectedError,UpgradeStorybookToLowerVersionError:()=>UpgradeStorybookToLowerVersionError,UpgradeStorybookToSameVersionError:()=>UpgradeStorybookToSameVersionError,WebpackCompilationError:()=>WebpackCompilationError,WebpackInvocationError:()=>WebpackInvocationError,WebpackMissingStatsError:()=>WebpackMissingStatsError});module.exports=__toCommonJS(server_errors_exports);var import_ts_dedent=__toESM(require("ts-dedent"));var StorybookError=class extends Error{constructor(){super(...arguments);this.data={};this.documentation=!1;this.fromStorybook=!0}get fullErrorCode(){let paddedCode=String(this.code).padStart(4,"0");return`SB_${this.category}_${paddedCode}`}get name(){let errorName=this.constructor.name;return`${this.fullErrorCode} (${errorName})`}get message(){let page;return this.documentation===!0?page=`https://storybook.js.org/error/${this.fullErrorCode}`:typeof this.documentation=="string"?page=this.documentation:Array.isArray(this.documentation)&&(page=`
${this.documentation.map(doc=>` - ${doc}`).join(`

@@ -85,10 +85,27 @@ `)}`),`${this.template()}${page!=null?`

${this.data.error instanceof Error?this.data.error.message:""}
`}},ConflictingVersionTagsError=class extends StorybookError{constructor(){super(...arguments);this.category="CLI_UPGRADE";this.code=1}template(){return"Cannot set both --tag and --prerelease. Use --tag=next to get the latest prerelease."}},UpgradeStorybookPackagesError=class extends StorybookError{constructor(data){super();this.data=data;this.category="CLI_UPGRADE";this.code=2}template(){return import_ts_dedent.default`
There was an error while trying to upgrade your Storybook dependencies.
`}},UpgradeStorybookToLowerVersionError=class extends StorybookError{constructor(data){super();this.data=data;this.category="CLI_UPGRADE";this.code=3}template(){return import_ts_dedent.default`
You are trying to upgrade Storybook to a lower version than the version currently installed. This is not supported.
Command:
${this.data.command} ${this.data.args.join(" ")}
Storybook version ${this.data.beforeVersion} was detected in your project, but you are trying to "upgrade" to version ${this.data.currentVersion}.
This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".
This will cause npm to run the globally cached storybook binary, which might be an older version.
Error:
${this.data.errorMessage}
`}};0&&(module.exports={AngularLegacyBuildOptionsError,Category,ConflictingStaticDirConfigError,ConflictingVersionTagsError,CouldNotEvaluateFrameworkError,CriticalPresetLoadError,GenerateNewProjectOnInitError,GoogleFontsDownloadError,GoogleFontsLoadingError,InvalidFrameworkNameError,InvalidStoriesEntryError,MissingAngularJsonError,MissingBuilderError,MissingFrameworkFieldError,NoMatchingExportError,NxProjectDetectedError,UpgradeStorybookPackagesError,WebpackCompilationError,WebpackInvocationError,WebpackMissingStatsError});
Instead you should always run the Storybook CLI with a version specifier to force npm to download the latest version:
"npx storybook@latest upgrade"
`}},UpgradeStorybookToSameVersionError=class extends StorybookError{constructor(data){super();this.data=data;this.category="CLI_UPGRADE";this.code=4}template(){return import_ts_dedent.default`
You are trying to upgrade Storybook to the same version that is currently installed in the project, version ${this.data.beforeVersion}. This is not supported.
This usually happens when running the upgrade command without a version specifier, e.g. "npx storybook upgrade".
This will cause npm to run the globally cached storybook binary, which might be the same version that you already have.
This also happens if you're running the Storybook CLI that is locally installed in your project.
If you intended to upgrade to the latest version, you should always run the Storybook CLI with a version specifier to force npm to download the latest version:
"npx storybook@latest upgrade"
If you intended to re-run automigrations, you should run the "automigrate" command directly instead:
"npx storybook@${this.data.beforeVersion} automigrate"
`}};0&&(module.exports={AngularLegacyBuildOptionsError,Category,ConflictingStaticDirConfigError,CouldNotEvaluateFrameworkError,CriticalPresetLoadError,GenerateNewProjectOnInitError,GoogleFontsDownloadError,GoogleFontsLoadingError,InvalidFrameworkNameError,InvalidStoriesEntryError,MissingAngularJsonError,MissingBuilderError,MissingFrameworkFieldError,NoMatchingExportError,NxProjectDetectedError,UpgradeStorybookToLowerVersionError,UpgradeStorybookToSameVersionError,WebpackCompilationError,WebpackInvocationError,WebpackMissingStatsError});
{
"name": "@storybook/core-events",
"version": "8.0.0-alpha.9",
"version": "8.0.0-alpha.10",
"description": "Event names used in storybook core",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc