Skip to content

Conversation

@BobbieGoede
Copy link
Member

🔗 Linked issue

📚 Description

Ran into this confusing parameter type, it used to contain a deprecated property which was removed 3 years ago.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Oct 28, 2025

Walkthrough

Type changes were applied to imports-related APIs across the repo: usages of ImportPresetWithDeprecation were replaced with InlinePreset from unimport in Kit and Nuxt imports modules, and public hook typing for 'imports:sources' was updated to accept InlinePreset[]. A new deprecated ImportPresetWithDeprecation interface (extending InlinePreset) was added to maintain backwards compatibility. packages/schema/src/index.ts was split into two export lines (with an ESLint disable comment) without altering exported symbols. No runtime logic was changed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Changes are mostly homogeneous type substitutions but touch multiple packages and public API typings.
  • Verify the deprecated ImportPresetWithDeprecation JSDoc and its export consistency.
  • Confirm InlinePreset shape matches prior expectations where it replaces ImportPresetWithDeprecation.
  • Files to focus review on:
    • packages/kit/src/imports.ts
    • packages/nuxt/src/imports/module.ts
    • packages/schema/src/types/hooks.ts
    • packages/schema/src/index.ts

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed The pull request description is related to the changeset and provides meaningful context for the change. The author explains the motivation for the fix by noting that ImportPresetWithDeprecation is a confusing parameter type that previously contained a deprecated property which was removed three years ago. This rationale directly supports the changes shown in the summary, where the interface is being deprecated and usage is being migrated to InlinePreset. The description is not vague or generic, and it clearly conveys the reasoning behind the modification.
Title Check ✅ Passed The title "fix(kit,nuxt,schema): deprecate ImportPresetWithDeprecation" accurately and specifically describes the main objective of the pull request. The changeset consistently works towards deprecating the ImportPresetWithDeprecation interface across multiple packages by introducing a new deprecation annotation in the schema, replacing its usage with the preferred InlinePreset type from unimport, and updating public API signatures to use the new type. The title is concise, avoids vague language, and clearly conveys the primary change to someone reviewing the git history.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 28, 2025

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@33596

nuxt

npm i https://pkg.pr.new/nuxt@33596

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@33596

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@33596

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@33596

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@33596

commit: e3d7852

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 28, 2025

CodSpeed Performance Report

Merging #33596 will not alter performance

Comparing BobbieGoede:fix/deprecate-empty-import-preset-interface (e3d7852) with main (b688187)

Summary

✅ 10 untouched

@danielroe danielroe changed the title fix: deprecate empty ImportPresetWithDeprecation interface fix(kit,nuxt,schema): deprecate ImportPresetWithDeprecation Oct 28, 2025
@danielroe danielroe merged commit 986ec1a into nuxt:main Oct 28, 2025
99 of 101 checks passed
@github-actions github-actions bot mentioned this pull request Oct 28, 2025
@github-actions github-actions bot mentioned this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants