@pnpm/resolving.local-resolver 1101.0.1 → 1101.1.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 +2 -1
- package/lib/index.js +11 -0
- package/package.json +5 -5
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DirectoryResolution, Resolution, ResolveResult, TarballResolution } from '@pnpm/resolving.resolver-base';
|
|
1
|
+
import type { DirectoryResolution, LatestInfo, LatestQuery, Resolution, ResolveResult, TarballResolution } from '@pnpm/resolving.resolver-base';
|
|
2
2
|
import type { DependencyManifest, PkgResolutionId } from '@pnpm/types';
|
|
3
3
|
import { type WantedLocalDependency } from './parseBareSpecifier.js';
|
|
4
4
|
export { type WantedLocalDependency };
|
|
@@ -31,3 +31,4 @@ export declare function resolveFromLocalScheme(ctx: LocalResolverContext, wanted
|
|
|
31
31
|
* should call {@link resolveFromLocalScheme} first.
|
|
32
32
|
*/
|
|
33
33
|
export declare function resolveFromLocalPath(ctx: LocalResolverContext, wantedDependency: WantedLocalDependency, opts: LocalResolverOptions): Promise<LocalResolveResult | null>;
|
|
34
|
+
export declare function resolveLatestFromLocal(query: LatestQuery): Promise<LatestInfo | undefined>;
|
package/lib/index.js
CHANGED
|
@@ -27,6 +27,17 @@ export async function resolveFromLocalPath(ctx, wantedDependency, opts) {
|
|
|
27
27
|
});
|
|
28
28
|
return resolveSpec(spec, opts);
|
|
29
29
|
}
|
|
30
|
+
// link:/file:/workspace: dependencies don't have a "latest" — claim them so
|
|
31
|
+
// the dispatcher stops here. Returning undefined would let downstream
|
|
32
|
+
// resolvers try; in particular, a user-configured named-registry alias
|
|
33
|
+
// called `link`, `file`, or `workspace` could otherwise hijack these.
|
|
34
|
+
export async function resolveLatestFromLocal(query) {
|
|
35
|
+
const spec = query.wantedDependency.bareSpecifier;
|
|
36
|
+
if (spec?.startsWith('link:') || spec?.startsWith('file:') || spec?.startsWith('workspace:')) {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
30
41
|
async function resolveSpec(spec, opts) {
|
|
31
42
|
if (spec == null)
|
|
32
43
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/resolving.local-resolver",
|
|
3
|
-
"version": "1101.0
|
|
3
|
+
"version": "1101.1.0",
|
|
4
4
|
"description": "Resolver for local packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"normalize-path": "^3.0.0",
|
|
30
30
|
"@pnpm/crypto.hash": "1100.0.1",
|
|
31
|
-
"@pnpm/types": "1101.1.0",
|
|
32
|
-
"@pnpm/resolving.resolver-base": "1100.1.3",
|
|
33
31
|
"@pnpm/error": "1100.0.0",
|
|
34
|
-
"@pnpm/
|
|
32
|
+
"@pnpm/resolving.resolver-base": "1100.3.0",
|
|
33
|
+
"@pnpm/types": "1101.1.1",
|
|
34
|
+
"@pnpm/workspace.project-manifest-reader": "1100.0.7"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@jest/globals": "30.3.0",
|
|
41
41
|
"@types/normalize-path": "^3.0.2",
|
|
42
42
|
"@pnpm/logger": "1100.0.0",
|
|
43
|
-
"@pnpm/resolving.local-resolver": "1101.0
|
|
43
|
+
"@pnpm/resolving.local-resolver": "1101.1.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=22.13"
|