0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

Fix getVersion calls

This commit is contained in:
Reuben Tier 2024-09-27 19:43:18 +01:00
parent 1094946f7f
commit 9d93da20cb
No known key found for this signature in database
GPG key ID: 08B0E5AC1EFCC6AB

View file

@ -16,6 +16,7 @@ type PickedTypeScriptContext = Pick<
| 'packageManager'
| 'install'
| 'tasks'
| 'ref'
>;
export async function typescript(ctx: PickedTypeScriptContext) {
@ -101,8 +102,8 @@ const FILES_TO_UPDATE = {
}
const [astroCheckVersion, typescriptVersion] = await Promise.all([
getVersion(options.ctx.packageManager, '@astrojs/check', process.env.ASTRO_CHECK_VERSION),
getVersion(options.ctx.packageManager, 'typescript', process.env.TYPESCRIPT_VERSION),
getVersion(options.ctx.packageManager, options.ctx.ref, '@astrojs/check', process.env.ASTRO_CHECK_VERSION),
getVersion(options.ctx.packageManager, options.ctx.ref, 'typescript', process.env.TYPESCRIPT_VERSION),
]);
parsedPackageJson.dependencies ??= {};
parsedPackageJson.dependencies['@astrojs/check'] = `^${astroCheckVersion}`;