Skip to content

feat(v4)!: remove global install and wizard package#943

Merged
antfu merged 3 commits intomainfrom
antfu/remove-global-wizard
Mar 17, 2026
Merged

feat(v4)!: remove global install and wizard package#943
antfu merged 3 commits intomainfrom
antfu/remove-global-wizard

Conversation

@antfu
Copy link
Member

@antfu antfu commented Mar 17, 2026

Remove is-installed-globally dependency and global install detection logic. Remove @nuxt/devtools-wizard package entirely. Inline enablePages functionality directly as an RPC function in the general server module. This is a breaking change for v4 that simplifies the codebase by removing the wizard CLI tool and global install mode support.

🤖 Generated with Claude Code

@antfu antfu changed the title chore(v4): remove global install and wizard package feat(v4)!: remove global install and wizard package Mar 17, 2026
@antfu antfu added this to the v4 milestone Mar 17, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 17, 2026

Deploying nuxt-devtools with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4fa96c4
Status: ✅  Deploy successful!
Preview URL: https://98a05d39.nuxt-devtools.pages.dev
Branch Preview URL: https://antfu-remove-global-wizard.nuxt-devtools.pages.dev

View logs

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 198a6d37-d9c7-4572-99f9-6dd7ea7fa5f9

📥 Commits

Reviewing files that changed from the base of the PR and between 99abacd and 4fa96c4.

📒 Files selected for processing (2)
  • docs/content/1.guide/0.getting-started.md
  • docs/content/2.module/3.migration-v4.md

📝 Walkthrough

Walkthrough

