-
-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update dependencies across the project for improved compatibility and performance; #44
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
Conversation
|
Warning Rate limit exceeded@tclxshunquan-wang has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 56 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughBumps many monorepo dependencies (notably the swc Rust ecosystem, workspace Cargo deps, React, Next, and tooling), adds a changeset announcing v2.0.0, updates example Next.js typing/JSX runtime, and moves small SWC test error handling into function scope. No exported API signatures changed. Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test runner
participant Util as transformCode()
participant SWC as swc.transform
Note right of Util `#e7f6ff`: pluginPath/pluginName now computed inside function
Test->>Util: call transformCode(code, opts)
Util->>SWC: swc.transform(code, opts + plugin)
alt transform succeeds
SWC-->>Util: transformed code
Util-->>Test: return result
else transform throws
SWC--xUtil: error
Util->>Console: console.error(error)
Util-->>Test: propagate/reject error
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (19)
.changeset/shiny-gifts-raise.md(1 hunks)Cargo.toml(1 hunks)README.md(1 hunks)crates/inspector-swc-plugin/package.json(1 hunks)examples/example-nextjs/.gitignore(1 hunks)examples/example-nextjs/next-env.d.ts(0 hunks)examples/example-nextjs/next.config.ts(2 hunks)examples/example-nextjs/package.json(1 hunks)examples/example-nextjs/tsconfig.json(2 hunks)examples/example-rspack/package.json(1 hunks)examples/example-webpack/package.json(2 hunks)package.json(1 hunks)packages/inspector-babel-plugin/package.json(1 hunks)packages/inspector-common/package.json(1 hunks)packages/inspector-component/package.json(1 hunks)packages/inspector-middleware/package.json(1 hunks)packages/inspector/package.json(1 hunks)packages/next-inspector/package.json(1 hunks)website/package.json(1 hunks)
💤 Files with no reviewable changes (1)
- examples/example-nextjs/next-env.d.ts
🔇 Additional comments (26)
.changeset/shiny-gifts-raise.md (1)
1-10: Changeset format is correct; verification shows no critical version mismatches.The changeset file follows the standard Changesets format correctly with all six monorepo packages receiving coordinated major bumps for v2.0.0.
Verification of actual dependencies across the monorepo confirms:
- React upgraded to 19.1.1–19.2.0 (aligns with v2.0.0 release strategy)
- TypeScript, ESLint, Vitest, Next.js are consistently versioned
- @swc/core remains at ^1.14.0 (minor release, not the "36→44" upgrade mentioned in PR objectives)
- Babel presence is minimal (babel-loader only in examples)
The changeset itself requires no modifications. The original verification concerns were based on PR objectives that do not reflect the actual dependency changes included in this changeset.
examples/example-nextjs/.gitignore (1)
10-12: LGTM!Adding
next-env.d.tsto.gitignoreis standard Next.js practice, as this file is auto-generated by Next.js and should not be committed to version control.README.md (2)
73-74: LGTM!The addition of Windows/Linux hotkey information improves cross-platform documentation clarity.
58-69: Based on my verification of current Next.js and Turbopack documentation, I found that the turbopack swc_core upgrade status has evolved since the README was written.Recent Next.js releases (as of July 2025) show that swc_core has been updated to v29.4.0, and Turbopack is now the default bundler in Next.js. This suggests the statement in lines 68-69 about swc_core not being upgraded may be outdated.
Add date context and verify version guidance accuracy.
The recommendation to use inspector 1.x for Next.js (lines 68-69) should be tied to a specific Next.js version threshold, such as "as of Next.js 15.x" or the date when this guidance was accurate. Without this context, the advice becomes stale quickly as Next.js and its dependencies evolve.
Additionally:
- The tilde range recommendation (
~x.x.x) differs from npm ecosystem norms (caret^x.x.x). Consider documenting why tilde is preferred—whether it's for stricter patch-level control due to swc compatibility concerns.- Consider revising the 1.x guidance for Next.js to align with current Next.js release cycles, or explicitly state it applies only to legacy Next.js versions.
examples/example-nextjs/tsconfig.json (3)
4-8: LGTM!The multi-line array formatting improves readability without changing functionality.
Also applies to: 26-28, 39-41
36-37: LGTM!The addition of
next.config.tsand.next/dev/types/**/*.tsto the include array is appropriate:
- It aligns with the migration to TypeScript config file (next.config.ts)
- The
.next/dev/types/**/*.tsinclusion ensures Next.js's generated development types are recognized by TypeScript
18-18: No issues found—jsx configuration is correct for React 19.The change from
"preserve"to"react-jsx"is the correct TypeScript configuration for React 19. React 19 requires the new JSX transform and you must set TypeScript's "jsx" to "react-jsx". With Next.js 16 and React 19.2.0, this configuration is compatible and properly handles JSX transformation. No build conflicts or breaking changes are expected.examples/example-webpack/package.json (3)
22-35: LGTM!Runtime dependency updates to React 19.2.0 and related UI libraries look good and are consistent with the broader dependency upgrade strategy across the monorepo.
38-41: LGTM!The Babel, TypeScript, Webpack, and other development tooling updates appear standard and follow appropriate semver conventions.
Also applies to: 43-61, 63-63
42-42: No Tailwind v4 breaking changes detected in the codebase.Verification of examples/example-webpack/src confirmed that the existing Tailwind CSS usage is already compatible with v4.1.17. The codebase uses modern utilities (e.g.,
flex items-center,rounded-medium bg-content1,grid grid-cols-1) and contains none of the deprecated patterns: old important modifiers, opacity utilities, bracket CSS variable syntax, or outline-none usage. The upgrade can proceed safely.packages/inspector-middleware/package.json (1)
46-59: LGTM!All dependency updates are minor or patch versions that maintain compatibility. The launch-editor bump from 2.11.1 to 2.12.0 and Vitest upgrade to 4.0.7 are consistent with the broader dependency update strategy.
examples/example-nextjs/next.config.ts (2)
1-1: LGTM!Using type-only imports (
import type) is a best practice that ensures these types are stripped during compilation and don't add runtime overhead.Also applies to: 3-3
7-7: LGTM!Adding explicit type annotations for
pluginsandnextConfigimproves type safety and developer experience with better IDE autocomplete and type checking. This aligns well with the tsconfig.json update that now includes this file in the compilation.Also applies to: 21-21
crates/inspector-swc-plugin/package.json (2)
46-47: LGTM!The devDependency updates for testing and development tooling (Vitest 4.0.7, TypeScript 5.9.3, ESLint 9.39.1, etc.) are consistent with the broader repository-wide dependency refresh.
Also applies to: 50-58
48-49: Verify SWC plugin compatibility after the upgrade.The @swc/core upgrade from 1.13.5 to 1.14.0 and @swc/wasm-web to 1.15.0 are straightforward dependency bumps. However, manual verification is needed since automated build/test execution is not available in this environment.
Ensure the following before merging:
- The compiled WASM plugin builds successfully and remains compatible with @swc/core 1.14.0
- All plugin tests pass with the updated @swc/core and @swc/wasm-web versions
- The plugin integrates correctly with rspack >= 1.6.0 as mentioned in README.md
packages/inspector-common/package.json (1)
46-58: Dependency updates are compatible with React 19.Verification of React 19 compatibility patterns completed successfully:
- No string refs detected
- No defaultProps usage found
- No legacy context patterns (contextTypes/getChildContext)
- No class components extending React.Component/PureComponent
Vitest 4.0.7 is a major version bump, and all other updates follow standard semver conventions. The changes are safe to merge.
website/package.json (1)
49-60: Minor/patch updates are well-coordinated within stable ecosystem versions.Docusaurus 3.9.2, React 19.2.0, and Tailwind CSS 4.1.17 are solid, production-ready releases. All React dependency versions (react, react-dom, @types/react) are consistently updated together, reducing the risk of version skew or type mismatches.
packages/next-inspector/package.json (1)
92-93: Align React peerDependency with devDependency version.Line 93 declares
"react": ">=19.1.1"in peerDependencies, but devDependencies (lines 76–77) use React 19.2.0. To maintain semver hygiene, peerDependencies should reflect the minimum tested version. If this package is tested and developed against React 19.2.0, consumers installing 19.1.1 may encounter untested code paths.Consider updating line 93 to
"react": ">=19.2.0"to match the devDependency version and Next.js 16 requirements.examples/example-rspack/package.json (1)
42-44: Verify rspack plugin compatibility with rspack 1.6.1 runtime versions.Lines 42–44 update
@rspack/cliand@rspack/coreto^1.6.1, but@rspack/plugin-react-refreshremains at^1.5.2. This version skew may cause compatibility issues if rspack 1.6.x includes breaking changes or API shifts. Plugins typically need to match the runtime version they target.Verify that rspack 1.5.2 plugin is confirmed compatible with 1.6.1 runtime, or update the plugin to
^1.6.xif available and compatible. Consider running end-to-end tests to confirm the build system works correctly.examples/example-nextjs/package.json (2)
33-33: Verify example code compatibility with Next.js 16.0.1 breaking changes.Next.js 16.0.1 is a major version upgrade from 15.x with significant breaking changes. Per the Next.js 15 documentation, the upgrade requires:
- Request APIs (
cookies(),headers(),params,searchParams,draftMode) are now async and must useawait- GET Route Handlers are no longer cached by default; must opt-in with
export dynamic = 'force-static'- Client Router Cache defaults to
staleTime = 0(no caching, vs. caching in v15)Ensure that
examples/example-nextjssource code has been updated to handle these breaking changes. If the example still uses synchronous Request API calls or assumes caching behavior from v15, it will fail at runtime.
46-48: Verify rspack plugin version compatibility with 1.6.1 runtime.Same issue as in
examples/example-rspack:@rspack/plugin-react-refreshis pinned to^1.5.2while@rspack/cliand@rspack/coreare^1.6.1(line 46–47). Confirm compatibility or align versions.package.json (1)
60-61: Verify commitlint v20 configuration compatibility.Commitlint is upgraded from v19 to v20 (major version bump). Major version upgrades often introduce breaking changes to configuration or CLI behavior. Ensure that any
.commitlintrc,commitlint.config.ts/js, or husky hooks are compatible with commitlint v20. If a config file exists but wasn't shown in this PR, verify its syntax and rules are v20-compatible.packages/inspector-babel-plugin/package.json (1)
60-61: Verify vitest v4 compatibility with test files.vitest is upgraded from v3 to v4 (major version bump). While vitest generally maintains good backward compatibility, v4 may introduce breaking changes to the test API, configuration, or behavior. Confirm that any test files using vitest (test-*.ts, *.test.ts, etc.) in this package remain compatible with vitest v4, or have been updated accordingly. If vitest config exists (vitest.config.ts), verify it is v4-compatible.
Also applies to: 68-68
Cargo.toml (3)
18-19: Serialize crate versions updated with preserved feature flags.The serde and serde_json updates (1.0.217→1.0.225 and 1.0.134→1.0.145) are minor version bumps and maintain the existing feature flag configuration (
default-features = falsewith targeted feature sets).
45-45: convert_case version bump is compatible.The convert_case update (0.8.0→0.9.0) is a minor version bump and poses minimal breaking-change risk.
24-45: Fix contradictory review tags and verify SWC compatibility manually before merging.The review's final tags are contradictory—it simultaneously approves and requests verification. The SWC ecosystem upgrade (swc 44.0.0, swc_core 46.0.3) is valid, with feature flags correctly preserved. However, verification cannot proceed in this sandbox due to cargo test limitations, and the CI pipeline does not run Rust tests.
Required manual verification:
- Locally run
cargo test --workspaceto confirm the build succeeds and all tests pass- Check for any SWC-related API breaking changes in the
crates/inspector-swc-plugin/crate (currently minimal usage reduces risk, but breaking changes should not be assumed)- Enable Rust tests in the CI workflow (currently commented out or missing) to prevent future regressions
The Cargo.toml syntax and feature flag preservation are correct. Feature flags are properly maintained across the pinned SWC ecosystem versions.
| "react": "^19.1.0", | ||
| "react-dom": "^19.1.1", | ||
| "rimraf": "^6.0.1", | ||
| "react-dom": "^19.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Align React and ReactDOM versions.
React (line 55) is pinned to ^19.1.0 while ReactDOM (line 56) is ^19.2.0. React and ReactDOM versions must match exactly (minor and patch level) to avoid hydration mismatches, type inconsistencies, and runtime errors. This is a blocker.
Update both to ^19.2.0:
- "react": "^19.1.0",
- "react-dom": "^19.2.0",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "react": "^19.1.0", | |
| "react-dom": "^19.1.1", | |
| "rimraf": "^6.0.1", | |
| "react-dom": "^19.2.0", | |
| "react": "^19.2.0", | |
| "react-dom": "^19.2.0", |
🤖 Prompt for AI Agents
In packages/inspector/package.json around lines 55-56, React is listed as
"^19.1.0" while ReactDOM is "^19.2.0" which must be identical; update the
"react" entry to "^19.2.0" so both packages match exactly, then regenerate your
lockfile (npm/yarn/pnpm install) to ensure the resolved versions are consistent
across the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/next-inspector/package.json (1)
91-93: Document peerDependency upgrade impact for consumers.The peerDependencies have been updated to
next: >=16.0.1andreact: >=19.2.0. Consuming projects must upgrade to Next.js 16+ to use this version of the package. Consider adding migration guidance in the CHANGELOG or README noting the Node.js 20.9.0+ requirement and any async API changes users need to handle.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
packages/inspector-component/package.json(1 hunks)packages/next-inspector/package.json(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/inspector-component/package.json
🔇 Additional comments (2)
packages/next-inspector/package.json (2)
16-41: No Next.js async API migration needed for this package or its consumers.This package does not import or use Next.js Request APIs (
from 'next/headers',from 'next/request', etc.), so the Next.js 16 async API breaking changes do not apply here. The package.json export changes are format-only (addingtypesfields, reorganizing import/require paths), not API breaking changes. Consumers of@hyperse/next-inspectorare not affected by Next.js 16 migration requirements based on these changes.Likely an incorrect or invalid review comment.
78-78: Rimraf 6.1.0 is compatible with the build script.The --no-glob flag is supported in rimraf 6.x, so the clean script (
rimraf --no-glob ./dist ./_release ./coverage ./tsconfig.tsbuildinfo) will work correctly with the updated version. The update is safe.
…talls; refactor plugin path definition in transformCode function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
crates/inspector-swc-plugin/package.json(1 hunks)crates/inspector-swc-plugin/tests/utils/transformCode.ts(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/inspector-swc-plugin/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). (1)
- GitHub Check: test (20.x)
🔇 Additional comments (1)
crates/inspector-swc-plugin/tests/utils/transformCode.ts (1)
13-18: Path resolution moved to function scope.The plugin path is now resolved on every call rather than once at module load. For a test utility, this is acceptable and makes the code more self-contained.
Summary by CodeRabbit
New Features
Documentation
Chores