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

Update astro add to install stable peer dep #9398

Closed
wants to merge 1 commit into from
Closed

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Dec 11, 2023

Changes

With the added Svelte 5 (alpha) support for @astrojs/svelte, when users run astro add svelte, it will incorrectly install [email protected]:

  Astro will run the following command:
  If you skip this step, you can always run it yourself later

 ╭────────────────────────────────────────────────╮
 │ pnpm add @astrojs/svelte svelte@^5.0.0-next.1  │
 ╰────────────────────────────────────────────────╯

This PR fixes it by only installing the latest non-prerelease version:

  Astro will run the following command:
  If you skip this step, you can always run it yourself later

 ╭─────────────────────────────────────────╮
 │ pnpm add @astrojs/svelte svelte@^4.0.0  │
 ╰─────────────────────────────────────────╯

(Originally reported from the Svelte discord)

Testing

Tested running astro add svelte locally.

Docs

n/a. bug fix.

Copy link

changeset-bot bot commented Dec 11, 2023

🦋 Changeset detected

Latest commit: 6ae53fd

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Dec 11, 2023
@bluwy
Copy link
Member Author

bluwy commented Dec 11, 2023

Ugh I just realized #9387 also fixes this 😬

@bluwy bluwy closed this Dec 11, 2023
@bluwy bluwy deleted the astro-add-stable branch March 18, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant