Files
pnpm/pkg-manager/plugin-commands-installation/src/getFetchFullMetadata.ts
Brandon Cheng 01914345d5 build: enable @typescript-eslint/no-import-type-side-effects (#10630)
* build: enable `@typescript-eslint/no-import-type-side-effects`

* build: disable `@typescript-eslint/consistent-type-imports`

* chore: apply fixes for `no-import-type-side-effects`

pnpm exec eslint "**/src/**/*.ts" "**/test/**/*.ts" --fix
2026-03-08 00:02:48 +01:00

14 lines
595 B
TypeScript

import type { InstallCommandOptions } from './install.js'
export type GetFetchFullMetadataOptions = Pick<InstallCommandOptions, 'supportedArchitectures' | 'rootProjectManifest'>
/**
* This function is a workaround for the fact that npm registry's abbreviated metadata currently does not contain `libc`.
*
* See <https://github.com/pnpm/pnpm/issues/7362#issuecomment-1971964689>.
*/
export const getFetchFullMetadata = (opts: GetFetchFullMetadataOptions): true | undefined => (
opts.supportedArchitectures?.libc ??
opts.rootProjectManifest?.pnpm?.supportedArchitectures?.libc
) && true