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

(minor) pnpm create astro --ref next ⇒ Houston: v4.16.14 instead of v5.0.0-beta.10 #12506

Open
1 task
ppo opened this issue Nov 22, 2024 · 2 comments · May be fixed by #12529
Open
1 task

(minor) pnpm create astro --ref next ⇒ Houston: v4.16.14 instead of v5.0.0-beta.10 #12506

ppo opened this issue Nov 22, 2024 · 2 comments · May be fixed by #12529
Labels
- P2: nice to have Not breaking anything but nice to have (priority) pkg: create-astro Related to the `create-astro` package (scope)

Comments

@ppo
Copy link

ppo commented Nov 22, 2024

Astro Info

(not relevant)

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When executing pnpm create astro --ref next, the Houston animation mentions the wrong Astro version. It displays v4.16.14, while it actually installs 5.0.0-beta.10.

Houston:
Welcome to astro v4.16.14, Pascal!

What's the expected result?

Houston:
Welcome to astro v5.0.0-beta.10, Pascal!

Link to Minimal Reproducible Example

https://example.com/NOT-RELEVANT

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 22, 2024
@ppo ppo changed the title (minor) pnpm create astro --ref next ⇒ Houston: v4.16.14 (minor) pnpm create astro --ref next ⇒ Houston: v4.16.14 instead of v5.0.0-beta.10 Nov 22, 2024
@bluwy
Copy link
Member

bluwy commented Nov 22, 2024

I think this is working as expected, however it should be pnpm create astro@beta --ref next that prints the beta version, so it's installing the beta version of create-astro. But that doesn't seem to work so I'll mark this as a bug then.

We likely have to update here:

version: getVersion(packageManager, 'astro', process.env.ASTRO_VERSION),

export const getVersion = (packageManager: string, packageName: string, fallback = '') =>
new Promise<string>(async (resolve) => {
let registry = await getRegistry(packageManager);
const { version } = await fetch(`${registry}/${packageName}/latest`, {
redirect: 'follow',
})
.then((res) => res.json())
.catch(() => ({ version: fallback }));
return resolve(version);
});

So we're fetching the /beta tag instead of /latest during pnpm create astro@beta.

@bluwy bluwy added pkg: create-astro Related to the `create-astro` package (scope) - P2: nice to have Not breaking anything but nice to have (priority) and removed needs triage Issue needs to be triaged labels Nov 22, 2024
@ppo
Copy link
Author

ppo commented Nov 22, 2024

FYI, I found the command pnpm create astro --ref next in the guide Astro v5.0-beta.

apatel369 added a commit to apatel369/astro that referenced this issue Nov 26, 2024
apatel369 added a commit to apatel369/astro that referenced this issue Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) pkg: create-astro Related to the `create-astro` package (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants