Repository navigation
Allow tagged packages in Astro CLI commands - #2
Closed
edmundhung wants to merge 6 commits into
Closed
edmundhung wants to merge 6 commits into
edmundhung wants to merge 6 commits into
Conversation
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
edmundhung
force-pushed
the
edmundhung/astro-add-tagged-integrations
branch
from
October 2, 2026 13:12
cbf4c10 to
141a8d1
Compare
edmundhung
force-pushed
the
edmundhung/astro-add-tagged-integrations
branch
4 times, most recently
from
October 2, 2026 15:47
38bd3d9 to
f3e1175
Compare
…hs (withastro#18241) Co-authored-by: factory[bot] <factory[bot]@users.noreply.github.com>
Astro CLI commands rejected safe package tags before resolution because the shared assertion accepted names only. Validate optional tags and versions with the same strict character rules so both `astro add` and `create-astro --add` accept tagged packages without allowing shell syntax. ## cli.ts ### [+L42..L58] Validate both parts of a package specifier Package names and their optional selectors pass through the existing strict validator independently. Empty, repeated, or shell-bearing selectors remain invalid.
ematipico
force-pushed
the
edmundhung/astro-add-tagged-integrations
branch
from
October 5, 2026 12:26
f3e1175 to
7ea5ee7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to withastro#18206.
While working on that PR, I noticed the existing parsing for package names with tags and assumed
astro add @astrojs/cloudflare@betawould work. When I tested it after the release, I realized the validation added in withastro#15419 rejects the full specifier before that parsing logic runs.This updates the validation to accept an optional version or tag while continuing to reject invalid specifiers.