Skip to content

fix(init,module,upgrade): validate response from consola.prompt - #687

Merged
danielroe merged 1 commit into
mainfrom
fix/handle-prompt-cancel
Jan 17, 2025
Merged

fix(init,module,upgrade): validate response from consola.prompt#687
danielroe merged 1 commit into
mainfrom
fix/handle-prompt-cancel

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ 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

consola.prompt returns a Symbol when Ctrl-C is called - we can't trust the types on this one.

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Stats — create-nuxt-app 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
61.03 MB → 1.03 MB (+164 B)+0.02%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/commands/init.ts📈 +164 B (+3.16%)5.06 kB → 5.22 kB
View detailed bundle breakdown

Added

AssetFile Size% Changed
shared/create-nuxt-app.D06YzshY.mjs0 B → 896.2 kB (+896.2 kB)-

Removed

AssetFile Size% Changed
shared/create-nuxt-app.CVpZ5gnK.mjs896.04 kB → 0 B (-896.04 kB)-100%

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs1.01 kB0%
chunks/index.mjs70.29 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/prompt.mjs42.92 kB0%
chunks/satisfies.mjs43 kB0%

@github-actions

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
555.76 MB → 5.76 MB (+264 B)+0.00%
Changeset
FileΔSize
src/commands/init.ts📈 +164 B (+3.16%)5.07 kB → 5.23 kB
src/commands/module/add.ts📈 +91 B (+0.88%)10.05 kB → 10.14 kB
src/commands/upgrade.ts📈 +9 B (+0.15%)5.69 kB → 5.7 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/init.mjs805.33 kB → 805.49 kB (+164 B)+0.02%
chunks/add2.mjs11.89 kB → 11.98 kB (+91 B)+0.75%
chunks/upgrade.mjs5.69 kB → 5.7 kB (+9 B)+0.15%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs188 B0%
chunks/prompt.mjs46.07 kB0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs1.75 kB0%
chunks/dev.mjs9.58 kB0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/prompt2.mjs42.92 kB0%
chunks/satisfies.mjs116 B0%
chunks/main.mjs15.34 kB0%
chunks/index2.mjs909.09 kB0%
chunks/dev2.mjs69.1 kB0%
chunks/index3.mjs17.08 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs134.34 kB0%
chunks/index4.mjs1.24 kB0%
chunks/index5.mjs6.55 kB0%
chunks/index6.mjs70.29 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/search.mjs42.99 kB0%
chunks/index7.mjs5.87 kB0%
chunks/index8.mjs882.9 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
shared/nuxi.BBzqwRm3.mjs130.65 kB0%
shared/nuxi.AKza-snH.mjs804 B0%
shared/nuxi.DhZr7-yO.mjs294 B0%
shared/nuxi.DdI-vRyV.mjs1.54 kB0%
shared/nuxi.BSm0_9Hr.mjs107 B0%
shared/nuxi.jHNMu6i2.mjs1.34 kB0%
shared/nuxi.CeDCJTol.mjs18.95 kB0%
shared/nuxi.BxUBQFte.mjs17.68 kB0%
shared/nuxi.CG0IAtJF.mjs1.12 kB0%
shared/nuxi.D0__QBAb.mjs14.64 kB0%
shared/nuxi.DmrxZHCA.mjs8.04 kB0%
shared/nuxi.Cb8SV1Ml.mjs6.13 kB0%
shared/nuxi.SEuYCQjN.mjs2.02 MB0%
shared/nuxi.E-ZsRS8r.mjs943 B0%
shared/nuxi.BgENdoyd.mjs1.76 kB0%
shared/nuxi.0ipB_0_w.mjs152.13 kB0%
shared/nuxi.BCPAKoPr.mjs285.08 kB0%
shared/nuxi.ChFrgAY-.mjs5.71 kB0%
shared/nuxi.5bNOxngo.mjs5.09 kB0%
shared/nuxi.BPuj-7ta.mjs42.89 kB0%

@pkg-pr-new

Copy link
Copy Markdown

Open in Stackblitz

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

commit: 378757a

@github-actions

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
2977.34 kB → 77.6 kB (+262 B)+0.33%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/commands/init.ts📈 +162 B (+3.13%)5.05 kB → 5.21 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/module/add.ts📈 +91 B (+0.89%)10.04 kB → 10.13 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/upgrade.ts📈 +9 B (+0.15%)5.69 kB → 5.7 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/init.mjs5.05 kB → 5.21 kB (+162 B)+3.13%
chunks/add2.mjs11.7 kB → 11.79 kB (+91 B)+0.76%
chunks/upgrade.mjs5.69 kB → 5.7 kB (+9 B)+0.15%

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs200 B0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs1.76 kB0%
chunks/dev.mjs7 kB0%
chunks/devtools.mjs763 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/dev2.mjs7.26 kB0%
chunks/search.mjs2.94 kB0%
shared/cli.ZjQ19XGU.mjs5.48 kB0%
shared/cli.mEn9q49T.mjs804 B0%
shared/cli.BnJuNnzK.mjs294 B0%
shared/cli.BSm0_9Hr.mjs107 B0%
shared/cli.DlcAx0De.mjs1.04 kB0%
shared/cli.oZROxEeE.mjs1.23 kB0%
shared/cli.BXJN2WjZ.mjs1.12 kB0%
shared/cli.Bzv_ksqZ.mjs107 B0%
shared/cli.C935N1ss.mjs687 B0%

@danielroe
danielroe merged commit fd918e3 into mainJan 17, 2025
@danielroe
danielroe deleted the fix/handle-prompt-cancel branch January 17, 2025 21:45
@pi0

pi0 commented Jan 19, 2025

Copy link
Copy Markdown
Member

Not sure if aware of this: unjs/consola#325

@danielroe

Copy link
Copy Markdown
MemberAuthor

oh, nice! thank you ❤️

This was referenced Jan 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@danielroe@pi0