You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Breaking changes and migration guide for Nuxt DevTools v4.'
4
+
---
5
+
6
+
## `startSubprocess()` API Changes
7
+
8
+
The subprocess system has been migrated from `execa` to `tinyexec`.
9
+
10
+
### `SubprocessOptions` no longer extends `ExecaOptions`
11
+
12
+
Previously, `SubprocessOptions` extended `ExecaOptions` from `execa`, allowing you to pass any execa option directly. It now has its own interface:
13
+
14
+
```ts
15
+
interfaceSubprocessOptions {
16
+
command:string
17
+
args?:string[]
18
+
cwd?:string
19
+
env?:Record<string, string|undefined>
20
+
nodeOptions?:SpawnOptions// from 'node:child_process'
21
+
}
22
+
```
23
+
24
+
Common fields like `cwd` and `env` are still available as top-level options. Other execa-specific options should be migrated to `nodeOptions` (Node.js `SpawnOptions`):
25
+
26
+
```diff
27
+
startSubprocess({
28
+
command: 'my-command',
29
+
args: ['--flag'],
30
+
cwd: '/some/path',
31
+
- stdio: 'pipe',
32
+
+ nodeOptions: {
33
+
+ stdio: 'pipe',
34
+
+ },
35
+
})
36
+
```
37
+
38
+
### `getProcess()` is deprecated
39
+
40
+
The return value of `startSubprocess()` now provides `getResult()` instead of `getProcess()`.
41
+
42
+
-`getProcess()` still works but logs a deprecation warning and returns `ChildProcess | undefined` (was `ExecaChildProcess<string>`)
43
+
-`getResult()` returns a tinyexec `Result` object with `.kill()`, `.process`, `.pipe()`, and more
0 commit comments