diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index 3a889c387721..2b230048ce24 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -4,6 +4,8 @@ import { fileURLToPath, pathToFileURL } from 'node:url'; import boxen from 'boxen'; import { diffWords } from 'diff'; import { bold, cyan, dim, green, magenta, red, yellow } from 'kleur/colors'; +import { type ASTNode, type ProxifiedModule, builders, generateCode, loadFile } from 'magicast'; +import { getDefaultExportOptions } from 'magicast/helpers'; import ora from 'ora'; import preferredPM from 'preferred-pm'; import prompts from 'prompts'; @@ -30,8 +32,6 @@ import { ensureProcessNodeEnv, parseNpmName } from '../../core/util.js'; import { eventCliSession, telemetry } from '../../events/index.js'; import { type Flags, createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js'; import { fetchPackageJson, fetchPackageVersions } from '../install-package.js'; -import { loadFile, generateCode, builders, type ASTNode, type ProxifiedModule } from 'magicast'; -import { getDefaultExportOptions } from 'magicast/helpers'; interface AddOptions { flags: Flags; @@ -673,7 +673,7 @@ async function tryToInstallIntegrations({ // reset NODE_ENV to ensure install command run in dev mode env: { NODE_ENV: undefined }, }, - } + }, ); spinner.succeed(); return UpdateResult.updated; diff --git a/packages/astro/src/cli/install-package.ts b/packages/astro/src/cli/install-package.ts index 46440b385fb9..d61a752dea49 100644 --- a/packages/astro/src/cli/install-package.ts +++ b/packages/astro/src/cli/install-package.ts @@ -144,7 +144,7 @@ async function installPackage( await exec( installCommand.pm, [installCommand.command, ...installCommand.flags, ...installCommand.dependencies], - { nodeOptions: { cwd: cwd } } + { nodeOptions: { cwd: cwd } }, ); spinner.succeed();