This PR removes the @nuxt/devtools-wizard package and its CLI, deletes wizard-related types and RPC wiring, and eliminates global-install detection and related options. The wizard's enablePages behavior is reintroduced as a new server RPC implementation in packages/devtools/src/server-rpc/general.ts while standalone wizard modules (including enable-pages and wizard index) are deleted. Several type exports, package manifests, and dependency entries were removed across devtools-kit and devtools packages; module code paths referencing global install detection were cleaned up.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing global install support and the wizard package as a breaking change for v4.
Description check ✅ Passed The description is directly related to the changeset, detailing the removal of dependencies, packages, and the refactoring of enablePages functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch antfu/remove-global-wizard
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Remove is-installed-globally dependency and global install detection logic.
Remove @nuxt/devtools-wizard package entirely. Inline enablePages functionality
directly as an RPC function in the general server module instead of going through
the wizard system. This is a breaking change for v4 that simplifies the codebase
and removes the wizard CLI tool.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Contributor

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/devtools/src/server-rpc/general.ts`:
- Around line 245-248: The early return when existsSync(pathPageIndex) causes
the function (enablePages) to skip the subsequent patching of app.vue, so
NuxtPage isn't injected for projects that already have pages/index.vue; remove
or alter the short-circuit so that detecting an existing pages/index.vue only
skips creation of that file but does not return from the function, and ensure
the patching logic that updates pathAppVue (injecting <NuxtPage /> into app.vue)
always runs; apply the same change to the other similar block (the second
existsSync check) so both code paths perform app.vue patching even when pages
files already exist.
🪄 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: 76bdb25e-fea8-40ee-a456-6865ec53adbe

📥 Commits

Reviewing files that changed from the base of the PR and between 7bb59a1 and 99abacd.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (25)
  • docs/content/2.module/3.migration-v4.md
  • packages/devtools-kit/src/_types/index.ts
  • packages/devtools-kit/src/_types/integrations.ts
  • packages/devtools-kit/src/_types/options.ts
  • packages/devtools-kit/src/_types/rpc.ts
  • packages/devtools-kit/src/_types/server-ctx.ts
  • packages/devtools-kit/src/_types/wizard.ts
  • packages/devtools-wizard/build.config.ts
  • packages/devtools-wizard/cli.mjs
  • packages/devtools-wizard/package.json
  • packages/devtools-wizard/src/builtin.ts
  • packages/devtools-wizard/src/index.ts
  • packages/devtools/cli.mjs
  • packages/devtools/client/pages/modules/pages.vue
  • packages/devtools/package.json
  • packages/devtools/src/dirs.ts
  • packages/devtools/src/module-main.ts
  • packages/devtools/src/module.ts
  • packages/devtools/src/server-rpc/general.ts
  • packages/devtools/src/server-rpc/index.ts
  • packages/devtools/src/server-rpc/npm.ts
  • packages/devtools/src/server-rpc/wizard.ts
  • packages/devtools/src/wizard/enable-pages.ts
  • packages/devtools/src/wizard/index.ts
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (19)
  • packages/devtools/src/server-rpc/npm.ts
  • packages/devtools/cli.mjs
  • packages/devtools-wizard/build.config.ts
  • packages/devtools-wizard/src/index.ts
  • packages/devtools/src/wizard/enable-pages.ts
  • packages/devtools-kit/src/_types/integrations.ts
  • packages/devtools-kit/src/_types/wizard.ts
  • packages/devtools-wizard/package.json
  • pnpm-workspace.yaml
  • packages/devtools-kit/src/_types/server-ctx.ts
  • packages/devtools-wizard/cli.mjs
  • packages/devtools-wizard/src/builtin.ts
  • packages/devtools-kit/src/_types/index.ts
  • packages/devtools/src/dirs.ts
  • packages/devtools-kit/src/_types/options.ts
  • packages/devtools/src/wizard/index.ts
  • packages/devtools/src/server-rpc/wizard.ts
  • packages/devtools/package.json
  • packages/devtools/src/server-rpc/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/devtools/src/module-main.ts

Comment on lines +245 to +248
if (existsSync(pathPageIndex)) {
logger.warn('pages/index.vue already exists, skipping')
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don’t short-circuit enablePages before patching app.vue.

On Line 247, returning when pages/index.vue exists skips Lines 259-264, so app.vue never gets <NuxtPage /> injected. This can leave “Enable Routing” as a no-op for projects that already have pages/index.vue but still render NuxtWelcome.

💡 Proposed control-flow fix
-      if (existsSync(pathPageIndex)) {
-        logger.warn('pages/index.vue already exists, skipping')
-        return
-      }
-
-      const pagesIndexTemplate = `<script setup lang="ts">\nconst route = useRoute()\n</script>\n\n<template>\n  <div>\n    <h1>Nuxt Routing set up successfully!</h1>\n    <p>Current route: {{ route.path }}</p>\n    <a href="https://nuxt.com/docs/getting-started/routing" target="_blank">Learn more about Nuxt Routing</a>\n  </div>\n</template>\n`
-
-      await fs.mkdir(dirname(pathPageIndex), { recursive: true })
-      await fs.writeFile(pathPageIndex, pagesIndexTemplate, 'utf-8')
+      if (existsSync(pathPageIndex)) {
+        logger.warn('pages/index.vue already exists, skipping file creation')
+      }
+      else {
+        const pagesIndexTemplate = `<script setup lang="ts">\nconst route = useRoute()\n</script>\n\n<template>\n  <div>\n    <h1>Nuxt Routing set up successfully!</h1>\n    <p>Current route: {{ route.path }}</p>\n    <a href="https://nuxt.com/docs/getting-started/routing" target="_blank">Learn more about Nuxt Routing</a>\n  </div>\n</template>\n`
+        await fs.mkdir(dirname(pathPageIndex), { recursive: true })
+        await fs.writeFile(pathPageIndex, pagesIndexTemplate, 'utf-8')
+      }

Also applies to: 259-264

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools/src/server-rpc/general.ts` around lines 245 - 248, The
early return when existsSync(pathPageIndex) causes the function (enablePages) to
skip the subsequent patching of app.vue, so NuxtPage isn't injected for projects
that already have pages/index.vue; remove or alter the short-circuit so that
detecting an existing pages/index.vue only skips creation of that file but does
not return from the function, and ensure the patching logic that updates
pathAppVue (injecting <NuxtPage /> into app.vue) always runs; apply the same
change to the other similar block (the second existsSync check) so both code
paths perform app.vue patching even when pages files already exist.

@antfu antfu merged commit 34d136f into main Mar 17, 2026
3 of 4 checks passed
@antfu antfu deleted the antfu/remove-global-wizard branch March 17, 2026 04:32
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.

1 participant