From 6d1c63fa46a624b1c4981d4324ebabf37cc2b958 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 11 Mar 2025 17:20:41 +0800 Subject: [PATCH] Use package-manager-detector (#13395) * Use package-manager-detector * Update variable name --- .changeset/pink-pugs-hide.md | 6 + packages/astro/package.json | 3 +- packages/astro/src/cli/add/index.ts | 134 ++++++------------ packages/astro/src/cli/install-package.ts | 79 +++-------- packages/astro/src/core/messages.ts | 12 +- .../create-astro/src/actions/dependencies.ts | 2 +- packages/upgrade/package.json | 2 +- packages/upgrade/src/actions/context.ts | 10 +- packages/upgrade/src/actions/install.ts | 37 +++-- packages/upgrade/src/messages.ts | 4 +- pnpm-lock.yaml | 71 ++-------- 11 files changed, 123 insertions(+), 237 deletions(-) create mode 100644 .changeset/pink-pugs-hide.md diff --git a/.changeset/pink-pugs-hide.md b/.changeset/pink-pugs-hide.md new file mode 100644 index 0000000000..a83bac5116 --- /dev/null +++ b/.changeset/pink-pugs-hide.md @@ -0,0 +1,6 @@ +--- +'@astrojs/upgrade': patch +'astro': patch +--- + +Uses `package-manager-detector` to detect the package manager used in the project diff --git a/packages/astro/package.json b/packages/astro/package.json index 9a13513f43..c9703f3702 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -155,8 +155,8 @@ "neotraverse": "^0.6.18", "p-limit": "^6.2.0", "p-queue": "^8.1.0", + "package-manager-detector": "^1.0.0", "picomatch": "^4.0.2", - "preferred-pm": "^4.1.1", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.1", @@ -170,7 +170,6 @@ "vfile": "^6.0.3", "vite": "^6.2.0", "vitefu": "^1.0.6", - "which-pm": "^3.0.1", "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "yocto-spinner": "^0.2.1", diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index d4a413c726..6c0c2392d3 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -6,7 +6,7 @@ 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 preferredPM from 'preferred-pm'; +import { detect, resolveCommand } from 'package-manager-detector'; import prompts from 'prompts'; import maxSatisfying from 'semver/ranges/max-satisfying.js'; import yoctoSpinner from 'yocto-spinner'; @@ -213,7 +213,7 @@ export async function add(names: string[], { flags }: AddOptions) { // we add an .npmrc to hoist them if ( integrations.find((integration) => integration.id === 'lit') && - (await preferredPM(fileURLToPath(root)))?.name === 'pnpm' + (await detect({ cwd: fileURLToPath(root) }))?.name === 'pnpm' ) { await setupIntegrationConfig({ root, @@ -599,41 +599,6 @@ async function updateAstroConfig({ } } -interface InstallCommand { - pm: string; - command: string; - flags: string[]; - dependencies: string[]; -} - -async function getInstallIntegrationsCommand({ - integrations, - logger, - cwd = process.cwd(), -}: { - integrations: IntegrationInfo[]; - logger: Logger; - cwd?: string; -}): Promise { - const pm = await preferredPM(cwd); - logger.debug('add', `package manager: ${JSON.stringify(pm)}`); - if (!pm) return null; - - const dependencies = await convertIntegrationsToInstallSpecifiers(integrations); - switch (pm.name) { - case 'npm': - return { pm: 'npm', command: 'install', flags: [], dependencies }; - case 'yarn': - return { pm: 'yarn', command: 'add', flags: [], dependencies }; - case 'pnpm': - return { pm: 'pnpm', command: 'add', flags: [], dependencies }; - case 'bun': - return { pm: 'bun', command: 'add', flags: [], dependencies }; - default: - return null; - } -} - async function convertIntegrationsToInstallSpecifiers( integrations: IntegrationInfo[], ): Promise { @@ -686,7 +651,14 @@ async function tryToInstallIntegrations({ flags: Flags; logger: Logger; }): Promise { - const installCommand = await getInstallIntegrationsCommand({ integrations, cwd, logger }); + const packageManager = await detect({ + cwd, + // Include the `install-metadata` strategy to have the package manager that's + // used for installation take precedence + strategies: ['install-metadata', 'lockfile', 'packageManager-field'], + }); + logger.debug('add', `package manager: "${packageManager?.name}"`); + if (!packageManager) return UpdateResult.none; const inheritedFlags = Object.entries(flags) .map(([flag]) => { @@ -699,57 +671,45 @@ async function tryToInstallIntegrations({ .filter(Boolean) .flat() as string[]; - if (installCommand === null) { - return UpdateResult.none; - } else { - const coloredOutput = `${bold(installCommand.pm)} ${installCommand.command}${[ - '', - ...installCommand.flags, - ...inheritedFlags, - ].join(' ')} ${cyan(installCommand.dependencies.join(' '))}`; - const message = `\n${boxen(coloredOutput, { - margin: 0.5, - padding: 0.5, - borderStyle: 'round', - })}\n`; - logger.info( - 'SKIP_FORMAT', - `\n ${magenta('Astro will run the following command:')}\n ${dim( - 'If you skip this step, you can always run it yourself later', - )}\n${message}`, - ); + const installCommand = resolveCommand(packageManager?.agent ?? 'npm', 'add', inheritedFlags); + if (!installCommand) return UpdateResult.none; - if (await askToContinue({ flags })) { - const spinner = yoctoSpinner({ text: 'Installing dependencies...' }).start(); - try { - await exec( - installCommand.pm, - [ - installCommand.command, - ...installCommand.flags, - ...inheritedFlags, - ...installCommand.dependencies, - ], - { - nodeOptions: { - cwd, - // reset NODE_ENV to ensure install command run in dev mode - env: { NODE_ENV: undefined }, - }, - }, - ); - spinner.success(); - return UpdateResult.updated; - } catch (err: any) { - spinner.error(); - logger.debug('add', 'Error installing dependencies', err); - // NOTE: `err.stdout` can be an empty string, so log the full error instead for a more helpful log - console.error('\n', err.stdout || err.message, '\n'); - return UpdateResult.failure; - } - } else { - return UpdateResult.cancelled; + const installSpecifiers = await convertIntegrationsToInstallSpecifiers(integrations); + + const coloredOutput = `${bold(installCommand.command)} ${installCommand.args.join(' ')} ${cyan(installSpecifiers.join(' '))}`; + const message = `\n${boxen(coloredOutput, { + margin: 0.5, + padding: 0.5, + borderStyle: 'round', + })}\n`; + logger.info( + 'SKIP_FORMAT', + `\n ${magenta('Astro will run the following command:')}\n ${dim( + 'If you skip this step, you can always run it yourself later', + )}\n${message}`, + ); + + if (await askToContinue({ flags })) { + const spinner = yoctoSpinner({ text: 'Installing dependencies...' }).start(); + try { + await exec(installCommand.command, [...installCommand.args, ...installSpecifiers], { + nodeOptions: { + cwd, + // reset NODE_ENV to ensure install command run in dev mode + env: { NODE_ENV: undefined }, + }, + }); + spinner.success(); + return UpdateResult.updated; + } catch (err: any) { + spinner.error(); + logger.debug('add', 'Error installing dependencies', err); + // NOTE: `err.stdout` can be an empty string, so log the full error instead for a more helpful log + console.error('\n', err.stdout || err.message, '\n'); + return UpdateResult.failure; } + } else { + return UpdateResult.cancelled; } } diff --git a/packages/astro/src/cli/install-package.ts b/packages/astro/src/cli/install-package.ts index 2b3dc80bd3..9ca665fb5f 100644 --- a/packages/astro/src/cli/install-package.ts +++ b/packages/astro/src/cli/install-package.ts @@ -2,9 +2,8 @@ import { createRequire } from 'node:module'; import boxen from 'boxen'; import ci from 'ci-info'; import { bold, cyan, dim, magenta } from 'kleur/colors'; -import preferredPM from 'preferred-pm'; +import { detect, resolveCommand } from 'package-manager-detector'; import prompts from 'prompts'; -import whichPm from 'which-pm'; import yoctoSpinner from 'yocto-spinner'; import type { Logger } from '../core/logger/core.js'; import { exec } from './exec.js'; @@ -56,62 +55,22 @@ export async function getPackage( } } -function getInstallCommand(packages: string[], packageManager: string) { - switch (packageManager) { - case 'npm': - return { pm: 'npm', command: 'install', flags: [], dependencies: packages }; - case 'yarn': - return { pm: 'yarn', command: 'add', flags: [], dependencies: packages }; - case 'pnpm': - return { pm: 'pnpm', command: 'add', flags: [], dependencies: packages }; - case 'bun': - return { pm: 'bun', command: 'add', flags: [], dependencies: packages }; - default: - return null; - } -} - -/** - * Get the command to execute and download a package (e.g. `npx`, `yarn dlx`, `pnpm dlx`, etc.) - * @param packageManager - Optional package manager to use. If not provided, Astro will attempt to detect the preferred package manager. - * @returns The command to execute and download a package - */ -export async function getExecCommand(packageManager?: string): Promise { - if (!packageManager) { - packageManager = (await preferredPM(process.cwd()))?.name ?? 'npm'; - } - - switch (packageManager) { - case 'npm': - return 'npx'; - case 'yarn': - return 'yarn dlx'; - case 'pnpm': - return 'pnpm dlx'; - case 'bun': - return 'bunx'; - default: - return 'npx'; - } -} - async function installPackage( packageNames: string[], options: GetPackageOptions, logger: Logger, ): Promise { const cwd = options.cwd ?? process.cwd(); - const packageManager = (await whichPm(cwd))?.name ?? 'npm'; - const installCommand = getInstallCommand(packageNames, packageManager); + const packageManager = await detect({ + cwd, + // Include the `install-metadata` strategy to have the package manager that's + // used for installation take precedence + strategies: ['install-metadata', 'lockfile', 'packageManager-field'], + }); + const installCommand = resolveCommand(packageManager?.agent ?? 'npm', 'add', []); + if (!installCommand) return false; - if (!installCommand) { - return false; - } - - const coloredOutput = `${bold(installCommand.pm)} ${installCommand.command}${[ - '', - ...installCommand.flags, - ].join(' ')} ${cyan(installCommand.dependencies.join(' '))}`; + const coloredOutput = `${bold(installCommand.command)} ${installCommand.args.join(' ')} ${cyan(packageNames.join(' '))}`; const message = `\n${boxen(coloredOutput, { margin: 0.5, padding: 0.5, @@ -141,17 +100,13 @@ async function installPackage( if (Boolean(response)) { const spinner = yoctoSpinner({ text: 'Installing dependencies...' }).start(); try { - await exec( - installCommand.pm, - [installCommand.command, ...installCommand.flags, ...installCommand.dependencies], - { - nodeOptions: { - cwd, - // reset NODE_ENV to ensure install command run in dev mode - env: { NODE_ENV: undefined }, - }, + await exec(installCommand.command, [...installCommand.args, ...packageNames], { + nodeOptions: { + cwd, + // reset NODE_ENV to ensure install command run in dev mode + env: { NODE_ENV: undefined }, }, - ); + }); spinner.success(); return true; @@ -207,7 +162,7 @@ let _registry: string; async function getRegistry(): Promise { if (_registry) return _registry; const fallback = 'https://registry.npmjs.org'; - const packageManager = (await preferredPM(process.cwd()))?.name || 'npm'; + const packageManager = (await detect())?.name || 'npm'; try { const { stdout } = await exec(packageManager, ['config', 'get', 'registry']); _registry = stdout.trim()?.replace(/\/$/, '') || fallback; diff --git a/packages/astro/src/core/messages.ts b/packages/astro/src/core/messages.ts index 66011febf6..ca2dcfae46 100644 --- a/packages/astro/src/core/messages.ts +++ b/packages/astro/src/core/messages.ts @@ -14,9 +14,9 @@ import { underline, yellow, } from 'kleur/colors'; +import { detect, resolveCommand } from 'package-manager-detector'; import type { ResolvedServerUrls } from 'vite'; import type { ZodError } from 'zod'; -import { getExecCommand } from '../cli/install-package.js'; import { getDocsForError, renderErrorMarkdown } from './errors/dev/utils.js'; import { AstroError, @@ -111,9 +111,13 @@ export function serverShortcuts({ key, label }: { key: string; label: string }): export async function newVersionAvailable({ latestVersion }: { latestVersion: string }) { const badge = bgYellow(black(` update `)); const headline = yellow(`▶ New version of Astro available: ${latestVersion}`); - const execCommand = await getExecCommand(); - - const details = ` Run ${cyan(`${execCommand} @astrojs/upgrade`)} to update`; + const packageManager = (await detect())?.agent ?? 'npm'; + const execCommand = resolveCommand(packageManager, 'execute', ['@astrojs/upgrade']); + // NOTE: Usually it's impossible for `execCommand` to be null as `package-manager-detector` should + // already match a valid package manager + const details = !execCommand + ? '' + : ` Run ${cyan(`${execCommand.command} ${execCommand.args.join(' ')}`)} to update`; return ['', `${badge} ${headline}`, details, ''].join('\n'); } diff --git a/packages/create-astro/src/actions/dependencies.ts b/packages/create-astro/src/actions/dependencies.ts index d4990a8fb8..6e6f4535d0 100644 --- a/packages/create-astro/src/actions/dependencies.ts +++ b/packages/create-astro/src/actions/dependencies.ts @@ -91,7 +91,7 @@ async function astroAdd({ async function install({ packageManager, cwd }: { packageManager: string; cwd: string }) { if (packageManager === 'yarn') await ensureYarnLock({ cwd }); - return shell(packageManager, ['install'], { cwd, timeout: 90_000, stdio: 'ignore' }); + return shell(packageManager, ['add'], { cwd, timeout: 90_000, stdio: 'ignore' }); } /** diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index f6a4644728..78cad6df98 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -30,7 +30,7 @@ "//b": "DEPENDENCIES IS FOR UNBUNDLED PACKAGES", "dependencies": { "@astrojs/cli-kit": "^0.4.1", - "preferred-pm": "^4.1.1", + "package-manager-detector": "^1.0.0", "semver": "^7.7.1", "terminal-link": "^3.0.0" }, diff --git a/packages/upgrade/src/actions/context.ts b/packages/upgrade/src/actions/context.ts index 2103a53277..1588eb5090 100644 --- a/packages/upgrade/src/actions/context.ts +++ b/packages/upgrade/src/actions/context.ts @@ -1,7 +1,7 @@ import { pathToFileURL } from 'node:url'; import { prompt } from '@astrojs/cli-kit'; import arg from 'arg'; -import detectPackageManager from 'preferred-pm'; +import { type DetectResult, detect } from 'package-manager-detector'; export interface Context { help: boolean; @@ -11,7 +11,7 @@ export interface Context { cwd: URL; stdin?: typeof process.stdin; stdout?: typeof process.stdout; - packageManager: string; + packageManager: DetectResult; packages: PackageInfo[]; exit(code: number): never; } @@ -38,7 +38,11 @@ export async function getContext(argv: string[]): Promise { { argv, permissive: true }, ); - const packageManager = (await detectPackageManager(process.cwd()))?.name ?? 'npm'; + const packageManager = (await detect({ + // Include the `install-metadata` strategy to have the package manager that's + // used for installation take precedence + strategies: ['install-metadata', 'lockfile', 'packageManager-field'], + })) ?? { agent: 'npm', name: 'npm' }; const { _: [version = 'latest'] = [], '--help': help = false, diff --git a/packages/upgrade/src/actions/install.ts b/packages/upgrade/src/actions/install.ts index ac62b15986..83f25833a9 100644 --- a/packages/upgrade/src/actions/install.ts +++ b/packages/upgrade/src/actions/install.ts @@ -5,6 +5,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { color, say } from '@astrojs/cli-kit'; import { random, sleep } from '@astrojs/cli-kit/utils'; +import { resolveCommand } from 'package-manager-detector'; import { banner, bye, @@ -121,21 +122,26 @@ async function runInstallCommand( devDependencies: PackageInfo[], ) { const cwd = fileURLToPath(ctx.cwd); - if (ctx.packageManager === 'yarn') await ensureYarnLock({ cwd }); + if (ctx.packageManager.name === 'yarn') await ensureYarnLock({ cwd }); - const installCmd = - ctx.packageManager === 'yarn' || ctx.packageManager === 'pnpm' ? 'add' : 'install'; + const installCommand = resolveCommand(ctx.packageManager.agent, 'add', []); + if (!installCommand) { + // NOTE: Usually it's impossible to reach here as `package-manager-detector` should + // already match a supported agent + error('error', `Unable to find install command for ${ctx.packageManager.name}.`); + return ctx.exit(1); + } await spinner({ - start: `Installing dependencies with ${ctx.packageManager}...`, + start: `Installing dependencies with ${ctx.packageManager.name}...`, end: `Installed dependencies!`, while: async () => { try { if (dependencies.length > 0) { await shell( - ctx.packageManager, + installCommand.command, [ - installCmd, + ...installCommand.args, ...dependencies.map( ({ name, targetVersion }) => `${name}@${targetVersion.replace(/^\^/, '')}`, ), @@ -145,10 +151,9 @@ async function runInstallCommand( } if (devDependencies.length > 0) { await shell( - ctx.packageManager, + installCommand.command, [ - installCmd, - '--save-dev', + ...installCommand.args, ...devDependencies.map( ({ name, targetVersion }) => `${name}@${targetVersion.replace(/^\^/, '')}`, ), @@ -157,15 +162,17 @@ async function runInstallCommand( ); } } catch { - const packages = [...dependencies, ...devDependencies] - .map(({ name, targetVersion }) => `${name}@${targetVersion}`) - .join(' '); + const manualInstallCommand = [ + installCommand.command, + ...installCommand.args, + ...[...dependencies, ...devDependencies].map( + ({ name, targetVersion }) => `${name}@${targetVersion}`, + ), + ].join(' '); newline(); error( 'error', - `Dependencies failed to install, please run the following command manually:\n${color.bold( - `${ctx.packageManager} ${installCmd} ${packages}`, - )}`, + `Dependencies failed to install, please run the following command manually:\n${color.bold(manualInstallCommand)}`, ); return ctx.exit(1); } diff --git a/packages/upgrade/src/messages.ts b/packages/upgrade/src/messages.ts index 032faa1ac9..fb70215eee 100644 --- a/packages/upgrade/src/messages.ts +++ b/packages/upgrade/src/messages.ts @@ -1,7 +1,7 @@ /* eslint no-console: 'off' */ import { color, label, spinner as load } from '@astrojs/cli-kit'; import { align } from '@astrojs/cli-kit/utils'; -import detectPackageManager from 'preferred-pm'; +import { detect } from 'package-manager-detector'; import terminalLink from 'terminal-link'; import type { PackageInfo } from './actions/context.js'; import { shell } from './shell.js'; @@ -14,7 +14,7 @@ let _registry: string; export async function getRegistry(): Promise { if (_registry) return _registry; const fallback = 'https://registry.npmjs.org'; - const packageManager = (await detectPackageManager(process.cwd()))?.name || 'npm'; + const packageManager = (await detect())?.name || 'npm'; try { const { stdout } = await shell(packageManager, ['config', 'get', 'registry']); _registry = stdout?.trim()?.replace(/\/$/, '') || fallback; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc836a5f28..a7e4d7fd2a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -571,12 +571,12 @@ importers: p-queue: specifier: ^8.1.0 version: 8.1.0 + package-manager-detector: + specifier: ^1.0.0 + version: 1.0.0 picomatch: specifier: ^4.0.2 version: 4.0.2 - preferred-pm: - specifier: ^4.1.1 - version: 4.1.1 prompts: specifier: ^2.4.2 version: 2.4.2 @@ -616,9 +616,6 @@ importers: vitefu: specifier: ^1.0.6 version: 1.0.6(vite@6.2.0(@types/node@22.13.1)(jiti@2.4.2)(lightningcss@1.29.1)(sass@1.85.1)(yaml@2.5.1)) - which-pm: - specifier: ^3.0.1 - version: 3.0.1 xxhash-wasm: specifier: ^1.1.0 version: 1.1.0 @@ -6235,9 +6232,9 @@ importers: '@astrojs/cli-kit': specifier: ^0.4.1 version: 0.4.1 - preferred-pm: - specifier: ^4.1.1 - version: 4.1.1 + package-manager-detector: + specifier: ^1.0.0 + version: 1.0.0 semver: specifier: ^7.7.1 version: 7.7.1 @@ -9618,10 +9615,6 @@ packages: resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} - find-up-simple@1.0.0: - resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} - engines: {node: '>=18'} - find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -9634,9 +9627,6 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -10263,10 +10253,6 @@ packages: lite-youtube-embed@0.3.3: resolution: {integrity: sha512-gFfVVnj6NRjxVfJKo3qoLtpi0v5mn3AcR4eKD45wrxQuxzveFJUb+7Cr6uV6n+DjO8X3p0UzPPquhGt0H/y+NA==} - load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} - locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} @@ -10888,6 +10874,9 @@ packages: package-manager-detector@0.2.11: resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==} + package-manager-detector@1.0.0: + resolution: {integrity: sha512-7elnH+9zMsRo7aS72w6MeRugTpdRvInmEB4Kmm9BVvPw/SLG8gXUGQ+4wF0Mys0RSWPz0B9nuBbDe8vFeA2sfg==} + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -11002,10 +10991,6 @@ packages: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -11228,10 +11213,6 @@ packages: preact@10.26.4: resolution: {integrity: sha512-KJhO7LBFTjP71d83trW+Ilnjbo+ySsaAgCfXOXUlmGzJ4ygYPWmysm77yg4emwfmoz3b22yvH5IsVFHbhUaH5w==} - preferred-pm@4.1.1: - resolution: {integrity: sha512-rU+ZAv1Ur9jAUZtGPebQVQPzdGhNzaEiQ7VL9+cjsAWPHFYOccNXPNiev1CCDSOg/2j7UujM7ojNhpkuILEVNQ==} - engines: {node: '>=18.12'} - prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -12609,10 +12590,6 @@ packages: resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==} engines: {node: '>=4'} - which-pm@3.0.1: - resolution: {integrity: sha512-v2JrMq0waAI4ju1xU5x3blsxBBMgdgZve580iYMN5frDaLGjbA24fok7wKCsya8KLVO19Ju4XDc5+zTZCJkQfg==} - engines: {node: '>=18.12'} - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -16168,8 +16145,6 @@ snapshots: transitivePeerDependencies: - supports-color - find-up-simple@1.0.0: {} - find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -16185,11 +16160,6 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 - find-yarn-workspace-root2@1.2.16: - dependencies: - micromatch: 4.0.8 - pkg-dir: 4.2.0 - flat-cache@4.0.1: dependencies: flatted: 3.3.1 @@ -16899,13 +16869,6 @@ snapshots: lite-youtube-embed@0.3.3: {} - load-yaml-file@0.2.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - locate-character@3.0.0: {} locate-path@5.0.0: @@ -17777,6 +17740,8 @@ snapshots: dependencies: quansync: 0.2.8 + package-manager-detector@1.0.0: {} + pako@1.0.11: {} parent-module@1.0.1: @@ -17874,10 +17839,6 @@ snapshots: pirates@4.0.6: {} - pkg-dir@4.2.0: - dependencies: - find-up: 4.1.0 - pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -18154,12 +18115,6 @@ snapshots: preact@10.26.4: {} - preferred-pm@4.1.1: - dependencies: - find-up-simple: 1.0.0 - find-yarn-workspace-root2: 1.2.16 - which-pm: 3.0.1 - prelude-ls@1.2.1: {} prettier-plugin-astro@0.14.1: @@ -19717,10 +19672,6 @@ snapshots: which-pm-runs@1.1.0: {} - which-pm@3.0.1: - dependencies: - load-yaml-file: 0.2.0 - which@2.0.2: dependencies: isexe: 2.0.0