mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 11:31:45 -04:00
* refactor: rename workspace.sort-packages and workspace.pkgs-graph - workspace.sort-packages -> workspace.projects-sorter - workspace.pkgs-graph -> workspace.projects-graph Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: rename packages/ to core/ and pkg-manifest.read-package-json to reader - Rename packages/ directory to core/ for clarity - Rename pkg-manifest/read-package-json to pkg-manifest/reader (@pnpm/pkg-manifest.reader) - Update all tsconfig, package.json, and lockfile references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: consolidate runtime resolvers under engine/runtime domain - Remove unused @pnpm/engine.runtime.node.fetcher package - Rename engine/runtime/node.resolver to node-resolver (dash convention) - Move resolving/bun-resolver to engine/runtime/bun-resolver - Move resolving/deno-resolver to engine/runtime/deno-resolver - Update all package names, tsconfig paths, and lockfile references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: update lockfile after removing node.fetcher Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: sort tsconfig references and package.json deps alphabetically Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: auto-fix import sorting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update __typings__ paths in tsconfig.lint.json for moved resolvers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove deno-resolver from deps of bun-resolver --------- 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',
|
|
})
|
|
})
|