Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ for (const [DISTRIBUTION, pkg] of Object.entries(distributions)) {
}

// clean up
x('git', ['restore', 'package.json'])
x('git', ['restore', 'package.json'], {
nodeOptions: { stdio: 'inherit' },
throwOnError: true,
})
1 change: 1 addition & 0 deletions src/commands/devtools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default defineCommand({
'npx',
['@nuxt/devtools-wizard@latest', ctx.args.command, cwd],
{
throwOnError: true,
nodeOptions: {
stdio: 'inherit',
cwd,
Expand Down
5 changes: 4 additions & 1 deletion src/commands/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export default defineCommand({
logger.info(`Starting preview command: \`${nitroJSON.commands.preview}\``)
const [command, ...commandArgs] = nitroJSON.commands.preview.split(' ')
logger.log('')
await x(command, commandArgs, { nodeOptions: { stdio: 'inherit', cwd: outputPath } })
await x(command, commandArgs, {
throwOnError: true,
nodeOptions: { stdio: 'inherit', cwd: outputPath },
})
},
})
12 changes: 10 additions & 2 deletions src/commands/typecheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default defineCommand({
])
if (resolvedTypeScript && resolvedVueTsc) {
await x(fileURLToPath(resolvedVueTsc), ['--noEmit'], {
throwOnError: true,
nodeOptions: {
stdio: 'inherit',
cwd,
Expand All @@ -59,10 +60,14 @@ export default defineCommand({
await x(
'bun',
'install typescript vue-tsc --global --silent'.split(' '),
{ nodeOptions: { stdio: 'inherit', cwd } },
{
throwOnError: true,
nodeOptions: { stdio: 'inherit', cwd },
},
)

await x('bunx', 'vue-tsc --noEmit'.split(' '), {
throwOnError: true,
nodeOptions: {
stdio: 'inherit',
cwd,
Expand All @@ -73,7 +78,10 @@ export default defineCommand({
await x(
'npx',
'-p vue-tsc -p typescript vue-tsc --noEmit'.split(' '),
{ nodeOptions: { stdio: 'inherit', cwd } },
{
throwOnError: true,
nodeOptions: { stdio: 'inherit', cwd },
},
)
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/commands.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('commands', () => {
const file = join(fixtureDir, 'server/api/test.ts')
await rm(file, { force: true })
await x('nuxi', ['add', 'api', 'test'], {
throwOnError: true,
nodeOptions: { stdio: 'pipe', cwd: fixtureDir },
})
expect(existsSync(file)).toBeTruthy()
Expand All @@ -45,6 +46,7 @@ describe('commands', () => {
await rm(installPath, { recursive: true, force: true })
try {
await x('nuxi', ['init', installPath, `--packageManager=${pm}`, '--gitInit=false', '--preferOffline', '--install=false'], {
throwOnError: true,
nodeOptions: { stdio: 'inherit', cwd: fixtureDir },
})
const files = await readdir(installPath).catch(() => [])
Expand Down
Loading