Files
pnpm/engine/runtime/node.resolver/test/normalizeArch.test.ts
Zoltan Kochan f47ef4b125 refactor: reorganize monorepo domain structure (#10987)
Reorganize the monorepo's top-level domain directories for clarity:

- pkg-manager/ split into:
  - installing/ (core, headless, client, resolve-dependencies, etc.)
  - installing/linking/ (hoist, direct-dep-linker, modules-cleaner, etc.)
  - bins/ (link-bins, package-bins, remove-bins)
- completion/ merged into cli/
- dedupe/ moved to installing/dedupe/
- env/ renamed to engine/ with subdomains:
  - engine/runtime/ (node.fetcher, node.resolver, plugin-commands-env, etc.)
  - engine/pm/ (plugin-commands-setup, plugin-commands-self-updater)
- env.path moved to shell/
- tools/ and runtime/ dissolved
- reviewing/ and lockfile audit packages moved to deps/:
  - deps/inspection/ (list, outdated, dependencies-hierarchy)
  - deps/compliance/ (audit, licenses, sbom)
- registry/ moved to resolving/registry/
- semver/peer-range moved to deps/
- network/fetching-types moved to fetching/
- packages/ slimmed down, moving packages to proper domains:
  - calc-dep-state, dependency-path -> deps/
  - parse-wanted-dependency -> resolving/
  - git-utils -> network/
  - naming-cases -> text/
  - make-dedicated-lockfile -> lockfile/
  - render-peer-issues -> installing/
  - plugin-commands-doctor -> cli/
  - plugin-commands-init -> workspace/

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 13:45:54 +01:00

18 lines
598 B
TypeScript

import { getNormalizedArch } from '../lib/normalizeArch.js'
test.each([
['win32', 'ia32', 'x86'],
['linux', 'arm', 'armv7l'], // Raspberry Pi 4
['linux', 'x64', 'x64'],
])('getNormalizedArch(%s, %s)', (platform, arch, normalizedArch) => {
expect(getNormalizedArch(platform, arch)).toBe(normalizedArch)
})
// macos apple silicon
test.each([
['darwin', 'arm64', '14.20.0', 'x64'],
['darwin', 'arm64', '16.17.0', 'arm64'],
])('getNormalizedArch(%s, %s)', (platform, arch, nodeVersion, normalizedArch) => {
expect(getNormalizedArch(platform, arch, nodeVersion)).toBe(normalizedArch)
})