Module

Migration to v4

Breaking changes and migration guide for Nuxt DevTools v4.

startSubprocess() API Changes

The subprocess system has been migrated from execa to tinyexec.

SubprocessOptions no longer extends ExecaOptions

Previously, SubprocessOptions extended ExecaOptions from execa, allowing you to pass any execa option directly. It now has its own interface:

interface SubprocessOptions {
  command: string
  args?: string[]
  cwd?: string
  env?: Record<string, string | undefined>
  nodeOptions?: SpawnOptions // from 'node:child_process'
}

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):

startSubprocess({
  command: 'my-command',
  args: ['--flag'],
  cwd: '/some/path',
- stdio: 'pipe',
+ nodeOptions: {
+   stdio: 'pipe',
+ },
})

getProcess() is deprecated

The return value of startSubprocess() now provides getResult() instead of getProcess().

  • getProcess() still works but logs a deprecation warning and returns ChildProcess | undefined (was ExecaChildProcess<string>)
  • getResult() returns a tinyexec Result object with .kill(), .process, .pipe(), and more
const subprocess = startSubprocess(/* ... */)

- const proc = subprocess.getProcess()
- proc.stdout.on('data', handler)
+ const result = subprocess.getResult()
+ result.process?.stdout?.on('data', handler)