Files
pnpm/env/node.resolver/src/normalizeArch.ts
Zoltan Kochan d1edf732ad feat: support installing Deno runtime (#9791)
* 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
2025-07-30 11:27:07 +02:00

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
}