将 @nuxt/devtools-kit 从 3.x 升级到 4.x
根据 TypeScript 类型自动比较 @nuxt/devtools-kit 3.4.4 与 4.0.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 3 |
|---|---|
| 已删除的导出 | 0 |
| 已修改的签名 | 1 |
| 已删除的类或接口成员 | 0 |
| 已修改的类或接口成员 | 0 |
| 新增弃用 | 4 |
| 要求变化(engines、peer 依赖) | 3 |
| 新增导出 | 15 |
已删除的导入路径
| 已删除的导入路径 |
|---|
@nuxt/devtools-kit/types |
@nuxt/devtools-kit/host-client |
@nuxt/devtools-kit/iframe-client |
已删除的导出
未发现。
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
@nuxt/devtools-kit · startSubprocess | (execaOptions: SubprocessOptions, tabOptions: TerminalState, nuxt?: any): { getProcess: () => ExecaChildProcess<string>; terminate: () => void; restart: () => void; clear: () => void; } | (execaOptions: SubprocessOptions, tabOptions: TerminalState, nuxt?: any): StartSubprocessReturn |
已删除的类或接口成员
未发现。
已修改的类或接口成员
未发现。
新增弃用
| export | @deprecated |
|---|---|
@nuxt/devtools-kit · addCustomTab | Register a dock entry from the `devtools:ready` hook instead: `onDevtoolsReady((ctx) => ctx.docks.register(...))`. Still works as a shim, but emits the `NDT_DEP_0005` deprecation diagnostic. Note the docks host does not yet cover `vnode` views or tab categories. |
@nuxt/devtools-kit · extendServerRpc | Register RPC functions from the `devtools:ready` hook instead: `onDevtoolsReady((ctx) => ctx.rpc.register(defineRpcFunction(...)))`. Still works as a shim, but emits the `NDT_DEP_0003` deprecation diagnostic. |
@nuxt/devtools-kit · startSubprocess | Use the Vite DevTools terminals host from the `devtools:ready` hook instead: `onDevtoolsReady((ctx) => ctx.terminals.startChildProcess(...))`. Still works as a shim, but emits the `NDT_DEP_0004` deprecation diagnostic. |
@nuxt/devtools-kit · refreshCustomTabs | Update dock entries directly via the handle returned by `ctx.docks.register(...)` inside the `devtools:ready` hook. Still works as a shim, but emits the `NDT_DEP_0006` deprecation diagnostic. |
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
peerDependencies.nitro | — | * |
peerDependencies.@nuxt/kit | — | ^4.0.0-0 || ^5.0.0-0 |
peerDependencies.nitropack | — | ^2.0.0 |
新增导出 (15)
| import | export | kind |
|---|---|---|
@nuxt/devtools-kit | deprecate | function |
@nuxt/devtools-kit | diagnosticCodes | variable |
@nuxt/devtools-kit | onDevtoolsReady | function |
@nuxt/devtools-kit | DeprecateOptions | interface |
@nuxt/devtools-kit | DeprecationParams | interface |
@nuxt/devtools-kit | defineDiagnostics | variable |
@nuxt/devtools-kit | deprecateWithNuxt | function |
@nuxt/devtools-kit | NuxtDiagnosticCode | type |
@nuxt/devtools-kit | consoleDiagnostics | variable |
@nuxt/devtools-kit | diagnosticsDocsBase | function |
@nuxt/devtools-kit | StartSubprocessReturn | interface |
@nuxt/devtools-kit | createConsoleReporter | variable |
@nuxt/devtools-kit | NUXT_DEVTOOLS_GROUP_ID | variable |
@nuxt/devtools-kit | registerHostDiagnostics | function |
@nuxt/devtools-kit | defineStandaloneDiagnostics | function |
把这些数据交给你的 AI 智能体
Vigia 是免费的 MCP 服务器:你的编程智能体在写代码之前就能检查版本、不兼容变更和安全漏洞。无需注册,无需 API 密钥。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
添加到 Cursor添加到 VS Code★ 在 GitHub 上加星
任何其他 MCP 客户端
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }常见问题
将 @nuxt/devtools-kit 从 3 升级到 4 有哪些不兼容变更?
在 @nuxt/devtools-kit 3.4.4 与 4.0.0 之间,Vigia 发现 0 个已删除的导出、1 个已修改的签名,以及 0 个已删除或修改的类或接口成员。
@nuxt/devtools-kit 4 中弃用了哪些内容?
@nuxt/devtools-kit 4.0.0 中有 4 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/@nuxt/devtools-kit/upgrade?from=3.4.4&to=4.0.0