Skip to content

fix: use explicit imports in nitro v2 server runtime - #2347

Open
DamianGlowala wants to merge 1 commit into
mainfrom
fix/explicit-nitro-imports
Open

DamianGlowala wants to merge 1 commit into
mainfrom
fix/explicit-nitro-imports

Conversation

@DamianGlowala

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #2205

📚 Description

See nuxt/nuxt#34142 (comment) for context

@pkg-pr-new

pkg-pr-new Bot commented Oct 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@2347

commit: e987fd5

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying nuxt-image with  Cloudflare Pages  Cloudflare Pages

Latest commit: e987fd5
Status: ✅  Deploy successful!
Preview URL: https://fa8531f5.nuxt-image.pages.dev
Branch Preview URL: https://fix-explicit-nitro-imports.nuxt-image.pages.dev

View logs

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.62%. Comparing base (b52e088) to head (e987fd5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2347   +/-   ##
=======================================
  Coverage   32.62%   32.62%           
=======================================
  Files           9        9           
  Lines         377      377           
  Branches      133      133           
=======================================
  Hits          123      123           
  Misses        197      197           
  Partials       57       57           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 00b30d4c-908d-46a9-9210-3a2f755acae1

📥 Commits

Reviewing files that changed from the base of the PR and between b52e088 and e987fd5.


📒 Files selected for processing (3)
  • .nuxtrc
  • src/runtime/server/routes/_ipx.legacy.ts
  • src/runtime/server/utils/image.legacy.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.



📝 Walkthrough

Walkthrough

The change updates the configured @nuxt/test-utils version from 4.1.0 to 4.3.3. It also changes imports in two legacy server files: useRuntimeConfig comes from nitropack/runtime, and createError comes from h3.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Severity of issue fixed: Low


Merge Risk: ⚪ Minimal · up to e987f

The test utility pin and legacy runtime imports are consistent with the locked dependencies, with no concrete behavior regression established.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check Warning The .nuxtrc change upgrades @nuxt/test-utils from 4.1.0 to 4.3.3. The linked issue #2205 and the PR objective concern replacing #imports with explicit imports in the Nitro v2 server runtime.… Remove the unrelated .nuxtrc version change, or provide repository evidence that @nuxt/test-utils 4.3.3 is required to implement or validate issue #2205.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: replacing implicit imports with explicit imports in the Nitro v2 server runtime.
Description check Passed The description is related to the changeset because it links the resolving issue and provides context for the explicit import changes.
Linked Issues check Passed Issue #2205 requires explicit imports instead of #imports for Nuxt v5 compatibility. The PR replaces useRuntimeConfig with nitropack/runtime in src/runtime/server/routes/_ipx.legacy.ts. It rep…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…

Full details: Out of Scope Changes check

Explanation

The .nuxtrc change upgrades @nuxt/test-utils from 4.1.0 to 4.3.3. The linked issue #2205 and the PR objective concern replacing #imports with explicit imports in the Nitro v2 server runtime. The diff provides no connection between this dependency pin change and that objective. The import changes are in scope.


  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • 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.

❤️ Share

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

This branch has not been deployed

No deployments
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.

Missing #imports error with compatibilityVersion: 5

2 participants