Skip to content

chore: h3-next to optional dependencies#1733

Merged
danielroe merged 1 commit into
nuxt:mainfrom
yamachi4416:chore-h3-next-to-optional-dependencies
Jul 14, 2026
Merged

chore: h3-next to optional dependencies#1733
danielroe merged 1 commit into
nuxt:mainfrom
yamachi4416:chore-h3-next-to-optional-dependencies

Conversation

@yamachi4416

@yamachi4416 yamachi4416 commented Jul 11, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #1711

📚 Description

Tested and reproduced. It took a few clean installs and cache clears, but I confirmed the behavior.
image

@socket-security

socket-security Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednuxt-nightly@​5.0.0-29718546.252d77ed8110010097100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Jul 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/test-utils@1733
npm i https://pkg.pr.new/vitest-environment-nuxt@1733

commit: bc552f8

@yamachi4416 yamachi4416 changed the title chore: h3-next to optional devendencies chore: h3-next to optional dependencies Jul 11, 2026
@yamachi4416 yamachi4416 force-pushed the chore-h3-next-to-optional-dependencies branch from e61d959 to bc552f8 Compare July 14, 2026 10:51
@yamachi4416 yamachi4416 marked this pull request as ready for review July 14, 2026 12:27
@yamachi4416 yamachi4416 requested a review from danielroe as a code owner July 14, 2026 12:27
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

package.json moves h3-next from dependencies to devDependencies, preserving the npm:h3@2.0.1-rc.22 specification. It also declares h3-next as an optional peer dependency with the range >=2.0.1-rc.22.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: making h3-next optional instead of a regular dependency.
Description check ✅ Passed The description is directly related to the h3-next dependency fix and linked issue.
Linked Issues check ✅ Passed The package manifest now adds h3-next as an optional peer dependency, which addresses the issue's requested fix.
Out of Scope Changes check ✅ Passed The change stays focused on h3-next dependency classification and does not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: private package registry requires authentication. Disable ESLint in CodeRabbit settings or use public packages.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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)
package.json (1)

142-142: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Constrain the peer range to h3 v2.

The runtime imports h3-next/generic, constructs H3, and calls h3App.fetch, so this is a v2-specific contract. >=2.0.1-rc.22 also admits future major versions that may be incompatible. Use >=2.0.1-rc.22 <3 or an equivalent v2-only range.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 142, Constrain the h3-next peer dependency range to v2
by adding an upper bound below version 3, while retaining the existing minimum
version 2.0.1-rc.22.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 167-169: Update the H3 v2 loading logic in
src/runtime/shared/h3-v2.ts to catch failures from the bare dynamic import of
optional h3-next and re-throw an error with a clear installation hint when the
package is missing. Preserve the existing behavior for successful imports and
unrelated import failures.

---

Nitpick comments:
In `@package.json`:
- Line 142: Constrain the h3-next peer dependency range to v2 by adding an upper
bound below version 3, while retaining the existing minimum version 2.0.1-rc.22.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6eecee8c-ecda-4a9e-8319-7b8e4eb6897e

📥 Commits

Reviewing files that changed from the base of the PR and between 3831454 and bc552f8.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

Comment thread package.json
@danielroe danielroe merged commit 44edbea into nuxt:main Jul 14, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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.

h3-next dependency causes Nitro to resolve h3@2 over h3@1 in Nuxt 4 projects

2 participants