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

feat(init): add --nightly flag #650

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

DamianGlowala
Copy link
Member

@DamianGlowala DamianGlowala commented Jan 8, 2025

πŸ”— Linked issue

resolves #593

❓ 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

This adds a --nightly flag to init command, which allows scaffolding the project with the latest Nuxt version from the nightly release channel (rather than from stable).

@DamianGlowala DamianGlowala self-assigned this Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Bundle Stats

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 count Total bundle size % Changed
54 5.67 MB β†’ 5.67 MB (+2 kB) +0.03%
Changeset
File Ξ” Size
node_modules/confbox/dist/shared/confbox.9388d834.mjs πŸ“ˆ +1.1 kB (+259.82%) 433 B β†’ 1.52 kB
src/commands/init.ts πŸ“ˆ +712 B (+17.29%) 4.02 kB β†’ 4.72 kB
node_modules/pkg-types/dist/index.mjs πŸ“ˆ +99 B (+4.28%) 2.26 kB β†’ 2.36 kB
node_modules/confbox/dist/shared/confbox.f9f03f05.mjs πŸ“ˆ +117 B (+1.17%) 9.8 kB β†’ 9.92 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
shared/nuxi.BWhUMa5L.mjs 0 B β†’ 286.39 kB (+286.39 kB) -
shared/nuxi.BL7MoJjH.mjs 0 B β†’ 152.13 kB (+152.13 kB) -
shared/nuxi.DCrGLsH1.mjs 0 B β†’ 8.04 kB (+8.04 kB) -
shared/nuxi.CbLqDZV8.mjs 0 B β†’ 804 B (+804 B) -

Removed

Asset File Size % Changed
shared/nuxi.DfYkt6zx.mjs 285.08 kB β†’ 0 B (-285.08 kB) -100%
shared/nuxi.C2bb3PPD.mjs 152.13 kB β†’ 0 B (-152.13 kB) -100%
shared/nuxi.u_uB65ir.mjs 8.04 kB β†’ 0 B (-8.04 kB) -100%
shared/nuxi.CXkb2GZv.mjs 804 B β†’ 0 B (-804 B) -100%

Bigger

Asset File Size % Changed
chunks/init.mjs 804.28 kB β†’ 804.98 kB (+712 B) +0.09%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
index.mjs 188 B 0%
chunks/prompt.mjs 46.07 kB 0%
chunks/add.mjs 6.74 kB 0%
chunks/analyze.mjs 3.18 kB 0%
chunks/build.mjs 1.97 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 1.75 kB 0%
chunks/dev.mjs 9.58 kB 0%
chunks/devtools.mjs 736 B 0%
chunks/generate.mjs 388 B 0%
chunks/info.mjs 4.39 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 2.81 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.58 kB 0%
chunks/upgrade.mjs 5.69 kB 0%
chunks/satisfies.mjs 116 B 0%
chunks/main.mjs 15.34 kB 0%
chunks/index2.mjs 909.09 kB 0%
chunks/dev2.mjs 68.95 kB 0%
chunks/index3.mjs 17.11 kB 0%
chunks/xdg-open.mjs 25.32 kB 0%
chunks/node.mjs 134.34 kB 0%
chunks/index4.mjs 1.24 kB 0%
chunks/index5.mjs 6.55 kB 0%
chunks/index6.mjs 70.29 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/add2.mjs 10.6 kB 0%
chunks/search.mjs 42.99 kB 0%
chunks/index7.mjs 5.87 kB 0%
chunks/index8.mjs 882.9 kB 0%
chunks/multipart-parser2.mjs 4.58 kB 0%
shared/nuxi.BVSKcfmX.mjs 78.61 kB 0%
shared/nuxi.20htGcgr.mjs 294 B 0%
shared/nuxi.DdI-vRyV.mjs 1.54 kB 0%
shared/nuxi.BSm0_9Hr.mjs 107 B 0%
shared/nuxi.jHNMu6i2.mjs 1.34 kB 0%
shared/nuxi.D1V6iren.mjs 20.07 kB 0%
shared/nuxi.DzNwkU8w.mjs 17.69 kB 0%
shared/nuxi.DbLwAM-O.mjs 1.11 kB 0%
shared/nuxi.BgpyaHY1.mjs 14.64 kB 0%
shared/nuxi.SEuYCQjN.mjs 2.02 MB 0%
shared/nuxi.BHLUJ6h2.mjs 5.12 kB 0%
shared/nuxi.E-ZsRS8r.mjs 943 B 0%
shared/nuxi.BgENdoyd.mjs 1.76 kB 0%
shared/nuxi.ChFrgAY-.mjs 5.71 kB 0%
shared/nuxi.BZI8rqcO.mjs 6.13 kB 0%
shared/nuxi.BPuj-7ta.mjs 42.89 kB 0%

Copy link

pkg-pr-new bot commented Jan 8, 2025

Open in Stackblitz β€’ nuxt-cli-playground

npm i https://pkg.pr.new/nuxi@650

commit: fcba5ac

@@ -96,6 +100,22 @@ export default defineCommand({
process.exit(1)
}

if (ctx.args.nightly) {
const nightlyNuxtVersion = 'npm:nuxt-nightly@latest'
Copy link
Member

Choose a reason for hiding this comment

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

what about fetching the latest version from npm? latest is often poorly updated (i.e. not updated) by package managers

also, there are currently two nightly channels - the 3x and latest (4x) ones. would it be worth using --channel for this purpose, and maybe also --nightly which defaults to the latest 3x tag?

@DamianGlowala DamianGlowala marked this pull request as draft January 10, 2025 08:58
Sign up for free to 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.

[Feature Request] --channel support in nuxi init command
2 participants