@vltpkg/spec 1.7.0 → 1.8.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/dist/browser.d.ts +1 -0
- package/dist/browser.js +8 -1
- package/dist/types.d.ts +10 -7
- package/package.json +3 -3
package/dist/browser.d.ts
CHANGED
package/dist/browser.js
CHANGED
|
@@ -7,6 +7,7 @@ export const kCustomInspect = Symbol.for('nodejs.util.inspect.custom');
|
|
|
7
7
|
export const defaultRegistryName = 'npm';
|
|
8
8
|
export const defaultRegistries = {
|
|
9
9
|
gh: 'https://npm.pkg.github.com/',
|
|
10
|
+
npm: 'https://registry.vlt.io/upstream/npm/',
|
|
10
11
|
};
|
|
11
12
|
export const defaultJsrRegistries = { jsr: 'https://npm.jsr.io/' };
|
|
12
13
|
export const defaultGitHosts = {
|
|
@@ -50,7 +51,13 @@ export const getOptions = (options) => ({
|
|
|
50
51
|
},
|
|
51
52
|
registry: options?.registry,
|
|
52
53
|
'default-registry-alias': options?.['default-registry-alias'] ?? defaultRegistryName,
|
|
53
|
-
|
|
54
|
+
// JSR packages name their JSR deps `@jsr/*`: send that scope to the
|
|
55
|
+
// jsr alias unless the user maps it
|
|
56
|
+
'scoped-registries': {
|
|
57
|
+
'@jsr': options?.['jsr-registries']?.jsr ??
|
|
58
|
+
defaultScopeRegistries['@jsr'],
|
|
59
|
+
...options?.['scoped-registries'],
|
|
60
|
+
},
|
|
54
61
|
'git-hosts': options?.['git-hosts'] ?
|
|
55
62
|
{
|
|
56
63
|
...defaultGitHosts,
|
package/dist/types.d.ts
CHANGED
|
@@ -7,10 +7,12 @@ export type SpecOptionsFilled = {
|
|
|
7
7
|
/**
|
|
8
8
|
* The registry where a spec should be resolved against.
|
|
9
9
|
*
|
|
10
|
-
* There is **no default
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* There is **no default**: when unset, bare specs resolve through the
|
|
11
|
+
* `default-registry-alias` (the built-in `npm` alias, vlt's public npm
|
|
12
|
+
* mirror, unless configured). Only when that alias has no URL do
|
|
13
|
+
* registry-type specs get `spec.registry === undefined`, and anything
|
|
14
|
+
* that needs to build a registry URL fails. Named registry aliases
|
|
15
|
+
* (`gh:`, `jsr:`) and `scoped-registries` are unaffected.
|
|
14
16
|
*
|
|
15
17
|
* For bare specs, this takes precedence over the
|
|
16
18
|
* `default-registry-alias` lookup but not over a matching
|
|
@@ -23,9 +25,10 @@ export type SpecOptionsFilled = {
|
|
|
23
25
|
* protocol resolve through, when no `registry` or `scoped-registries`
|
|
24
26
|
* entry applies.
|
|
25
27
|
*
|
|
26
|
-
* Defaults to `'npm'
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* Defaults to `'npm'`, whose built-in URL is vlt's public, read-only
|
|
29
|
+
* npm mirror (`https://registry.vlt.io/upstream/npm/`). `vlt setup` or
|
|
30
|
+
* `registries.npm` point it elsewhere. An alias with no URL makes bare
|
|
31
|
+
* specs resolve with `spec.registry === undefined`.
|
|
29
32
|
*/
|
|
30
33
|
'default-registry-alias': string;
|
|
31
34
|
/** shorthand prefix names for known registries */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/spec",
|
|
3
3
|
"description": "Package specifier library",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/error-cause": "1.
|
|
17
|
-
"@vltpkg/semver": "1.
|
|
16
|
+
"@vltpkg/error-cause": "1.8.0",
|
|
17
|
+
"@vltpkg/semver": "1.8.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@eslint/js": "^10.0.1",
|