@pnpm/catalogs.resolver 1000.0.4 → 1100.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/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
3
  Copyright (c) 2015-2016 Rico Sta. Cruz and other contributors
4
- Copyright (c) 2016-2025 Zoltan Kochan and other contributors
4
+ Copyright (c) 2016-2026 Zoltan Kochan and other contributors
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { resolveFromCatalog, type CatalogResolution, type CatalogResolutionFound, type CatalogResolutionMisconfiguration, type CatalogResolutionUnused as CatalogResolutionNotUsed, type CatalogResolutionResult, type CatalogResolver, type WantedDependency, } from './resolveFromCatalog';
2
- export { type CatalogResultMatcher, matchCatalogResolveResult } from './matchCatalogResolveResult';
1
+ export { type CatalogResultMatcher, matchCatalogResolveResult } from './matchCatalogResolveResult.js';
2
+ export { type CatalogResolution, type CatalogResolutionFound, type CatalogResolutionMisconfiguration, type CatalogResolutionUnused as CatalogResolutionNotUsed, type CatalogResolutionResult, type CatalogResolver, resolveFromCatalog, type WantedDependency, } from './resolveFromCatalog.js';
package/lib/index.js CHANGED
@@ -1,8 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchCatalogResolveResult = exports.resolveFromCatalog = void 0;
4
- var resolveFromCatalog_1 = require("./resolveFromCatalog");
5
- Object.defineProperty(exports, "resolveFromCatalog", { enumerable: true, get: function () { return resolveFromCatalog_1.resolveFromCatalog; } });
6
- var matchCatalogResolveResult_1 = require("./matchCatalogResolveResult");
7
- Object.defineProperty(exports, "matchCatalogResolveResult", { enumerable: true, get: function () { return matchCatalogResolveResult_1.matchCatalogResolveResult; } });
1
+ export { matchCatalogResolveResult } from './matchCatalogResolveResult.js';
2
+ export { resolveFromCatalog, } from './resolveFromCatalog.js';
8
3
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { type CatalogResolutionUnused, type CatalogResolutionResult, type CatalogResolutionFound, type CatalogResolutionMisconfiguration } from './resolveFromCatalog';
1
+ import type { CatalogResolutionFound, CatalogResolutionMisconfiguration, CatalogResolutionResult, CatalogResolutionUnused } from './resolveFromCatalog.js';
2
2
  export interface CatalogResultMatcher<T> {
3
3
  readonly found: (found: CatalogResolutionFound) => T;
4
4
  readonly misconfiguration: (misconfiguration: CatalogResolutionMisconfiguration) => T;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.matchCatalogResolveResult = matchCatalogResolveResult;
4
- function matchCatalogResolveResult(result, matcher) {
1
+ export function matchCatalogResolveResult(result, matcher) {
5
2
  switch (result.type) {
6
3
  case 'found': return matcher.found(result);
7
4
  case 'misconfiguration': return matcher.misconfiguration(result);
@@ -1,5 +1,5 @@
1
+ import type { Catalogs } from '@pnpm/catalogs.types';
1
2
  import { PnpmError } from '@pnpm/error';
2
- import { type Catalogs } from '@pnpm/catalogs.types';
3
3
  export interface WantedDependency {
4
4
  readonly bareSpecifier: string;
5
5
  readonly alias: string;
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveFromCatalog = resolveFromCatalog;
4
- const error_1 = require("@pnpm/error");
5
- const catalogs_protocol_parser_1 = require("@pnpm/catalogs.protocol-parser");
6
- function resolveFromCatalog(catalogs, wantedDependency) {
7
- const catalogName = (0, catalogs_protocol_parser_1.parseCatalogProtocol)(wantedDependency.bareSpecifier);
1
+ import { parseCatalogProtocol } from '@pnpm/catalogs.protocol-parser';
2
+ import { PnpmError } from '@pnpm/error';
3
+ export function resolveFromCatalog(catalogs, wantedDependency) {
4
+ const catalogName = parseCatalogProtocol(wantedDependency.bareSpecifier);
8
5
  if (catalogName == null) {
9
6
  return { type: 'unused' };
10
7
  }
@@ -13,14 +10,14 @@ function resolveFromCatalog(catalogs, wantedDependency) {
13
10
  return {
14
11
  type: 'misconfiguration',
15
12
  catalogName,
16
- error: new error_1.PnpmError('CATALOG_ENTRY_NOT_FOUND_FOR_SPEC', `No catalog entry '${wantedDependency.alias}' was found for catalog '${catalogName}'.`),
13
+ error: new PnpmError('CATALOG_ENTRY_NOT_FOUND_FOR_SPEC', `No catalog entry '${wantedDependency.alias}' was found for catalog '${catalogName}'.`),
17
14
  };
18
15
  }
19
- if ((0, catalogs_protocol_parser_1.parseCatalogProtocol)(catalogLookup) != null) {
16
+ if (parseCatalogProtocol(catalogLookup) != null) {
20
17
  return {
21
18
  type: 'misconfiguration',
22
19
  catalogName,
23
- error: new error_1.PnpmError('CATALOG_ENTRY_INVALID_RECURSIVE_DEFINITION', `Found invalid catalog entry using the catalog protocol recursively. The entry for '${wantedDependency.alias}' in catalog '${catalogName}' is invalid.`),
20
+ error: new PnpmError('CATALOG_ENTRY_INVALID_RECURSIVE_DEFINITION', `Found invalid catalog entry using the catalog protocol recursively. The entry for '${wantedDependency.alias}' in catalog '${catalogName}' is invalid.`),
24
21
  };
25
22
  }
26
23
  // Ban catalog entries that use the workspace protocol for a few reasons:
@@ -35,7 +32,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
35
32
  return {
36
33
  type: 'misconfiguration',
37
34
  catalogName,
38
- error: new error_1.PnpmError('CATALOG_ENTRY_INVALID_WORKSPACE_SPEC', `The workspace protocol cannot be used as a catalog value. The entry for '${wantedDependency.alias}' in catalog '${catalogName}' is invalid.`),
35
+ error: new PnpmError('CATALOG_ENTRY_INVALID_WORKSPACE_SPEC', `The workspace protocol cannot be used as a catalog value. The entry for '${wantedDependency.alias}' in catalog '${catalogName}' is invalid.`),
39
36
  };
40
37
  }
41
38
  // A future version of pnpm will try to support this. These protocols aren't
@@ -46,7 +43,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
46
43
  return {
47
44
  type: 'misconfiguration',
48
45
  catalogName,
49
- error: new error_1.PnpmError('CATALOG_ENTRY_INVALID_SPEC', `The entry for '${wantedDependency.alias}' in catalog '${catalogName}' declares a dependency using the '${protocolOfLookup}' protocol. This is not yet supported, but may be in a future version of pnpm.`),
46
+ error: new PnpmError('CATALOG_ENTRY_INVALID_SPEC', `The entry for '${wantedDependency.alias}' in catalog '${catalogName}' declares a dependency using the '${protocolOfLookup}' protocol. This is not yet supported, but may be in a future version of pnpm.`),
50
47
  };
51
48
  }
52
49
  return {
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@pnpm/catalogs.resolver",
3
- "version": "1000.0.4",
3
+ "version": "1100.0.0",
4
4
  "description": "Dereferences catalog protocol specifiers into usable specifiers.",
5
5
  "keywords": [
6
6
  "pnpm",
7
- "pnpm10",
7
+ "pnpm11",
8
8
  "types"
9
9
  ],
10
10
  "license": "MIT",
11
11
  "funding": "https://opencollective.com/pnpm",
12
- "repository": "https://github.com/pnpm/pnpm/blob/main/catalogs/resolver",
13
- "homepage": "https://github.com/pnpm/pnpm/blob/main/catalogs/resolver#readme",
12
+ "repository": "https://github.com/pnpm/pnpm/tree/main/catalogs/resolver",
13
+ "homepage": "https://github.com/pnpm/pnpm/tree/main/catalogs/resolver#readme",
14
14
  "bugs": {
15
15
  "url": "https://github.com/pnpm/pnpm/issues"
16
16
  },
17
- "type": "commonjs",
17
+ "type": "module",
18
18
  "main": "lib/index.js",
19
19
  "types": "lib/index.d.ts",
20
20
  "exports": {
@@ -25,23 +25,24 @@
25
25
  "!*.map"
26
26
  ],
27
27
  "dependencies": {
28
- "@pnpm/error": "^1000.0.3",
29
- "@pnpm/catalogs.protocol-parser": "^1001.0.0"
28
+ "@pnpm/catalogs.protocol-parser": "^1100.0.0",
29
+ "@pnpm/error": "^1100.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@pnpm/catalogs.types": "1000.0.0",
33
- "@pnpm/catalogs.resolver": "1000.0.4"
32
+ "@jest/globals": "30.3.0",
33
+ "@pnpm/catalogs.resolver": "1100.0.0",
34
+ "@pnpm/catalogs.types": "1100.0.0"
34
35
  },
35
36
  "engines": {
36
- "node": ">=18.12"
37
+ "node": ">=22.13"
37
38
  },
38
39
  "jest": {
39
40
  "preset": "@pnpm/jest-config"
40
41
  },
41
42
  "scripts": {
42
43
  "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
43
- "compile": "tsc --build && pnpm run lint --fix",
44
- "test": "pnpm run compile && pnpm run _test",
45
- "_test": "jest"
44
+ "compile": "tsgo --build && pn lint --fix",
45
+ "test": "pn compile && pn .test",
46
+ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
46
47
  }
47
48
  }
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAS6B;AAR3B,wHAAA,kBAAkB,OAAA;AASpB,yEAAkG;AAA9D,sIAAA,yBAAyB,OAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"matchCatalogResolveResult.js","sourceRoot":"","sources":["../src/matchCatalogResolveResult.ts"],"names":[],"mappings":";;AAQA,8DASC;AATD,SAAgB,yBAAyB,CACvC,MAA+B,EAC/B,OAAgC;IAEhC,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACtB,KAAK,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAC1C,KAAK,kBAAkB,CAAC,CAAC,OAAO,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAA;QAChE,KAAK,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolveFromCatalog.js","sourceRoot":"","sources":["../src/resolveFrom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