Skip to content

Allow tagged packages in Astro CLI commands - #2

Closed
edmundhung wants to merge 6 commits into
mainfrom
edmundhung/astro-add-tagged-integrations
Closed

edmundhung wants to merge 6 commits into
mainfrom
edmundhung/astro-add-tagged-integrations

Conversation

@edmundhung

@edmundhung edmundhung commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

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@beta would 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.

renovate Bot and others added 2 commits October 2, 2026 10:56
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
@edmundhung
edmundhung force-pushed the edmundhung/astro-add-tagged-integrations branch from cbf4c10 to 141a8d1 Compare October 2, 2026 13:12
@edmundhung edmundhung changed the title Fix astro add for tagged integrations Allow tagged packages in Astro CLI commands Oct 2, 2026
@edmundhung
edmundhung force-pushed the edmundhung/astro-add-tagged-integrations branch 4 times, most recently from 38bd3d9 to f3e1175 Compare October 2, 2026 15:47
@edmundhung
edmundhung changed the base branch from next to main October 2, 2026 15:48
renovate Bot and others added 4 commits October 5, 2026 09:00
…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
ematipico force-pushed the edmundhung/astro-add-tagged-integrations branch from f3e1175 to 7ea5ee7 Compare October 5, 2026 12:26
@edmundhung edmundhung closed this Oct 5, 2026
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.

2 participants