aboutsummaryrefslogtreecommitdiff
path: root/packages/create-astro/src/messages.ts
diff options
context:
space:
mode:
authorGravatar Florian Lefebvre <contact@florian-lefebvre.dev> 2024-01-24 23:20:47 +0100
committerGravatar GitHub <noreply@github.com> 2024-01-24 16:20:47 -0600
commitfecba30a1abb7ca65dfb8f506dde77117fa447d1 (patch)
tree4788143f59c18cb65765d8c9984fa5d3f070f6ba /packages/create-astro/src/messages.ts
parentedb5437058c00a2ed6f1119ace6a50c3a42c10f4 (diff)
downloadastro-fecba30a1abb7ca65dfb8f506dde77117fa447d1.tar.gz
astro-fecba30a1abb7ca65dfb8f506dde77117fa447d1.tar.zst
astro-fecba30a1abb7ca65dfb8f506dde77117fa447d1.zip
fix(create-astro): @astrojs/check and typescript addition (#9813)
* fix(create-astro): @astrojs/check and typescript addition * Update packages/create-astro/src/actions/typescript.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * Update packages/create-astro/src/messages.ts Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com> * fix: remove useless block --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'packages/create-astro/src/messages.ts')
-rw-r--r--packages/create-astro/src/messages.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/create-astro/src/messages.ts b/packages/create-astro/src/messages.ts
index e912e757d..c9006b292 100644
--- a/packages/create-astro/src/messages.ts
+++ b/packages/create-astro/src/messages.ts
@@ -55,11 +55,11 @@ export const getName = () =>
});
let v: string;
-export const getVersion = (packageManager: string) =>
+export const getVersion = (packageManager: string, packageName: string) =>
new Promise<string>(async (resolve) => {
if (v) return resolve(v);
let registry = await getRegistry(packageManager);
- const { version } = await fetch(`${registry}/astro/latest`, { redirect: 'follow' }).then(
+ const { version } = await fetch(`${registry}/${packageName}/latest`, { redirect: 'follow' }).then(
(res) => res.json(),
() => ({ version: '' })
);