You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: add advisor implementation plans from codebase audit - #628
Adds plans/ — ten self-contained implementation plans from a read-only audit of src/ at v3.5.0 (1ea89aa), plus an index (plans/README.md) with execution order, dependencies, open investigation items, and findings considered and rejected.
No source, test, or config files are changed; this PR only proposes work.
Why
The adapters drift: the last six fix commits (#610#617#619#621#623#626) each landed on one or two adapters, and the test harness does not catch the siblings that were left behind. Several of the bugs below are literally "the fix shipped for webpack but not rspack/esbuild/farm".
What the plans cover
Plan
Outcome
001
pnpm test works cold (build-first), fixture script cleans/parallelises, webpack/rspack integration tests reject on stats.hasErrors(), loader filter tests actually filter
002
rspack loaders become raw (binary pass-through, parity with #623); rspack buildEnd moves to processAssets (parity with #619)
003
webpack: a throwing resolveId becomes a build error instead of an unhandled rejection; emitFile(Uint8Array) emits the exact byte range
004
esbuild/Bun: '' results honoured, disk read only after the id filter, filters normalised once, per-call watch files, dead sourcemap branch removed, Bun no longer crashes on transformInclude without transform
005
Farm: load→null no longer throws, transform→string is applied, resolveId gets undefined importer / real isEntry, sideEffects parity
006
relative id globs match when the cwd contains ()[]{}; mergeSourceMaps handles a transformed { mappings: '' }; direct tests for src/utils
007
real-bundler tests for watchChange, buildEnd/emitFile on rspack/esbuild/bun, fixture sourcemaps
008
remove write-only __unpluginMeta/__vfsModules, unused Farm helpers; move shared sourcemap helpers out of esbuild/utils
009
share the webpack/rspack hook-invocation bodies through utils/webpack-like.ts
010
AGENTS.md with the adapter-parity checklist and build-first rule; fix stale docs tables/examples
Each plan has inlined code excerpts, exact verification commands, scope boundaries, done criteria, and STOP conditions, written so an executor with no context from the audit can run it.
Caveat
The audit environment had no node_modules, so nothing was executed — every finding is from reading the cited code. Each plan's first step is a failing test so the executor confirms the bug before changing anything.
Created with the help of an agent.
Summary by CodeRabbit
Documentation
Added an index and ten implementation plans covering test coverage, bundler adapter behavior, shared utilities, code cleanup, and contributor guidance.
These documents outline proposed work and verification steps; they do not implement the described changes.
This pull request adds an index and ten plans for proposed repository work. The plans cover testing, bundler adapters, utilities, cleanup, and documentation. They specify implementation steps and verification criteria; they do not implement the planned changes.
Changes: Maintenance planning
Layer / File(s)
Summary
Plan index and sequencing plans/README.md
Adds a status index for plans 001–010, with dependencies, sequencing notes, open investigations, and audit scope.
Test harness and lifecycle coverage plans/001-test-harness.md, plans/007-lifecycle-hook-coverage.md
Plans fixture test-harness updates and added lifecycle-hook and sourcemap coverage.
Bundler adapter contracts and shared logic plans/002-rspack-loader-parity.md, plans/003-webpack-resolveid-errors-and-emitfile-bytes.md, plans/005-farm-hook-contract.md, plans/009-webpack-rspack-shared-core.md
Plans webpack and rspack parity and shared logic, webpack resolver and byte-handling fixes, and Farm hook-contract changes.
Utility, hot-path, and cleanup plans plans/004-esbuild-bun-hot-path.md, plans/006-filter-cwd-escaping-and-utils-tests.md, plans/008-dead-code-removal.md
Plans esbuild and Bun hot-path changes, filter and sourcemap utility work, and dead-code removal with sourcemap helper relocation.
Contributor and guide documentation plan plans/010-agents-md-and-docs-fixes.md
Plans contributor guidance and corrections to the user guide and related documentation.
unjs/unplugin#621: Plan 009 covers shared webpack and rspack hook-filter memoization, and Plan 004 describes related normalization work for esbuild and Bun.
unjs/unplugin#611: Plan 004 specifies esbuild changes for preserving empty-string results.
unjs/unplugin#619: Plan 002 uses the webpack buildEnd timing as a reference for its proposed rspack change.
Suggested reviewers:antfu, sxzz
Merge Risk: Moderate · up to 4121d
These plans may direct contributors toward incorrect changes or reject correct work. Resolve the conflicting instructions and checks before using the plans for implementation.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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
Adds
plans/— ten self-contained implementation plans from a read-only audit ofsrc/at v3.5.0 (1ea89aa), plus an index (plans/README.md) with execution order, dependencies, open investigation items, and findings considered and rejected.No source, test, or config files are changed; this PR only proposes work.
Why
The adapters drift: the last six fix commits (#610 #617 #619 #621 #623 #626) each landed on one or two adapters, and the test harness does not catch the siblings that were left behind. Several of the bugs below are literally "the fix shipped for webpack but not rspack/esbuild/farm".
What the plans cover
pnpm testworks cold (build-first), fixture script cleans/parallelises, webpack/rspack integration tests reject onstats.hasErrors(), loader filter tests actually filterraw(binary pass-through, parity with #623); rspackbuildEndmoves toprocessAssets(parity with #619)resolveIdbecomes a build error instead of an unhandled rejection;emitFile(Uint8Array)emits the exact byte range''results honoured, disk read only after the id filter, filters normalised once, per-call watch files, dead sourcemap branch removed, Bun no longer crashes ontransformIncludewithouttransformload→nullno longer throws,transform→string is applied,resolveIdgetsundefinedimporter / realisEntry,sideEffectsparity()[]{};mergeSourceMapshandles a transformed{ mappings: '' }; direct tests forsrc/utilswatchChange,buildEnd/emitFileon rspack/esbuild/bun, fixture sourcemaps__unpluginMeta/__vfsModules, unused Farm helpers; move shared sourcemap helpers out ofesbuild/utilsutils/webpack-like.tsAGENTS.mdwith the adapter-parity checklist and build-first rule; fix stale docs tables/examplesEach plan has inlined code excerpts, exact verification commands, scope boundaries, done criteria, and STOP conditions, written so an executor with no context from the audit can run it.
Caveat
The audit environment had no
node_modules, so nothing was executed — every finding is from reading the cited code. Each plan's first step is a failing test so the executor confirms the bug before changing anything.Created with the help of an agent.
Summary by CodeRabbit