@pnpm/default-resolver 14.0.10 → 15.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.js +5 -3
- package/lib/index.js.map +1 -1
- package/package.json +19 -17
package/lib/index.js
CHANGED
|
@@ -12,10 +12,12 @@ function createResolver(fetchFromRegistry, getCredentials, pnpmOpts) {
|
|
|
12
12
|
const resolveFromNpm = (0, npm_resolver_1.default)(fetchFromRegistry, getCredentials, pnpmOpts);
|
|
13
13
|
const resolveFromGit = (0, git_resolver_1.default)(pnpmOpts);
|
|
14
14
|
return async (wantedDependency, opts) => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const resolution = await resolveFromNpm(wantedDependency, opts) ??
|
|
16
|
+
(wantedDependency.pref && (await (0, tarball_resolver_1.default)(wantedDependency) ??
|
|
17
|
+
await resolveFromGit(wantedDependency) ??
|
|
18
|
+
await (0, local_resolver_1.default)(wantedDependency, opts)));
|
|
17
19
|
if (!resolution) {
|
|
18
|
-
throw new error_1.default('SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER', `${wantedDependency.alias ? wantedDependency.alias + '@' : ''}${
|
|
20
|
+
throw new error_1.default('SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER', `${wantedDependency.alias ? wantedDependency.alias + '@' : ''}${wantedDependency.pref ?? ''} isn't supported by any available resolver.`);
|
|
19
21
|
}
|
|
20
22
|
return resolution;
|
|
21
23
|
};
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAmC;AAEnC,sEAAqD;AACrD,0EAAmD;AACnD,sEAK2B;AAE3B,8EAAuD;AASvD,SAAwB,cAAc,CACpC,iBAAoC,EACpC,cAA8B,EAC9B,QAAgC;IAEhC,MAAM,cAAc,GAAG,IAAA,sBAAoB,EAAC,iBAAiB,EAAE,cAAc,E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olver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "pnpm's default package resolver",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"!*.map"
|
|
10
10
|
],
|
|
11
11
|
"engines": {
|
|
12
|
-
"node": ">=
|
|
12
|
+
"node": ">=14.19"
|
|
13
13
|
},
|
|
14
|
-
"repository": "https://github.com/pnpm/pnpm/blob/
|
|
14
|
+
"repository": "https://github.com/pnpm/pnpm/blob/main/packages/default-resolver",
|
|
15
15
|
"keywords": [
|
|
16
|
-
"
|
|
16
|
+
"pnpm7",
|
|
17
17
|
"pnpm",
|
|
18
18
|
"resolver",
|
|
19
19
|
"npm"
|
|
@@ -22,27 +22,29 @@
|
|
|
22
22
|
"bugs": {
|
|
23
23
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://github.com/pnpm/pnpm/blob/
|
|
25
|
+
"homepage": "https://github.com/pnpm/pnpm/blob/main/packages/default-resolver#readme",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@pnpm/error": "
|
|
28
|
-
"@pnpm/fetching-types": "
|
|
29
|
-
"@pnpm/git-resolver": "
|
|
30
|
-
"@pnpm/local-resolver": "
|
|
31
|
-
"@pnpm/npm-resolver": "
|
|
32
|
-
"@pnpm/resolver-base": "
|
|
33
|
-
"@pnpm/tarball-resolver": "
|
|
27
|
+
"@pnpm/error": "3.0.0",
|
|
28
|
+
"@pnpm/fetching-types": "3.0.0",
|
|
29
|
+
"@pnpm/git-resolver": "6.0.0",
|
|
30
|
+
"@pnpm/local-resolver": "8.0.0",
|
|
31
|
+
"@pnpm/npm-resolver": "13.0.0",
|
|
32
|
+
"@pnpm/resolver-base": "9.0.0",
|
|
33
|
+
"@pnpm/tarball-resolver": "6.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@pnpm/default-resolver": "
|
|
37
|
-
"@pnpm/fetch": "
|
|
36
|
+
"@pnpm/default-resolver": "15.0.0",
|
|
37
|
+
"@pnpm/fetch": "5.0.0",
|
|
38
38
|
"@pnpm/logger": "^4.0.0"
|
|
39
39
|
},
|
|
40
40
|
"funding": "https://opencollective.com/pnpm",
|
|
41
|
+
"exports": {
|
|
42
|
+
".": "./lib/index.js"
|
|
43
|
+
},
|
|
41
44
|
"scripts": {
|
|
42
45
|
"lint": "eslint src/**/*.ts test/**/*.ts",
|
|
43
46
|
"_test": "jest",
|
|
44
47
|
"test": "pnpm run compile && pnpm run _test",
|
|
45
|
-
"compile": "
|
|
46
|
-
}
|
|
47
|
-
"readme": "# @pnpm/default-resolver\n\n> pnpm's default package resolver\n\n<!--@shields('npm')-->\n[](https://www.npmjs.com/package/@pnpm/default-resolver)\n<!--/@-->\n\n## Installation\n\n```sh\npnpm add @pnpm/default-resolver\n```\n\n## License\n\nMIT\n"
|
|
48
|
+
"compile": "tsc --build && pnpm run lint --fix"
|
|
49
|
+
}
|
|
48
50
|
}
|