Repository navigation
refactor!: clean up obsolete v4 options and workarounds - #660
Merged
Merged
Conversation
- Drop the obsolete React 16/17 `exportsPresence = false` workaround and the deprecated no-op `addonDocs` builder option (with its type, test fixture, and rstest ignore entry). - Remove dangling non-existent template exports (`virtualModuleEntry.template.js`, `virtualModuleStory.template.js`) from `builder-rsbuild`. - Remove inert orphan `peerDependenciesMeta.typescript` entries from `builder-rsbuild`, `addon-rslib`, and `addon-modernjs`. - Drop the obsolete TODO and 40-line commented webpack plugin block in `framework-react/src/react-docs.ts`, and switch `react-docgen-loader.ts` from `@ts-expect-error` webpack `LoaderContext` to `Rspack.LoaderContext`. - Align `addon-rslib` devDep `@rslib/core` to `^1.0.3` and remove the stale `ignoreDep: ['@rslib/core']` entry. - Update stale Rsbuild 1.0 links in the docs and stale Storybook 10.5.10 / LoaderContext notes in `manifest.json`.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying storybook-rsbuild with
|
| Latest commit: |
c01558f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://138a43ab.storybook-rsbuild.pages.dev |
| Branch Preview URL: | https://chore-v4-cleanup.storybook-rsbuild.pages.dev |
Deploying storybook-rsbuild-v2 with
|
| Latest commit: |
c01558f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1bdeb7a5.storybook-rsbuild-v2.pages.dev |
| Branch Preview URL: | https://chore-v4-cleanup.storybook-rsbuild-v2.pages.dev |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Clean up obsolete pre-v4 workarounds, deprecated options, dangling exports, and stale metadata across
v4(16 files, +13/-101):Why
peerDependenciesMeta.typescriptis removed from all 3 packagesstorybook-addon-rslib(dependencies: []) andstorybook-addon-modernjs(find-up,rslog) never importtypescript; theirpeerDependenciesMeta.typescriptentries were copied fromstorybook-builder-rsbuild.storybook-builder-rsbuilddoes not importtypescriptdirectly either — its only TS consumer is@rsbuild/plugin-type-check(which itself declares notypescriptpeer) ->ts-checker-rspack-plugin(peerDependencies.typescript: '>=3.8.0'). The four TypeScript-requiring frameworks (react,react-native-web,vue3,web-components) already declaretypescriptexplicitly, whileframework-htmlintentionally omits it. An orphanpeerDependenciesMeta.typescriptwithout a matchingpeerDependencies.typescriptis inert (a leftover from Storybook 7'sbuilder-webpack5).Evidence
v4still carried React 16/17exportsPresence = false, deadaddonDocswarning, 2 non-existent template exports, 3 orphanpeerDependenciesMeta.typescriptentries, an@ts-expect-errorwebpackLoaderContextimport, 40 lines of commented webpack docgen plugin code, a stale@rslib/coreignore incheck-dependency-version.mts, and Rsbuild 1.0 doc links.pnpm install(all workspace builds &.d.tsbundles succeeded;pnpm-lock.yamlupdated cleanly for@rslib/core ^1.0.3)pnpm check-dependency-version->No dependency version mismatches found.pnpm check-> lint & type check passed (408 files), format check passed (624 files)pnpm --filter ./sandboxes/react-18 run build:storybook-> succeeded (Storybook v11.0.0-rc.1)pnpm --filter ./sandboxes/chromatic-turbosnap run build:storybook-> succeeded (both.storybookand.storybook-jsx)pnpm test-> 33 test files / 280 tests passedpnpm --filter website build-> 32 pages built cleanlyMerge Danger
Door: Two-way
All removals are clean, isolated, and straightforward to revert if a consumer unexpectedly relied on
exportsPresence = false.Blast Radius: Low
exportsPresence = falseremoval only affects projects that import non-existent named exports from ESM dependencies (previously tolerated for React 16/17react-dom-shim'suseId, which v4 / Storybook 11 no longer supports).addonDocswas already a no-op warning since v3.templates/.