@pnpm/resolving.jsr-specifier-parser 1000.0.3 → 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.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseJsrSpecifier = parseJsrSpecifier;
4
- const error_1 = require("@pnpm/error");
5
- function parseJsrSpecifier(rawSpecifier, alias) {
1
+ import { PnpmError } from '@pnpm/error';
2
+ export function parseJsrSpecifier(rawSpecifier, alias) {
6
3
  if (!rawSpecifier.startsWith('jsr:'))
7
4
  return null;
8
5
  rawSpecifier = rawSpecifier.substring('jsr:'.length);
@@ -26,10 +23,10 @@ function parseJsrSpecifier(rawSpecifier, alias) {
26
23
  }
27
24
  // syntax: jsr:<name>@<version_selector> (invalid)
28
25
  if (rawSpecifier.includes('@')) {
29
- throw new error_1.PnpmError('MISSING_JSR_PACKAGE_SCOPE', 'Package names from JSR must have a scope');
26
+ throw new PnpmError('MISSING_JSR_PACKAGE_SCOPE', 'Package names from JSR must have a scope');
30
27
  }
31
28
  if (!alias) {
32
- throw new error_1.PnpmError('INVALID_JSR_SPECIFIER', `JSR specifier '${rawSpecifier}' is missing a package name`);
29
+ throw new PnpmError('INVALID_JSR_SPECIFIER', `JSR specifier '${rawSpecifier}' is missing a package name`);
33
30
  }
34
31
  // syntax: jsr:<spec>
35
32
  return {
@@ -40,11 +37,11 @@ function parseJsrSpecifier(rawSpecifier, alias) {
40
37
  }
41
38
  function jsrToNpmPackageName(jsrPkgName) {
42
39
  if (jsrPkgName[0] !== '@') {
43
- throw new error_1.PnpmError('MISSING_JSR_PACKAGE_SCOPE', 'Package names from JSR must have a scope');
40
+ throw new PnpmError('MISSING_JSR_PACKAGE_SCOPE', 'Package names from JSR must have a scope');
44
41
  }
45
42
  const sepIndex = jsrPkgName.indexOf('/');
46
43
  if (sepIndex === -1) {
47
- throw new error_1.PnpmError('INVALID_JSR_PACKAGE_NAME', `The package name '${jsrPkgName}' is invalid`);
44
+ throw new PnpmError('INVALID_JSR_PACKAGE_NAME', `The package name '${jsrPkgName}' is invalid`);
48
45
  }
49
46
  const scope = jsrPkgName.substring(0, sepIndex);
50
47
  const name = jsrPkgName.substring(sepIndex + '/'.length);
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@pnpm/resolving.jsr-specifier-parser",
3
- "version": "1000.0.3",
3
+ "version": "1100.0.0",
4
4
  "description": "Parser of jsr specifiers",
5
5
  "keywords": [
6
6
  "pnpm",
7
- "pnpm10",
7
+ "pnpm11",
8
8
  "jsr"
9
9
  ],
10
10
  "license": "MIT",
11
11
  "funding": "https://opencollective.com/pnpm",
12
- "repository": "https://github.com/pnpm/pnpm/blob/main/resolving/jsr-specifier-parser",
13
- "homepage": "https://github.com/pnpm/pnpm/blob/main/resolving/jsr-specifier-parser#readme",
12
+ "repository": "https://github.com/pnpm/pnpm/tree/main/resolving/jsr-specifier-parser",
13
+ "homepage": "https://github.com/pnpm/pnpm/tree/main/resolving/jsr-specifier-parser#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,21 +25,21 @@
25
25
  "!*.map"
26
26
  ],
27
27
  "dependencies": {
28
- "@pnpm/error": "1000.0.5"
28
+ "@pnpm/error": "1100.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@pnpm/resolving.jsr-specifier-parser": "1000.0.3"
31
+ "@pnpm/resolving.jsr-specifier-parser": "1100.0.0"
32
32
  },
33
33
  "engines": {
34
- "node": ">=18.12"
34
+ "node": ">=22.13"
35
35
  },
36
36
  "jest": {
37
37
  "preset": "@pnpm/jest-config"
38
38
  },
39
39
  "scripts": {
40
40
  "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
41
- "_test": "jest",
42
- "test": "pnpm run compile && pnpm run _test",
43
- "compile": "tsc --build && pnpm run lint --fix"
41
+ "test": "pn compile && pn .test",
42
+ "compile": "tsgo --build && pn lint --fix",
43
+ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
44
44
  }
45
45
  }
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AASA,8CAyCC;AAlDD,uCAAuC;AASvC,SAAgB,iBAAiB,CAAE,YAAoB,EAAE,KAAc;IACrE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAA;IAEjD,YAAY,GAAG,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAEpD,mDAAmD;IACnD,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QAE3C,8BAA8B;QAC9B,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO;gBACL,UAAU,EAAE,YAAY;gBACxB,UAAU,EAAE,mBAAmB,CAAC,YAAY,CAAC;aAC9C,CAAA;QACH,CAAC;QAED,iDAAiD;QACjD,MAAM,UAAU,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,OA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