Skip to content

fix(init): use amended directory when adding modules - #998

Merged
danielroe merged 3 commits into
nuxt:mainfrom
AaronDewes:patch-1
Aug 8, 2025
Merged

fix(init): use amended directory when adding modules#998
danielroe merged 3 commits into
nuxt:mainfrom
AaronDewes:patch-1

Conversation

@AaronDewes

Copy link
Copy Markdown
Contributor

🔗 Linked issue

I could not find one, let me know if I should open one.

❓ 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

Previously, when the user selected a directory that already existed, and was then prompted to choose a different directory, and then selected a different directory, and also chose official modules to add, the official modules would be added to the initial directory, not the newly chosen one.

Previously, when the user selected a directory that already existed, and was then prompted to choose a different directory, and then selected a different directory, and also chose official modules to add, the official modules would be added to the initial directory, not the newly chosen one.
@pkg-pr-new

pkg-pr-newBot commented Aug 8, 2025

Copy link
Copy Markdown

nuxt-cli-playground

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

commit: fc5a4f9

@codecov-commenter

codecov-commenter commented Aug 8, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@8cbbc93). Learn more about missing BASE report.

Files with missing linesPatch %Lines
packages/nuxi/src/commands/init.ts0.00%2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #998 +/- ##
=======================================
Coverage ? 27.30% =======================================
Files ? 74 Lines ? 3897 Branches ? 214 =======================================
Hits ? 1064 Misses ? 2804 Partials ? 29 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hqBot commented Aug 8, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #998 will not alter performance

Comparing AaronDewes:patch-1 (fc5a4f9) with main (8cbbc93)

Summary

✅ 2 untouched benchmarks

@github-actions

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 (-12 B)-0.00%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/commands/init.ts📉 -12 B (-0.12%)9.51 kB → 9.5 kB
View detailed bundle breakdown

Added

AssetFile Size% Changed
shared/create-nuxt.C4N2JsP3.mjs0 B → 2.02 MB (+2.02 MB)-
shared/create-nuxt.CLKQH2fI.mjs0 B → 1.17 MB (+1.17 MB)-
shared/create-nuxt.DfOMhCSS.mjs0 B → 964.65 kB (+964.65 kB)-
shared/create-nuxt.DnqEAdX9.mjs0 B → 108.11 kB (+108.11 kB)-
shared/create-nuxt.BP153W7V.mjs0 B → 18.91 kB (+18.91 kB)-
shared/create-nuxt.AxzQI3-E.mjs0 B → 16.04 kB (+16.04 kB)-
shared/create-nuxt._W_UUkuV.mjs0 B → 4.07 kB (+4.07 kB)-
shared/create-nuxt.D0_3ugfB.mjs0 B → 4.06 kB (+4.06 kB)-
shared/create-nuxt.Cn5S2HLp.mjs0 B → 3.9 kB (+3.9 kB)-
shared/create-nuxt.CAd7iHWV.mjs0 B → 945 B (+945 B)-
shared/create-nuxt.cXyeyPKg.mjs0 B → 836 B (+836 B)-
shared/create-nuxt.BDbfLsWe.mjs0 B → 792 B (+792 B)-
shared/create-nuxt.h_RedOiq.mjs0 B → 294 B (+294 B)-

Removed

AssetFile Size% Changed
shared/create-nuxt.itEZ1q1b.mjs2.02 MB → 0 B (-2.02 MB)-100%
shared/create-nuxt.CaH8T8Q0.mjs1.17 MB → 0 B (-1.17 MB)-100%
shared/create-nuxt.CSNx6Ocr.mjs964.66 kB → 0 B (-964.66 kB)-100%
shared/create-nuxt.ub6rT559.mjs108.11 kB → 0 B (-108.11 kB)-100%
shared/create-nuxt.CFYXatw2.mjs18.91 kB → 0 B (-18.91 kB)-100%
shared/create-nuxt.-kOLZXKY.mjs16.04 kB → 0 B (-16.04 kB)-100%
shared/create-nuxt.4lGltqvL.mjs4.07 kB → 0 B (-4.07 kB)-100%
shared/create-nuxt.CxtSTnVX.mjs4.06 kB → 0 B (-4.06 kB)-100%
shared/create-nuxt.qWO3MOXA.mjs3.9 kB → 0 B (-3.9 kB)-100%
shared/create-nuxt.C4s-lJIb.mjs945 B → 0 B (-945 B)-100%
shared/create-nuxt.CuuxBR2R.mjs836 B → 0 B (-836 B)-100%
shared/create-nuxt.grUsa0wf.mjs792 B → 0 B (-792 B)-100%
shared/create-nuxt.BR60yCR0.mjs294 B → 0 B (-294 B)-100%

Bigger

No assets were bigger

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/dev.mjs28.33 kB0%
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/index2.mjs197.34 kB0%
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.BSm0_9Hr.mjs107 B0%
shared/create-nuxt.BjhZEm2-.mjs1.75 kB0%
shared/create-nuxt.Vk1IrVtB.mjs26.96 kB0%
shared/create-nuxt.4t9faemh.mjs43.64 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
585.47 MB → 5.47 MB (-12 B)-0.00%
Changeset
FileΔSize
src/commands/init.ts📉 -12 B (-0.12%)9.51 kB → 9.5 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

AssetFile Size% Changed
chunks/init.mjs665.87 kB → 665.86 kB (-12 B)-0.00%

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/dev.mjs28.33 kB0%
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/satisfies.mjs116 B0%
chunks/main.mjs15.3 kB0%
chunks/prompt.mjs42.91 kB0%
chunks/index2.mjs197.34 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.HaPdOS2b.mjs19.33 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.OLusg-ws.mjs2.57 kB0%
shared/nuxi.DM113cjP.mjs916.37 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.CA-668L8.mjs16.04 kB0%
shared/nuxi.ChutbOY_.mjs25.34 kB0%
shared/nuxi.BAGoDD49.mjs1.05 kB0%
shared/nuxi.BoQ074Vk.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

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.99 kB → 94.97 kB (-12 B)-0.01%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/commands/init.ts📉 -12 B (-0.12%)9.48 kB → 9.47 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

AssetFile Size% Changed
chunks/init.mjs9.85 kB → 9.84 kB (-12 B)-0.12%

Unchanged

AssetFile Size% Changed
dev/index.mjs0 B0%
index.mjs236 B0%
chunks/index.mjs14.34 kB0%
chunks/analyze.mjs3.35 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs815 B0%
chunks/dev.mjs11.2 kB0%
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/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.D-5JezqI.mjs78 B0%
shared/cli.jA1DRKbi.mjs1.04 kB0%
shared/cli.DLBhTNQQ.mjs1.8 kB0%
shared/cli.IymQnHF9.mjs5.57 kB0%

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find!

@danielroedanielroe changed the title fix(init): Use correct directory for adding modulesfix(init): use amended directory when adding modulesAug 8, 2025
@danielroe
danielroe merged commit 8f6f9e8 into nuxt:mainAug 8, 2025
14 checks passed
This was referenced Aug 8, 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.

3 participants

@AaronDewes@codecov-commenter@danielroe