-
Notifications
You must be signed in to change notification settings - Fork 1
[migrate] upgrade to StoryBook 8 with Parcel 2 #53
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
213bc3e
[optimize] upgrade to StoryBook 8 & other latest Upstream packages
TechQuery 27350d6
[fix] failed to compile ECMAScript Decorator stage-3 in StoryBook 8
TechQuery 917236a
Merge branch 'master' into StoryBook-8
TechQuery 77d2f69
[fix] Timeline component layout
TechQuery 980874e
[migrate] replace Vite with Parcel to simplify StoryBook configuration
TechQuery fea317d
[fix] PrismJS CSS compatible bug
TechQuery 8c17645
[fix] Storybook 8 build with Parcel 2 for React 19 compatibility
Copilot 91b8a7b
[fix] improve code quality in pnpm patches per code review
Copilot d4f3326
[fix] revert resolver-storybook patch to ternary syntax; document pat…
Copilot 9c088ec
[fix] remove packageManager version lock; use numbered list for patch…
Copilot 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
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,9 @@ | ||
| { | ||
| "extends": "@parcel/config-storybook", | ||
| "transformers": { | ||
| "*.{ts,tsx}": [ | ||
| "@parcel/transformer-typescript-tsc", | ||
| "@parcel/transformer-react-refresh-wrap" | ||
| ] | ||
| } | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/index.js b/index.js | ||
| index e686091e3244f2d7d01b3ba740a5a2b306e6c915..49e6c8283ffce139ce1dd1b068eed2b0533ffdc0 100644 | ||
| --- a/index.js | ||
| +++ b/index.js | ||
| @@ -1 +1,8 @@ | ||
| export {MDXProvider, useMDXComponents} from './lib/index.js' | ||
| + | ||
| +// Compatibility shim: @parcel/transformer-mdx@2.x generates code that imports | ||
| +// `mdx` from '@mdx-js/react', but this export was removed in @mdx-js/react@2.x. | ||
| +import React from 'react' | ||
| +export function mdx(type, props, ...children) { | ||
| + return React.createElement(type, props, ...children) | ||
| +} |
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,13 @@ | ||
| diff --git a/dist/StorybookResolver.js b/dist/StorybookResolver.js | ||
| index 3e97e9267df366cfbceeae3a03ac3058d1c1cafd..21c32f45219d696cc62de95643fbcf2bf5dc6f46 100644 | ||
| --- a/dist/StorybookResolver.js | ||
| +++ b/dist/StorybookResolver.js | ||
| @@ -17,7 +17,7 @@ module.exports = new _plugin.Resolver({ | ||
| async resolve ({ dependency, options, specifier, pipeline, logger }) { | ||
| // Workaround for interop issue | ||
| if (specifier === "react-dom/client") { | ||
| - let specifier = REACT_MAJOR_VERSION >= 18 ? "react-dom/client.js" : "react-dom/index.js"; | ||
| + let specifier = REACT_MAJOR_VERSION >= 19 ? "react-dom/client" : REACT_MAJOR_VERSION >= 18 ? "react-dom/client.js" : "react-dom/index.js"; | ||
| return { | ||
| filePath: __dirname + "/react.js", | ||
| code: ` |
Oops, something went wrong.
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.