@pnpm/engine.runtime.node-resolver 1100.0.3 → 1101.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -10
- package/package.json +6 -6
package/lib/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { parseNodeSpecifier } from './parseNodeSpecifier.js';
|
|
|
6
6
|
export { getNodeArtifactAddress, getNodeMirror, parseNodeSpecifier };
|
|
7
7
|
export declare const DEFAULT_NODE_MIRROR_BASE_URL = "https://nodejs.org/download/release/";
|
|
8
8
|
export declare const UNOFFICIAL_NODE_MIRROR_BASE_URL = "https://unofficial-builds.nodejs.org/download/release/";
|
|
9
|
+
export declare const NODE_EXTRAS_IGNORE_PATTERN = "^(?:(?:lib/)?node_modules/(?:npm|corepack)(?:/|$)|bin/(?:npm|npx|corepack)$|(?:npm|npx|corepack)(?:\\.(?:cmd|ps1))?$)";
|
|
9
10
|
export interface NodeRuntimeResolveResult extends ResolveResult {
|
|
10
11
|
resolution: VariationsResolution;
|
|
11
12
|
resolvedVia: 'nodejs.org';
|
package/lib/index.js
CHANGED
|
@@ -8,6 +8,11 @@ import { parseNodeSpecifier } from './parseNodeSpecifier.js';
|
|
|
8
8
|
export { getNodeArtifactAddress, getNodeMirror, parseNodeSpecifier };
|
|
9
9
|
export const DEFAULT_NODE_MIRROR_BASE_URL = 'https://nodejs.org/download/release/';
|
|
10
10
|
export const UNOFFICIAL_NODE_MIRROR_BASE_URL = 'https://unofficial-builds.nodejs.org/download/release/';
|
|
11
|
+
// Node.js archives ship with npm, npx, and corepack. pnpm manages package managers itself,
|
|
12
|
+
// so these are excluded from the runtime install — skipping ~2,800 files out of ~5,800 in the
|
|
13
|
+
// Node.js tarball. The pattern matches paths *after* the archive's top-level
|
|
14
|
+
// `node-vX.Y.Z-<platform>-<arch>/` prefix has been stripped.
|
|
15
|
+
export const NODE_EXTRAS_IGNORE_PATTERN = '^(?:(?:lib/)?node_modules/(?:npm|corepack)(?:/|$)|bin/(?:npm|npx|corepack)$|(?:npm|npx|corepack)(?:\\.(?:cmd|ps1))?$)';
|
|
11
16
|
export async function resolveNodeRuntime(ctx, wantedDependency, opts) {
|
|
12
17
|
if (wantedDependency.alias !== 'node' || !wantedDependency.bareSpecifier?.startsWith('runtime:'))
|
|
13
18
|
return null;
|
|
@@ -142,17 +147,9 @@ async function fetchAllVersions(fetch, nodeMirrorBaseUrl) {
|
|
|
142
147
|
}
|
|
143
148
|
function getNodeBinsForCurrentOS(platform = process.platform) {
|
|
144
149
|
if (platform === 'win32') {
|
|
145
|
-
return {
|
|
146
|
-
node: 'node.exe',
|
|
147
|
-
npm: 'node_modules/npm/bin/npm-cli.js',
|
|
148
|
-
npx: 'node_modules/npm/bin/npx-cli.js',
|
|
149
|
-
};
|
|
150
|
+
return { node: 'node.exe' };
|
|
150
151
|
}
|
|
151
|
-
return {
|
|
152
|
-
node: 'bin/node',
|
|
153
|
-
npm: 'lib/node_modules/npm/bin/npm-cli.js',
|
|
154
|
-
npx: 'lib/node_modules/npm/bin/npx-cli.js',
|
|
155
|
-
};
|
|
152
|
+
return { node: 'bin/node' };
|
|
156
153
|
}
|
|
157
154
|
function filterVersions(versions, versionSelector) {
|
|
158
155
|
if (versionSelector === 'lts') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/engine.runtime.node-resolver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1101.0.0",
|
|
4
4
|
"description": "Resolves a Node.js version specifier to an exact Node.js version",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"semver": "^7.7.2",
|
|
30
30
|
"version-selector-type": "^3.0.0",
|
|
31
|
-
"@pnpm/config.reader": "1101.1.
|
|
32
|
-
"@pnpm/error": "1100.0.0",
|
|
31
|
+
"@pnpm/config.reader": "1101.1.1",
|
|
33
32
|
"@pnpm/crypto.shasums-file": "1100.0.0",
|
|
34
|
-
"@pnpm/
|
|
33
|
+
"@pnpm/error": "1100.0.0",
|
|
34
|
+
"@pnpm/fetching.types": "1100.0.0",
|
|
35
35
|
"@pnpm/resolving.resolver-base": "1100.1.0",
|
|
36
|
-
"@pnpm/
|
|
36
|
+
"@pnpm/types": "1101.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/semver": "7.7.1",
|
|
40
|
-
"@pnpm/engine.runtime.node-resolver": "
|
|
40
|
+
"@pnpm/engine.runtime.node-resolver": "1101.0.0",
|
|
41
41
|
"@pnpm/network.fetch": "1100.0.1"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|