Skip to content

Commit 34d136f

Browse files
authored
feat(v4)!: remove global install and wizard package (#943)
1 parent ae68d3b commit 34d136f

27 files changed

Lines changed: 83 additions & 513 deletions

File tree

docs/content/1.guide/0.getting-started.md

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,22 @@
11
---
22
title: Getting Started
3-
description: Using Nuxt DevTools in your Nuxt project is only a command away.
3+
description: Nuxt DevTools is shipped with Nuxt. Enable it in your config to get started.
44
---
55

66
## Installation
77

8-
::callout
9-
Nuxt DevTools v2 requires **Nuxt v3.15.0 or higher**.
10-
::
11-
12-
### Auto Install
13-
14-
You just need to go to your `nuxt.config` file and set `devtools` to `true`:
8+
Nuxt DevTools is shipped with Nuxt. To enable it, set `devtools` to `true` in your `nuxt.config`:
159

1610
```ts [nuxt.config.ts]
1711
export default defineNuxtConfig({
1812
devtools: { enabled: true },
1913
})
2014
```
2115

22-
Nuxt will automatically install the DevTools module for you.
23-
24-
### Install using Nuxi
25-
26-
You can opt-in Nuxt DevTools per-project by going to the project root and run:
27-
28-
```bash
29-
npx nuxi@latest devtools enable
30-
```
31-
3216
### Open the DevTools Panel
3317

3418
Restart your Nuxt server and open your app in browser. Click the Nuxt icon on the bottom (or press <kbd>Shift</kbd> + <kbd>Alt</kbd> / <kbd>⇧ Shift</kbd> + <kbd>⌥ Option</kbd> + <kbd>D</kbd>) to toggle the DevTools.
3519

36-
::callout
37-
If you using `nvm` or other Node version managers, we suggest to run the enable command again after switching Node version.
38-
::
39-
40-
Similarly, you can disable it per-project by running:
41-
42-
```bash
43-
npx nuxi@latest devtools disable
44-
```
45-
46-
### Install Manually
47-
48-
Nuxt DevTools is currently provided as a module (might be changed in the future). If you prefer, you can also install it locally, which will be activated for all your team members.
49-
50-
```bash
51-
npm i -D @nuxt/devtools
52-
```
53-
54-
```ts [nuxt.config.ts]
55-
export default defineNuxtConfig({
56-
modules: [
57-
'@nuxt/devtools',
58-
],
59-
})
60-
```
61-
6220
### Nightly Release Channel
6321

6422
Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel), DevTools also offers a nightly release channel, that automatically releases for every commit to `main` branch.

docs/content/2.module/3.migration-v4.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,32 @@ const subprocess = startSubprocess(/* ... */)
5050
+ const result = subprocess.getResult()
5151
+ result.process?.stdout?.on('data', handler)
5252
```
53+
54+
## Global Install Support Removed
55+
56+
Nuxt DevTools no longer supports being installed globally.
57+
58+
- The `devtoolsGlobal` Nuxt config option (with `projects` whitelist) is no longer supported
59+
- The `-g` flag is no longer used when installing/uninstalling `@nuxt/devtools` via the DevTools UI
60+
- The `isGlobalInstall` property has been removed from `NuxtDevtoolsInfo`
61+
62+
## `@nuxt/devtools-wizard` Package and `nuxi devtools` Removed
63+
64+
The `@nuxt/devtools-wizard` package, its CLI, and the `nuxi devtools enable/disable` subcommand have been removed. DevTools is shipped with Nuxt — to enable or disable it, update your `nuxt.config.ts` directly:
65+
66+
```ts
67+
export default defineNuxtConfig({
68+
devtools: { enabled: true }, // or false
69+
})
70+
```
71+
72+
## `runWizard` RPC Removed
73+
74+
The `runWizard` server RPC function has been removed from `ServerFunctions`. The `enablePages` action is now available as a direct RPC function:
75+
76+
```diff
77+
- await rpc.runWizard(token, 'enablePages')
78+
+ await rpc.enablePages(token)
79+
```
80+
81+
The `WizardFunctions`, `WizardActions`, and `GetWizardArgs` types have been removed from `@nuxt/devtools-kit`.

packages/devtools-kit/src/_types/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ export * from './rpc'
1010
export * from './server-ctx'
1111
export * from './terminals'
1212
export * from './timeline-metrics'
13-
export * from './wizard'

packages/devtools-kit/src/_types/integrations.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export type NpmCommandType = 'install' | 'uninstall' | 'update'
3232

3333
export interface NpmCommandOptions {
3434
dev?: boolean
35-
global?: boolean
3635
}
3736

3837
export interface AutoImportsWithMetadata {

packages/devtools-kit/src/_types/options.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,6 @@ export interface ModuleOptions {
125125
telemetry?: boolean
126126
}
127127

128-
export interface ModuleGlobalOptions {
129-
/**
130-
* List of projects to enable devtools for. Only works when devtools is installed globally.
131-
*/
132-
projects?: string[]
133-
}
134-
135128
export interface VSCodeIntegrationOptions {
136129
/**
137130
* Enable VS Code Server integration

packages/devtools-kit/src/_types/rpc.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import type { AssetEntry, AssetInfo, AutoImportsWithMetadata, ComponentRelations
88
import type { ModuleOptions, NuxtDevToolsOptions } from './options'
99
import type { InstallModuleReturn, ServerDebugContext } from './server-ctx'
1010
import type { TerminalAction, TerminalInfo } from './terminals'
11-
import type { GetWizardArgs, WizardActions } from './wizard'
1211

1312
export interface ServerFunctions {
1413
// Static RPCs (can be provide on production build in the future)
@@ -67,7 +66,7 @@ export interface ServerFunctions {
6766
// Actions
6867
telemetryEvent: (payload: object, immediate?: boolean) => void
6968
customTabAction: (name: string, action: number) => Promise<boolean>
70-
runWizard: <T extends WizardActions>(token: string, name: T, ...args: GetWizardArgs<T>) => Promise<void>
69+
enablePages: (token: string) => Promise<void>
7170
openInEditor: (filepath: string) => Promise<boolean>
7271
restartNuxt: (token: string, hard?: boolean) => Promise<void>
7372
installNuxtModule: (token: string, name: string, dry?: boolean) => Promise<InstallModuleReturn>

packages/devtools-kit/src/_types/server-ctx.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export interface NuxtDevtoolsServerContext {
3333
export interface NuxtDevtoolsInfo {
3434
version: string
3535
packagePath: string
36-
isGlobalInstall: boolean
3736
}
3837

3938
export interface InstallModuleReturn {

packages/devtools-kit/src/_types/wizard.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/devtools-wizard/build.config.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/devtools-wizard/cli.mjs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)