generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 12
Support name in manifest errors #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6edbfaa
add name to manifest errors
JReinhold 340fdfe
add fixtures with errors
JReinhold bb6019b
add changeset
JReinhold d2d478d
Merge branch 'next' into update-format
JReinhold fe58873
Merge branch 'next' into update-format
JReinhold 164dd24
Merge branch 'next' into update-format
JReinhold e8d98f2
improve test reports in ci
JReinhold 00163d1
update fixtures to use stories instead of examples
JReinhold f5b610d
more example -> story renaming
JReinhold File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@storybook/mcp': patch | ||
| --- | ||
|
|
||
| Support error.name in manifests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| { | ||
| "v": 1, | ||
| "components": { | ||
| "success-component-with-mixed-examples": { | ||
| "id": "success-component-with-mixed-examples", | ||
| "path": "src/components/SuccessWithMixedExamples.tsx", | ||
| "name": "SuccessWithMixedExamples", | ||
| "description": "A component that loaded successfully but has some examples that failed to generate.", | ||
| "summary": "Success component with both working and failing examples", | ||
| "import": "import { SuccessWithMixedExamples } from '@storybook/design-system';", | ||
| "reactDocgen": { | ||
| "props": { | ||
| "text": { | ||
| "description": "The text to display", | ||
| "required": true, | ||
| "tsType": { "name": "string" } | ||
| }, | ||
| "variant": { | ||
| "description": "The visual variant", | ||
| "required": false, | ||
| "tsType": { | ||
| "name": "union", | ||
| "raw": "\"primary\" | \"secondary\"", | ||
| "elements": [ | ||
| { "name": "literal", "value": "\"primary\"" }, | ||
| { "name": "literal", "value": "\"secondary\"" } | ||
| ] | ||
| }, | ||
| "defaultValue": { "value": "\"primary\"", "computed": false } | ||
| } | ||
| } | ||
| }, | ||
| "stories": [ | ||
| { | ||
| "id": "success-component-with-mixed-examples--working", | ||
| "name": "Working", | ||
| "description": "This example generated successfully.", | ||
| "summary": "A working example", | ||
| "import": "import { SuccessWithMixedExamples } from '@storybook/design-system';", | ||
| "snippet": "const Working = () => <SuccessWithMixedExamples text=\"Hello\" />" | ||
| }, | ||
| { | ||
| "id": "success-component-with-mixed-examples--failed", | ||
| "name": "Failed", | ||
| "error": { | ||
| "name": "SyntaxError", | ||
| "message": "Unexpected token in story code. Unable to generate code snippet." | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "error-component-with-success-examples": { | ||
| "id": "error-component-with-success-examples", | ||
| "path": "src/components/ErrorWithSuccessExamples.tsx", | ||
| "name": "ErrorWithSuccessExamples", | ||
| "error": { | ||
| "name": "TypeError", | ||
| "message": "Failed to parse component: Cannot read property 'name' of undefined in react-docgen parser" | ||
| }, | ||
| "stories": [ | ||
| { | ||
| "id": "error-component-with-success-examples--basic", | ||
| "name": "Basic", | ||
| "description": "Even though the component parsing failed, this example's code snippet was generated.", | ||
| "summary": "Basic usage example", | ||
| "snippet": "const Basic = () => <ErrorWithSuccessExamples>Content</ErrorWithSuccessExamples>" | ||
| }, | ||
| { | ||
| "id": "error-component-with-success-examples--advanced", | ||
| "name": "Advanced", | ||
| "description": "Another successfully generated example despite component-level errors.", | ||
| "summary": "Advanced usage example", | ||
| "snippet": "const Advanced = () => (\n <ErrorWithSuccessExamples disabled>\n Advanced Content\n </ErrorWithSuccessExamples>\n)" | ||
| } | ||
| ] | ||
| }, | ||
| "error-component-with-error-examples": { | ||
| "id": "error-component-with-error-examples", | ||
| "path": "src/components/ErrorWithErrorExamples.tsx", | ||
| "name": "ErrorWithErrorExamples", | ||
| "error": { | ||
| "name": "Error", | ||
| "message": "Failed to extract component metadata: File not found or contains invalid TypeScript" | ||
| }, | ||
| "stories": [ | ||
| { | ||
| "id": "error-component-with-error-examples--broken-example-1", | ||
| "name": "BrokenExample1", | ||
| "description": "This example failed to generate.", | ||
| "error": { | ||
| "name": "Error", | ||
| "message": "Story render function is too complex to analyze" | ||
| } | ||
| }, | ||
| { | ||
| "id": "error-component-with-error-examples--broken-example-2", | ||
| "name": "BrokenExample2", | ||
| "description": "This example also failed to generate.", | ||
| "error": { | ||
| "name": "ReferenceError", | ||
| "message": "Undefined variable referenced in story: missingImport" | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "complete-error-component": { | ||
| "id": "complete-error-component", | ||
| "path": "src/components/CompleteError.tsx", | ||
| "name": "CompleteError", | ||
| "error": { | ||
| "name": "ModuleNotFoundError", | ||
| "message": "Cannot find module './CompleteError' or its corresponding type declarations" | ||
| } | ||
| }, | ||
| "partial-success": { | ||
| "id": "partial-success", | ||
| "path": "src/components/PartialSuccess.tsx", | ||
| "name": "PartialSuccess", | ||
| "description": "A component where everything worked except one example.", | ||
| "summary": "Mostly working component with one failing example", | ||
| "import": "import { PartialSuccess } from '@storybook/design-system';", | ||
| "reactDocgen": { | ||
| "props": { | ||
| "title": { | ||
| "description": "The title text", | ||
| "required": true, | ||
| "tsType": { "name": "string" } | ||
| }, | ||
| "subtitle": { | ||
| "description": "Optional subtitle", | ||
| "required": false, | ||
| "tsType": { "name": "string" } | ||
| } | ||
| } | ||
| }, | ||
| "stories": [ | ||
| { | ||
| "id": "partial-success--default", | ||
| "name": "Default", | ||
| "description": "Default usage of the component.", | ||
| "import": "import { PartialSuccess } from '@storybook/design-system';", | ||
| "snippet": "const Default = () => <PartialSuccess title=\"Hello\" />" | ||
| }, | ||
| { | ||
| "id": "partial-success--with-subtitle", | ||
| "name": "WithSubtitle", | ||
| "description": "Component with both title and subtitle.", | ||
| "import": "import { PartialSuccess } from '@storybook/design-system';", | ||
| "snippet": "const WithSubtitle = () => <PartialSuccess title=\"Hello\" subtitle=\"World\" />" | ||
| }, | ||
| { | ||
| "id": "partial-success--complex-case", | ||
| "name": "ComplexCase", | ||
| "description": "A complex example that failed to generate.", | ||
| "error": { | ||
| "name": "Error", | ||
| "message": "Story uses hooks that cannot be statically analyzed" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.