Skip to content

fix(dev): add exception handlers for initial restart - #975

Merged
danielroe merged 4 commits into
mainfrom
fix/exceptions
Jul 21, 2025
Merged

fix(dev): add exception handlers for initial restart#975
danielroe merged 4 commits into
mainfrom
fix/exceptions

Conversation

@danielroe

@danielroedanielroe commented Jul 20, 2025

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves#247
resolvesnuxt/nuxt#23832

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

When there is any unhandled error we wrongly terminate the process (when in fact we should only do so for child processes).

This also adds a handler to move into a fork when the first unhandled error occurs.

@danielroedanielroe self-assigned this Jul 20, 2025
@github-actions

github-actionsBot commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

Bundle Stats — nuxt-cli size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
3294.64 kB → 94.97 kB (+334 B)+0.34%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/dev/index.ts📈 +280 B (+7.56%)3.62 kB → 3.89 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev.ts📈 +54 B (+0.47%)11.14 kB → 11.2 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/index.mjs14.06 kB → 14.34 kB (+280 B)+1.94%
chunks/dev.mjs11.14 kB → 11.2 kB (+54 B)+0.47%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
dev/index.mjs0 B0%
index.mjs236 B0%
chunks/analyze.mjs3.35 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs815 B0%
chunks/devtools.mjs763 B0%
chunks/generate.mjs492 B0%
chunks/build.mjs2.04 kB0%
chunks/info.mjs4.44 kB0%
chunks/index2.mjs273 B0%
chunks/add.mjs10.17 kB0%
chunks/search.mjs2.96 kB0%
chunks/prepare.mjs1.04 kB0%
chunks/preview.mjs3.58 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs2.06 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/init.mjs9.85 kB0%
chunks/add2.mjs6.89 kB0%
shared/cli.B9AmABr3.mjs39 B0%
shared/cli.Dz2be-Ai.mjs792 B0%
shared/cli.BEUGgaW4.mjs294 B0%
shared/cli.BSm0_9Hr.mjs107 B0%
shared/cli.At9IMXtr.mjs1.23 kB0%
shared/cli.pLQ0oPGc.mjs836 B0%
shared/cli.qKvs7FJ2.mjs945 B0%
shared/cli.m0XYduCL.mjs78 B0%
shared/cli.jA1DRKbi.mjs1.04 kB0%
shared/cli.DSPslmtf.mjs1.8 kB0%
shared/cli.BpjxHQJH.mjs5.55 kB0%

@github-actions

github-actionsBot commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

Bundle Stats — nuxi size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
585.47 MB → 5.47 MB (+338 B)+0.01%
Changeset
FileΔSize
src/dev/index.ts📈 +284 B (+7.62%)3.64 kB → 3.92 kB
src/commands/dev.ts📈 +54 B (+0.47%)11.14 kB → 11.2 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/index2.mjs197.06 kB → 197.34 kB (+284 B)+0.14%
chunks/dev.mjs28.28 kB → 28.33 kB (+54 B)+0.19%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs247 B0%
dev/index.mjs925 B0%
chunks/add.mjs6.89 kB0%
chunks/analyze.mjs3.35 kB0%
chunks/build.mjs2.04 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs780 B0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs492 B0%
chunks/info.mjs4.43 kB0%
chunks/init.mjs665.87 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs1.04 kB0%
chunks/preview.mjs3.58 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs2.06 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/satisfies.mjs116 B0%
chunks/main.mjs15.3 kB0%
chunks/prompt.mjs42.91 kB0%
chunks/jiti.mjs305 B0%
chunks/index3.mjs71.97 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/add2.mjs12.08 kB0%
chunks/search.mjs45.85 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs145.67 kB0%
chunks/index4.mjs1.23 kB0%
chunks/index5.mjs5.85 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
chunks/index6.mjs904.05 kB0%
shared/nuxi.VcyqPfIV.mjs19.31 kB0%
shared/nuxi.DQjfoGl0.mjs57.22 kB0%
shared/nuxi.CTyTlDmo.mjs18.91 kB0%
shared/nuxi.BXGZ9qFF.mjs792 B0%
shared/nuxi.C_u-rG9b.mjs294 B0%
shared/nuxi.DUZ_WukQ.mjs2.57 kB0%
shared/nuxi.8mhVoXwa.mjs916.43 kB0%
shared/nuxi.D2_bzAv0.mjs1.54 kB0%
shared/nuxi.DQbQuzNE.mjs4.07 kB0%
shared/nuxi.BSm0_9Hr.mjs107 B0%
shared/nuxi.CrvQqJcE.mjs836 B0%
shared/nuxi.BiWTNJI4.mjs945 B0%
shared/nuxi.CbFGhqp3.mjs16.04 kB0%
shared/nuxi.ChutbOY_.mjs25.34 kB0%
shared/nuxi.BAGoDD49.mjs1.05 kB0%
shared/nuxi.B5t53vrk.mjs2.02 MB0%
shared/nuxi.BjhZEm2-.mjs1.75 kB0%
shared/nuxi.BEgIcxrx.mjs4.06 kB0%
shared/nuxi.DU9QXUOf.mjs26.96 kB0%
shared/nuxi.BzZJv2UC.mjs123.67 kB0%
shared/nuxi.QWnQy_ku.mjs5.75 kB0%
shared/nuxi.CbyJ5osS.mjs13.45 kB0%
shared/nuxi.BLb4POFS.mjs42.47 kB0%
shared/nuxi.Do0aYBCO.mjs5.46 kB0%
shared/nuxi.4t9faemh.mjs43.64 kB0%

