@pnpm/installing.package-requester 1100.0.1 → 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/packageRequester.d.ts +1 -1
- package/lib/packageRequester.js +9 -15
- package/package.json +16 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Fetchers } from '@pnpm/fetching.fetcher-base';
|
|
2
2
|
import type { CustomFetcher } from '@pnpm/hooks.types';
|
|
3
|
-
import type
|
|
3
|
+
import { type ResolveFunction } from '@pnpm/resolving.resolver-base';
|
|
4
4
|
import type { Cafs } from '@pnpm/store.cafs-types';
|
|
5
5
|
import type { FetchPackageToStoreFunction, GetFilesIndexFilePath, RequestPackageFunction } from '@pnpm/store.controller-types';
|
|
6
6
|
export declare function createPackageRequester(opts: {
|
package/lib/packageRequester.js
CHANGED
|
@@ -7,6 +7,7 @@ import { PnpmError } from '@pnpm/error';
|
|
|
7
7
|
import { pickFetcher } from '@pnpm/fetching.pick-fetcher';
|
|
8
8
|
import gfs from '@pnpm/fs.graceful-fs';
|
|
9
9
|
import { logger } from '@pnpm/logger';
|
|
10
|
+
import { resolvePlatformSelector, selectPlatformVariant, } from '@pnpm/resolving.resolver-base';
|
|
10
11
|
import { normalizeBundledManifest, } from '@pnpm/store.cafs';
|
|
11
12
|
import { gitHostedStoreIndexKey, storeIndexKey } from '@pnpm/store.index';
|
|
12
13
|
import { calcMaxWorkers, readPkgFromCafs as _readPkgFromCafs, } from '@pnpm/worker';
|
|
@@ -249,24 +250,17 @@ function getFilesIndexFilePath(ctx, opts) {
|
|
|
249
250
|
return { filesIndexFile, target, resolution };
|
|
250
251
|
}
|
|
251
252
|
function findResolution(resolutionVariants, supportedArchitectures) {
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
if (!resolutionVariant) {
|
|
253
|
+
const selector = resolvePlatformSelector(supportedArchitectures, {
|
|
254
|
+
platform: process.platform,
|
|
255
|
+
arch: process.arch,
|
|
256
|
+
libc: getLibcFamilySync(),
|
|
257
|
+
});
|
|
258
|
+
const variant = selectPlatformVariant(resolutionVariants, selector);
|
|
259
|
+
if (!variant) {
|
|
260
260
|
const resolutionTargets = resolutionVariants.map((variant) => variant.targets);
|
|
261
261
|
throw new PnpmError('NO_RESOLUTION_MATCHED', `Cannot find a resolution variant for the current platform in these resolutions: ${JSON.stringify(resolutionTargets)}`);
|
|
262
262
|
}
|
|
263
|
-
return
|
|
264
|
-
}
|
|
265
|
-
function getOneIfNonCurrent(requirements) {
|
|
266
|
-
if (requirements?.length && requirements[0] !== 'current') {
|
|
267
|
-
return requirements[0];
|
|
268
|
-
}
|
|
269
|
-
return undefined;
|
|
263
|
+
return variant.resolution;
|
|
270
264
|
}
|
|
271
265
|
function fetchToStore(ctx, opts) {
|
|
272
266
|
if (!opts.pkg.name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.package-requester",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1101.0.0",
|
|
4
4
|
"description": "Concurrent downloader of npm-compatible packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"semver": "^7.7.2",
|
|
37
37
|
"ssri": "13.0.1",
|
|
38
38
|
"@pnpm/config.package-is-installable": "1100.0.1",
|
|
39
|
-
"@pnpm/deps.path": "1100.0.1",
|
|
40
|
-
"@pnpm/fetching.fetcher-base": "1100.0.1",
|
|
41
39
|
"@pnpm/core-loggers": "1100.0.1",
|
|
42
|
-
"@pnpm/
|
|
40
|
+
"@pnpm/deps.path": "1100.0.1",
|
|
43
41
|
"@pnpm/error": "1100.0.0",
|
|
44
|
-
"@pnpm/fetching.
|
|
45
|
-
"@pnpm/
|
|
46
|
-
"@pnpm/
|
|
47
|
-
"@pnpm/
|
|
48
|
-
"@pnpm/
|
|
42
|
+
"@pnpm/fetching.fetcher-base": "1100.1.0",
|
|
43
|
+
"@pnpm/fs.graceful-fs": "1100.0.0",
|
|
44
|
+
"@pnpm/fetching.pick-fetcher": "1100.0.3",
|
|
45
|
+
"@pnpm/hooks.types": "1100.0.3",
|
|
46
|
+
"@pnpm/resolving.resolver-base": "1100.1.0",
|
|
47
|
+
"@pnpm/store.cafs": "1100.1.0",
|
|
48
|
+
"@pnpm/store.controller-types": "1100.0.3",
|
|
49
49
|
"@pnpm/types": "1101.0.0",
|
|
50
|
-
"@pnpm/
|
|
50
|
+
"@pnpm/store.index": "1100.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0",
|
|
54
|
-
"@pnpm/worker": "^1100.0
|
|
54
|
+
"@pnpm/worker": "^1100.1.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@jest/globals": "30.3.0",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"delay": "^7.0.0",
|
|
64
64
|
"normalize-path": "^3.0.0",
|
|
65
65
|
"tempy": "3.0.0",
|
|
66
|
-
"@pnpm/installing.
|
|
67
|
-
"@pnpm/installing.
|
|
68
|
-
"@pnpm/logger": "1100.0.0",
|
|
66
|
+
"@pnpm/installing.package-requester": "1101.0.0",
|
|
67
|
+
"@pnpm/installing.client": "1100.0.4",
|
|
69
68
|
"@pnpm/store.cafs-types": "1100.0.0",
|
|
69
|
+
"@pnpm/store.create-cafs-store": "1100.0.3",
|
|
70
|
+
"@pnpm/logger": "1100.0.0",
|
|
70
71
|
"@pnpm/test-fixtures": "1100.0.0",
|
|
71
|
-
"@pnpm/testing.mock-agent": "1100.0.1"
|
|
72
|
-
"@pnpm/store.create-cafs-store": "1100.0.1"
|
|
72
|
+
"@pnpm/testing.mock-agent": "1100.0.1"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=22.13"
|