Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove --watch from generate_types task #55748

Merged
merged 2 commits into from Sep 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 3 additions & 20 deletions packages/next/taskfile.js
Expand Up @@ -2602,26 +2602,9 @@ export async function build(task, opts) {
}

export async function generate_types(task, opts) {
// running this detached so that --watch doesn't hijack the other tasks watchers
const detached = !!opts.dev
const subprocess = await execa.command(
`pnpm run types${opts.dev ? ' --watch' : ''}`,
{
stdio: 'inherit',
detached,
}
)

if (detached) {
function cleanup() {
subprocess.kill('SIGTERM', { forceKillAfterTimeout: 2000 })
}

// since we're runnning in detached mode, make sure the subprocess is killed
process.on('SIGINT', cleanup)
process.on('SIGTERM', cleanup)
process.on('exit', cleanup)
}
await execa.command('pnpm run types', {
stdio: 'inherit',
huozhi marked this conversation as resolved.
Show resolved Hide resolved
})
}

export default async function (task) {
Expand Down