@github-actions

github-actionsBot commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

Bundle Stats — create-nuxt size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
495.9 MB → 5.9 MB (+338 B)+0.01%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/dev/index.ts📈 +284 B (+7.62%)3.64 kB → 3.92 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev.ts📈 +54 B (+0.47%)11.14 kB → 11.2 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/index2.mjs197.06 kB → 197.34 kB (+284 B)+0.14%
chunks/dev.mjs28.28 kB → 28.33 kB (+54 B)+0.19%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs1.07 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
chunks/add.mjs6.89 kB0%
chunks/analyze.mjs3.35 kB0%
chunks/build.mjs2.04 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs811 B0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs492 B0%
chunks/info.mjs4.43 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs1.04 kB0%
chunks/preview.mjs3.58 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs2.06 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/prompt.mjs42.91 kB0%
chunks/satisfies.mjs116 B0%
chunks/jiti.mjs305 B0%
chunks/index3.mjs71.97 kB0%
chunks/add2.mjs12.08 kB0%
chunks/search.mjs45.85 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs145.67 kB0%
chunks/index4.mjs1.23 kB0%
chunks/index5.mjs5.85 kB0%
chunks/index6.mjs6.24 kB0%
chunks/index7.mjs50.51 kB0%
chunks/index8.mjs904.05 kB0%
shared/create-nuxt.hHQOUL0x.mjs964.65 kB0%
shared/create-nuxt.Dj3NvIPT.mjs792 B0%
shared/create-nuxt.B2-zdJXZ.mjs294 B0%
shared/create-nuxt.BE4xQR8P.mjs3.9 kB0%
shared/create-nuxt.BSm0_9Hr.mjs107 B0%
shared/create-nuxt.BkLyxswQ.mjs108.11 kB0%
shared/create-nuxt.BXnWJ_ud.mjs18.91 kB0%
shared/create-nuxt.CIWP3BDA.mjs1.17 MB0%
shared/create-nuxt.Ckr-odWx.mjs4.07 kB0%
shared/create-nuxt.D7QL7M0o.mjs836 B0%
shared/create-nuxt.D9_z3KrY.mjs945 B0%
shared/create-nuxt.KNOuxnBO.mjs16.04 kB0%
shared/create-nuxt.C6I8V8ju.mjs2.02 MB0%
shared/create-nuxt.BjhZEm2-.mjs1.75 kB0%
shared/create-nuxt.B_J93v3d.mjs4.06 kB0%
shared/create-nuxt.Vk1IrVtB.mjs26.96 kB0%
shared/create-nuxt.4t9faemh.mjs43.64 kB0%

@pkg-pr-new

pkg-pr-newBot commented Jul 20, 2025

Copy link
Copy Markdown

nuxt-cli-playground

npm i https://pkg.pr.new/create-nuxt@975
npm i https://pkg.pr.new/nuxi@975
npm i https://pkg.pr.new/@nuxt/cli@975

commit: b0d706d

@codspeed-hq

codspeed-hqBot commented Jul 20, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #975 will not alter performance

Comparing fix/exceptions (b0d706d) with main (3b9ccd6)

Summary

✅ 2 untouched benchmarks

@danielroe
danielroe marked this pull request as ready for review July 21, 2025 08:04
@danielroe
danielroe merged commit c1c3131 into mainJul 21, 2025
14 checks passed
@danielroe
danielroe deleted the fix/exceptions branch July 21, 2025 08:12
@github-actionsgithub-actionsBot mentioned this pull request Jul 21, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERROR [unhandledRejection] read ECONNRESET ERROR [unhandledRejection] read/write ECONNRESET

1 participant

@danielroe