chore: update dependency versions for swc plugin and rspack core#50
chore: update dependency versions for swc plugin and rspack core#50xierenyuan merged 1 commit intomainfrom
Conversation
WalkthroughDependency version updates across bundler packages: "@kmijs/swc-plugin-auto-css-modules" bumped from 0.0.1 to 0.1.0 in bundler-rspack, and "@rspack/core" upgraded from 1.4.8 to 1.6.8 in bundler-shared. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| "@kmijs/bundler-shared-config": "workspace:*", | ||
| "@kmijs/shared": "workspace:*", | ||
| "@kmijs/swc-plugin-auto-css-modules": "0.0.1", | ||
| "@kmijs/swc-plugin-auto-css-modules": "0.1.0", |
There was a problem hiding this comment.
Node.js engine constraint inconsistent with dependency requirements
The bundler-rspack package declares engine support for Node.js ^14.18.0 || >=16.10.0, but the upgraded @rspack/core@1.6.8 dependency now requires node: '>=18.12.0'. Users running on Node.js 14.x or 16.x may encounter runtime failures since the actual minimum Node.js version is now 18.12.0. The engines field in bundler-rspack and potentially bundler-shared needs updating to reflect the new requirement.
Additional Locations (1)
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/bundler-rspack/package.jsonpackages/bundler-shared/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Cursor Bugbot
- GitHub Check: lint
- GitHub Check: build-and-test (22.x, ubuntu-latest)
- GitHub Check: build-and-test (22.x, windows-latest)
🔇 Additional comments (1)
packages/bundler-rspack/package.json (1)
34-34: Check if v0.1.0 is publicly available and review its changelog for breaking changes.The
@kmijs/swc-plugin-auto-css-modulesv0.1.0 cannot be found on the public npm registry. This appears to be a private or internal package. While the pnpm-lock.yaml confirms resolution to v0.1.0, you'll need to access your organization's package registry or repository to review the changelog and verify whether this minor version bump introduces breaking changes. The plugin is currently configured with an empty object ({}), so any API or behavior changes would be breaking.Additionally, there's a typo in the documentation at
docs/docs/config/config.mdline 1382—it references@ksuni/swc-plugin-auto-css-modulesinstead of@kmijs/swc-plugin-auto-css-modules. This should be corrected.
| "dependencies": { | ||
| "@kmijs/shared": "workspace:*", | ||
| "@rspack/core": "1.4.8", | ||
| "@rspack/core": "1.6.8", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify @rspack/core version 1.6.8 existence
# Check if version 1.6.8 exists
echo "=== Checking if @rspack/core@1.6.8 exists ==="
npm view @rspack/core@1.6.8 version 2>&1
# Get available versions between 1.4.8 and 1.6.8
echo -e "\n=== Available versions between 1.4.8 and 1.6.8 ==="
npm view @rspack/core versions --json 2>&1 | jq -r '.[]' | grep -E '^1\.(4|5|6)' | sort -VRepository: kmijs/kmi
Length of output: 553
🌐 Web query:
@rspack/core 1.6.8 changelog release notes
💡 Result:
@rspack/core v1.6.8 — published Dec 17, 2025. See the release listing and Rspack release activity for details. (releasealert.dev)
Citations:
🌐 Web query:
@rspack/core breaking changes migration 1.4 to 1.6
💡 Result:
Here are the main breaking changes and migration actions when moving @rspack/core from 1.4 → 1.6 (concise checklist):
-
CSS builtins removed — replace builtins.css with the new CSS options (module.parser / module.generator) and switch any usages of builtins CSS plugins to the new plugins (e.g., use rspack.LightningCssMinimizerRspackPlugin). Update CSS-related config accordingly. (rspack.rs)
-
New tree-shaking algorithm / ESM output changes — 1.6 improves/enables a new tree-shaking behavior and ESM output handling; verify dynamic-import patterns and expect different tree-shake results (may need to adjust imports or sideEffects). Test bundles and adjust code that relied on prior dead-code retention. (rspack.rs)
-
Remove compiler.build and compiler.rebuild — code calling these internal APIs must be updated (use the supported public APIs / runner patterns instead). (rspack.rs)
-
experiments.* option removals / defaults changed — some experiments flags were removed or defaulted (e.g., disableApplyEntryLazily removed; new resolver enabled by default earlier). Audit your experiments.* usage and remove or adapt configs that targeted removed flags. (rspack.rs)
-
SWC plugin / SWC core version bumps — if you use SWC Wasm plugins (e.g., @swc/plugin-emotion), upgrade them to versions compatible with the newer swc_core used by Rspack 1.4→1.6 to avoid build errors. Also check minimizer option shape changes (e.g., passes → compress.passes). (rspack.rs)
-
Lazy compilation middleware change (from 1.4) — middleware now reads lazyCompilation from the compiler; remove manual passing of that option if you followed earlier examples. Confirm any custom dev-server middleware is updated. (rspack.rs)
-
General plugin API / builtin adjustments — some builtins were removed or renamed; search your config for usages of removed builtins (SwcCssMinimizerRspackPlugin → LightningCssMinimizerRspackPlugin, builtins.* options) and replace accordingly. (rspack.rs)
Quick migration steps
- Run tests and a full build locally and in CI; capture failures.
- Search your config for: builtins., experiments., compiler.build/rebuild, old minimizer/plugin names, SWC plugin imports, and resolve.extensions; update per notes above. (rspack.rs)
- Upgrade SWC-related plugins to versions compatible with swc_core used by 1.6. (rspack.rs)
- Inspect bundle output (tree-shaken modules, ESM artifacts) and adjust code that relied on previous bundling behaviors. (rspack.rs)
If you want, tell me where your current config or code calls the removed APIs (paste snippets) and I’ll provide exact replacements.
Citations:
- 1: https://rspack.rs/blog/announcing-0-6?utm_source=openai
- 2: https://rspack.rs/blog/announcing-1-6?utm_source=openai
- 3: https://rspack.rs/blog/announcing-0-6?utm_source=openai
- 4: https://rspack.rs/blog/announcing-0-6?utm_source=openai
- 5: https://rspack.rs/blog/announcing-1-4?utm_source=openai
- 6: https://rspack.rs/blog/announcing-1-4?utm_source=openai
- 7: https://rspack.rs/guide/migration/rspack_0.x?utm_source=openai
- 8: https://rspack.rs/blog/announcing-0-6?utm_source=openai
- 9: https://rspack.rs/blog/announcing-1-4?utm_source=openai
- 10: https://rspack.rs/blog/announcing-1-6?utm_source=openai
🏁 Script executed:
#!/bin/bash
# Search for breaking change patterns in the codebase
# Search for CSS builtins usage
echo "=== Searching for CSS builtins usage ==="
rg "builtins\.css|builtins\." --type js --type json --type ts 2>/dev/null | head -20
# Search for compiler.build/rebuild usage
echo -e "\n=== Searching for compiler.build/rebuild usage ==="
rg "compiler\.(build|rebuild)" --type js --type ts 2>/dev/null | head -20
# Search for experiments config
echo -e "\n=== Searching for experiments config ==="
rg "experiments\s*:" --type json --type js 2>/dev/null | head -20
# Search for rspack config files
echo -e "\n=== Searching for rspack config files ==="
find . -name "rspack*.config.*" -o -name "webpack.config.*" 2>/dev/null | grep -v node_modules | head -20
# Check the actual bundler-shared package.json content
echo -e "\n=== Current @rspack/core dependency in bundler-shared ==="
cat packages/bundler-shared/package.json | grep -A 2 -B 2 "@rspack/core"Repository: kmijs/kmi
Length of output: 50367
🏁 Script executed:
#!/bin/bash
# More targeted search for rspack config and breaking change patterns
# Find rspack config files
echo "=== Finding rspack config files ==="
find . -type f -name "*rspack*.config.*" 2>/dev/null | head -20
# Check bundler-shared package.json dependencies
echo -e "\n=== Dependencies in bundler-shared/package.json (lines 130-140) ==="
sed -n '130,140p' packages/bundler-shared/package.json
# Search for any SWC minimizer configuration patterns
echo -e "\n=== Searching for minimizer/SWC config ==="
rg "SwcCssMinimizerRspackPlugin|LightningCssMinimizerRspackPlugin|minimizer" --type json --type js 2>/dev/null | grep -v node_modules | head -20
# Search for any experiments config in source files
echo -e "\n=== Checking for experiments config in bundler files ==="
find packages/bundler-shared -type f \( -name "*.js" -o -name "*.ts" -o -name "*.json" \) -exec grep -l "experiments" {} \; 2>/dev/nullRepository: kmijs/kmi
Length of output: 50365
Verify the @rspack/core version upgrade and check for breaking changes.
The version upgrade from 1.4.8 to 1.6.8 (skipping 1.5.x) has been confirmed—1.6.8 was published on Dec 17, 2025. However, significant breaking changes exist between these versions:
- CSS builtins removed: Replace
builtins.csswith new CSS options (module.parser / module.generator). Update any SWC CSS minimizer plugin references (e.g.,SwcCssMinimizerRspackPlugin→LightningCssMinimizerRspackPlugin). - Tree-shaking and ESM output changes: 1.6 introduces improved tree-shaking behavior; verify dynamic-import patterns and test bundle output.
- Removed APIs:
compiler.buildandcompiler.rebuildinternal APIs were removed; switch to supported public APIs if used. - experiments. options*: Some experiment flags were removed or defaulted; audit config for removed flags.
- SWC plugin compatibility: If using SWC Wasm plugins, upgrade them to versions compatible with the newer swc_core used by Rspack 1.6.
Run a full build locally and in CI, inspect bundle output for tree-shaken modules and ESM artifacts, and test that no config references removed builtins or internal APIs.
🤖 Prompt for AI Agents
In packages/bundler-shared/package.json around line 133, the dependency bump of
@rspack/core from 1.4.8→1.6.8 introduces breaking changes; audit and update
configs and code: search and replace any use of builtins.css with the new CSS
config (module.parser/module.generator), replace SWC CSS minimizer plugin
references (e.g., SwcCssMinimizerRspackPlugin →
LightningCssMinimizerRspackPlugin) and upgrade any SWC wasm plugins to versions
compatible with the swc_core used by Rspack 1.6; search for removed internal
APIs (compiler.build / compiler.rebuild) and migrate to supported public APIs;
review experiments.* flags for removed/defaulted options and remove or adjust
them; then run a full local and CI build, inspect bundle outputs for changed
tree-shaking/ESM behavior (verify dynamic-imports and removed modules), run
tests, and fix any regressions discovered.
升级 rspack 版本
Note
Dependency upgrades
@kmijs/swc-plugin-auto-css-modulesto0.1.0inbundler-rspack@rspack/coreto1.6.8inbundler-sharedLockfile/tooling refresh
@rspack/*platform bindings and@module-federation/*to newer versionsrolldown-viteto7.3.0androlldownto1.0.0-beta.53(with new platform bindings)postcss8.5.6,cssnanopreset deps, andlightningcss1.30.2picomatch,fdir,@oxc-project/*,@napi-rs/wasm-runtimeWritten by Cursor Bugbot for commit d6d1b54. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.