mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
[ci] format
This commit is contained in:
parent
1170877b51
commit
0251e4e6cf
1 changed files with 4 additions and 2 deletions
|
@ -2,8 +2,8 @@
|
||||||
import { color, label, say as houston, spinner as load } from '@astrojs/cli-kit';
|
import { color, label, say as houston, spinner as load } from '@astrojs/cli-kit';
|
||||||
import { align, sleep } from '@astrojs/cli-kit/utils';
|
import { align, sleep } from '@astrojs/cli-kit/utils';
|
||||||
import { execa } from 'execa';
|
import { execa } from 'execa';
|
||||||
import { exec } from 'node:child_process';
|
|
||||||
import fetch from 'node-fetch-native';
|
import fetch from 'node-fetch-native';
|
||||||
|
import { exec } from 'node:child_process';
|
||||||
import stripAnsi from 'strip-ansi';
|
import stripAnsi from 'strip-ansi';
|
||||||
import detectPackageManager from 'which-pm-runs';
|
import detectPackageManager from 'which-pm-runs';
|
||||||
|
|
||||||
|
@ -82,7 +82,9 @@ export const getVersion = () =>
|
||||||
new Promise<string>(async (resolve) => {
|
new Promise<string>(async (resolve) => {
|
||||||
if (v) return resolve(v);
|
if (v) return resolve(v);
|
||||||
let registry = await getRegistry();
|
let registry = await getRegistry();
|
||||||
const { version } = await fetch(`${registry}/astro/latest`, { redirect: 'follow' }).then(res => res.json());
|
const { version } = await fetch(`${registry}/astro/latest`, { redirect: 'follow' }).then(
|
||||||
|
(res) => res.json()
|
||||||
|
);
|
||||||
v = version;
|
v = version;
|
||||||
resolve(version);
|
resolve(version);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue