Skip to content

Conversation

@tclxshunquan-wang
Copy link
Contributor

@tclxshunquan-wang tclxshunquan-wang commented Nov 7, 2025

Summary by CodeRabbit

  • New Features

    • Released v2.0.0.
  • Documentation

    • Added SWC compatibility guidance and expanded hotkeys with Windows/Linux mappings.
    • Minor example project docs/config clarifications.
  • Chores

    • Wide dependency and tooling upgrades across the repo (major SWC family, Next, React, TypeScript, build/test tooling).
    • Updated workspace package manager/toolchain and aligned dev tooling for improved compatibility and build reliability.

@coderabbitai
Copy link

coderabbitai bot commented Nov 7, 2025

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between ae484d4 and 4da7155.

📒 Files selected for processing (1)
  • crates/inspector-swc-plugin/tests/utils/transformCode.ts (1 hunks)

Walkthrough

Bumps 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

Cohort / File(s) Summary
Changeset & Release
\.changeset/shiny-gifts-raise.md``
Adds changelog entries announcing feat: publish v2.0.0 and a chore entry for broad dependency updates.
Rust workspace deps
\Cargo.toml``
Large version upgrades across swc-related crates, serde/serde_json, testing crates and adjusted feature flags (default-features toggles, parallel_rayon, etc.).
Root tooling & Yarn
\package.json`, `.yarnrc.yml``
Dev tooling bumps (changesets, commitlint, eslint, typescript, rimraf, lint-staged) and yarnPath updated to yarn-4.10.3.cjs.
Inspector & crates manifests
Inspector packages
\packages//package.json`, `crates//package.json`, `crates/inspector-swc-plugin/package.json``
Coordinated dependency/devDependency bumps across inspector packages (Vitest 3→4, ESLint, @types/*, React/react-dom to 19.2.0 in many places, peerConstraint updates, removal of a resolutions block in one manifest).
Examples — Next.js config & types
\examples/example-nextjs/next.config.ts`, `examples/example-nextjs/tsconfig.json`, `examples/example-nextjs/next-env.d.ts`, `examples/example-nextjs/.gitignore``
next.config.ts now uses type-only imports and explicit types (NextConfigPlugin[], NextConfig); tsconfig reformatted and JSX runtime changed to react-jsx; triple-slash refs removed from next-env.d.ts; next-env.d.ts added to .gitignore.
Examples — manifests (Next/rspack/webpack)
\examples/example-nextjs/package.json`, `examples/example-rspack/package.json`, `examples/example-webpack/package.json``
Version bumps for runtime and build deps (React 19.2.0, Next 16.x in Next example, Babel, rspack/webpack tooling, Tailwind/PostCSS, SWC tooling where present).
Website
\website/package.json``
Docusaurus/site deps bumped (Docusaurus, React, Tailwind); testing and tooling versions aligned.
Tests — SWC plugin utils
\crates/inspector-swc-plugin/tests/utils/transformCode.ts``
Moved pluginPath/pluginName initialization into transformCode() and added a .catch to log transform errors via console.error.

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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Files warranting extra attention:
    • Cargo.toml — broad swc ecosystem major-version upgrades and feature flags.
    • Example Next.js changes (next.config.ts, tsconfig.json) — ensure toolchain compatibility with react-jsx and explicit types.
    • Multiple package.jsons across packages/examples — peerDependency constraints (React/Next) and Vitest 3→4 migration implications.

Possibly related PRs

Poem

🐰 I hopped through manifests, line by line,

Swc and React in newer shine.
Types tucked in configs, tests catch a sneeze,
A v2 bell rings — I munch on keys. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: a comprehensive dependency update across the project. It clearly conveys the primary objective of improving compatibility and performance through dependency updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 48e7700 and e6d28cf.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • yarn.lock is 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.ts to .gitignore is 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.ts and .next/dev/types/**/*.ts to the include array is appropriate:

  • It aligns with the migration to TypeScript config file (next.config.ts)
  • The .next/dev/types/**/*.ts inclusion 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 plugins and nextConfig improves 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:

  1. The compiled WASM plugin builds successfully and remains compatible with @swc/core 1.14.0
  2. All plugin tests pass with the updated @swc/core and @swc/wasm-web versions
  3. 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/cli and @rspack/core to ^1.6.1, but @rspack/plugin-react-refresh remains 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.x if 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 use await
  • 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-nextjs source 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-refresh is pinned to ^1.5.2 while @rspack/cli and @rspack/core are ^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 = false with 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:

  1. Locally run cargo test --workspace to confirm the build succeeds and all tests pass
  2. 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)
  3. 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.

Comment on lines 55 to +56
"react": "^19.1.0",
"react-dom": "^19.1.1",
"rimraf": "^6.0.1",
"react-dom": "^19.2.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

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.

Suggested change
"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.

Copy link

@coderabbitai coderabbitai bot left a 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.1 and react: >=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

📥 Commits

Reviewing files that changed from the base of the PR and between e6d28cf and b9884e8.

⛔ Files ignored due to path filters (1)
  • yarn.lock is 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 (adding types fields, reorganizing import/require paths), not API breaking changes. Consumers of @hyperse/next-inspector are 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.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between fcef3e6 and ae484d4.

⛔ Files ignored due to path filters (1)
  • yarn.lock is 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.

@tianyingchun tianyingchun merged commit dbd7ec7 into hyperse-io:main Nov 7, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants