@vltpkg/package-info 1.0.0-rc.33 → 1.0.0-rc.34
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/index.d.ts +0 -9
- package/dist/index.js +1 -10
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -28,15 +28,6 @@ export type PackageInfoClientOptions = RegistryClientOptions & SpecOptions & {
|
|
|
28
28
|
export type PackageInfoClientRequestOptions = PickManifestOptions & RegistryClientRequestOptions & {
|
|
29
29
|
/** dir to resolve `file://` specifiers against. Defaults to projectRoot. */
|
|
30
30
|
from?: string;
|
|
31
|
-
/**
|
|
32
|
-
* When true, requests the full packument document from the registry
|
|
33
|
-
* instead of the abbreviated "corgi" format. Use this when you need
|
|
34
|
-
* fields like `time`, `maintainers`, or `_rev` that are stripped
|
|
35
|
-
* from the abbreviated response.
|
|
36
|
-
*
|
|
37
|
-
* Defaults to `false` (abbreviated packument for faster installs).
|
|
38
|
-
*/
|
|
39
|
-
fullPackument?: boolean;
|
|
40
31
|
};
|
|
41
32
|
export type PackageInfoClientExtractOptions = PackageInfoClientRequestOptions & {
|
|
42
33
|
integrity?: Integrity;
|
package/dist/index.js
CHANGED
|
@@ -600,12 +600,6 @@ export class PackageInfoClient {
|
|
|
600
600
|
const { registry, name } = f;
|
|
601
601
|
if (!registry)
|
|
602
602
|
throw noRegistryError(spec);
|
|
603
|
-
// Full packument requests bypass coalescing since they
|
|
604
|
-
// return different data than the abbreviated format.
|
|
605
|
-
if (options.fullPackument) {
|
|
606
|
-
const pakuURL = new URL(name, registry);
|
|
607
|
-
return this.#fetchPackument(spec, options, pakuURL);
|
|
608
|
-
}
|
|
609
603
|
const packumentKey = `${registry}${name}`;
|
|
610
604
|
const inflight = this.#packumentPromises.get(packumentKey);
|
|
611
605
|
if (inflight)
|
|
@@ -622,11 +616,8 @@ export class PackageInfoClient {
|
|
|
622
616
|
}
|
|
623
617
|
}
|
|
624
618
|
async #fetchPackument(spec, options, pakuURL) {
|
|
625
|
-
const accept = options.fullPackument ?
|
|
626
|
-
'application/json'
|
|
627
|
-
: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*';
|
|
628
619
|
const response = await this.registryClient.request(pakuURL, {
|
|
629
|
-
headers: { accept },
|
|
620
|
+
headers: { accept: 'application/json' },
|
|
630
621
|
});
|
|
631
622
|
if (response.statusCode !== 200) {
|
|
632
623
|
throw this.#resolveError(spec, options, 'failed to fetch packument', {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/package-info",
|
|
3
3
|
"description": "Resolve and fetch package metadata and tarballs",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.34",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/error-cause": "1.0.0-rc.
|
|
17
|
-
"@vltpkg/git": "1.0.0-rc.
|
|
18
|
-
"@vltpkg/package-json": "1.0.0-rc.
|
|
19
|
-
"@vltpkg/pick-manifest": "1.0.0-rc.
|
|
20
|
-
"@vltpkg/registry-client": "1.0.0-rc.
|
|
21
|
-
"@vltpkg/spec": "1.0.0-rc.
|
|
22
|
-
"@vltpkg/tar": "1.0.0-rc.
|
|
23
|
-
"@vltpkg/types": "1.0.0-rc.
|
|
24
|
-
"@vltpkg/workspaces": "1.0.0-rc.
|
|
25
|
-
"@vltpkg/xdg": "1.0.0-rc.
|
|
16
|
+
"@vltpkg/error-cause": "1.0.0-rc.34",
|
|
17
|
+
"@vltpkg/git": "1.0.0-rc.34",
|
|
18
|
+
"@vltpkg/package-json": "1.0.0-rc.34",
|
|
19
|
+
"@vltpkg/pick-manifest": "1.0.0-rc.34",
|
|
20
|
+
"@vltpkg/registry-client": "1.0.0-rc.34",
|
|
21
|
+
"@vltpkg/spec": "1.0.0-rc.34",
|
|
22
|
+
"@vltpkg/tar": "1.0.0-rc.34",
|
|
23
|
+
"@vltpkg/types": "1.0.0-rc.34",
|
|
24
|
+
"@vltpkg/workspaces": "1.0.0-rc.34",
|
|
25
|
+
"@vltpkg/xdg": "1.0.0-rc.34",
|
|
26
26
|
"ssri": "^13.0.0",
|
|
27
27
|
"tar": "^7.5.2"
|
|
28
28
|
},
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@types/node": "^22.19.2",
|
|
32
32
|
"@types/pacote": "^11.1.8",
|
|
33
33
|
"@vltpkg/benchmark": "0.0.0",
|
|
34
|
-
"@vltpkg/cache-unzip": "1.0.0-rc.
|
|
35
|
-
"@vltpkg/vlt-json": "1.0.0-rc.
|
|
34
|
+
"@vltpkg/cache-unzip": "1.0.0-rc.34",
|
|
35
|
+
"@vltpkg/vlt-json": "1.0.0-rc.34",
|
|
36
36
|
"eslint": "^9.39.1",
|
|
37
37
|
"pacote": "^21.0.4",
|
|
38
38
|
"prettier": "^3.7.4",
|