mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-03 23:11:49 -04:00
* feat: support installing Deno runtime * refactor: use npm registry to resolve deno version * feat: wip * feat: installing deno runtime * style: fix * test: fix * test: deno * test: fix * feat: deno * feat: deno * feat: create zip fetcher * style: fix * refactor: node fetch * feat: support a new binary fetcher * test: fix * feat: rename zip-fetcher to binary-fetcher * refactor: change naming * fix: windows * refactor: rename packages * refactor: deno resolver * refactor: runtime resolvers * refactor: binary fetcher * refactor: runtime resolvers * refactor: runtime resolvers * refactor: create SingleResolution * refactor: remove not needed change * refactor: package requester * docs: add changesets * refactor: use VariationsResolution and AtomicResolution * refactor: implement CR suggestions * docs: add changesets * fix: address comment in CR * feat: update formatting of pnpm-lock.yaml
16 lines
421 B
TypeScript
16 lines
421 B
TypeScript
export function getNormalizedArch (platform: string, arch: string, nodeVersion?: string): string {
|
|
if (nodeVersion) {
|
|
const nodeMajorVersion = +nodeVersion.split('.')[0]
|
|
if ((platform === 'darwin' && arch === 'arm64' && (nodeMajorVersion < 16))) {
|
|
return 'x64'
|
|
}
|
|
}
|
|
if (platform === 'win32' && arch === 'ia32') {
|
|
return 'x86'
|
|
}
|
|
if (arch === 'arm') {
|
|
return 'armv7l'
|
|
}
|
|
return arch
|
|
}
|