mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 19:41:44 -04:00
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>
81 lines
1.9 KiB
TypeScript
81 lines
1.9 KiB
TypeScript
import { getNodeArtifactAddress } from '../lib/getNodeArtifactAddress.js'
|
|
|
|
test.each([
|
|
[
|
|
'16.0.0',
|
|
'https://nodejs.org/download/release/',
|
|
'win32',
|
|
'ia32',
|
|
{
|
|
basename: 'node-v16.0.0-win-x86',
|
|
dirname: 'https://nodejs.org/download/release/v16.0.0',
|
|
extname: '.zip',
|
|
},
|
|
],
|
|
[
|
|
'16.0.0',
|
|
'https://nodejs.org/download/release/',
|
|
'linux',
|
|
'arm',
|
|
{
|
|
basename: 'node-v16.0.0-linux-armv7l',
|
|
dirname: 'https://nodejs.org/download/release/v16.0.0',
|
|
extname: '.tar.gz',
|
|
},
|
|
],
|
|
[
|
|
'16.0.0',
|
|
'https://nodejs.org/download/release/',
|
|
'linux',
|
|
'x64',
|
|
{
|
|
basename: 'node-v16.0.0-linux-x64',
|
|
dirname: 'https://nodejs.org/download/release/v16.0.0',
|
|
extname: '.tar.gz',
|
|
},
|
|
],
|
|
[
|
|
'15.14.0',
|
|
'https://nodejs.org/download/release/',
|
|
'darwin',
|
|
'arm64',
|
|
{
|
|
basename: 'node-v15.14.0-darwin-x64',
|
|
dirname: 'https://nodejs.org/download/release/v15.14.0',
|
|
extname: '.tar.gz',
|
|
},
|
|
],
|
|
[
|
|
'16.0.0',
|
|
'https://nodejs.org/download/release/',
|
|
'darwin',
|
|
'arm64',
|
|
{
|
|
basename: 'node-v16.0.0-darwin-arm64',
|
|
dirname: 'https://nodejs.org/download/release/v16.0.0',
|
|
extname: '.tar.gz',
|
|
},
|
|
],
|
|
])('getNodeArtifactAddress', (version, nodeMirrorBaseUrl, platform, arch, tarball) => {
|
|
expect(getNodeArtifactAddress({
|
|
version,
|
|
baseUrl: nodeMirrorBaseUrl,
|
|
platform,
|
|
arch,
|
|
})).toStrictEqual(tarball)
|
|
})
|
|
|
|
test('getNodeArtifactAddress with libc=musl appends -musl suffix to arch', () => {
|
|
expect(getNodeArtifactAddress({
|
|
version: '22.0.0',
|
|
baseUrl: 'https://unofficial-builds.nodejs.org/download/release/',
|
|
platform: 'linux',
|
|
arch: 'x64',
|
|
libc: 'musl',
|
|
})).toStrictEqual({
|
|
basename: 'node-v22.0.0-linux-x64-musl',
|
|
dirname: 'https://unofficial-builds.nodejs.org/download/release/v22.0.0',
|
|
extname: '.tar.gz',
|
|
})
|
|
})
|