@vltpkg/package-info 1.8.2 → 1.9.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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/dist/index.js +15 -2
  3. package/package.json +14 -14
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) vlt technology, Inc.
1
+ Copyright (c) vlt technology inc.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
package/dist/index.js CHANGED
@@ -755,10 +755,15 @@ export class PackageInfoClient {
755
755
  // the same fetch and out of the eviction's reach.
756
756
  if (response.fromCache &&
757
757
  (!found || (r.integrity && r.integrity !== found))) {
758
+ // one delete at a time: both remove the same value and key
759
+ // files, and on windows the second unlink of a file the
760
+ // first one is still removing fails with EPERM
758
761
  rc.cache.delete(key, true, found);
759
- if (r.integrity)
760
- rc.cache.delete(key, true, r.integrity);
761
762
  await rc.cache.promise();
763
+ if (r.integrity) {
764
+ rc.cache.delete(key, true, r.integrity);
765
+ await rc.cache.promise();
766
+ }
762
767
  response = await fetchTarball(false);
763
768
  found = storedIntegrity(response);
764
769
  }
@@ -1422,6 +1427,14 @@ export class PackageInfoClient {
1422
1427
  if (file === undefined)
1423
1428
  throw this.#resolveError(spec, options, 'no file path');
1424
1429
  const path = pathResolve(from, file);
1430
+ // a link: target may have no package.json, or not exist yet
1431
+ if (f.bareSpec.startsWith('link:') &&
1432
+ spec.name !== '(unknown)' &&
1433
+ !lstatSync(pathResolve(path, 'package.json'), {
1434
+ throwIfNoEntry: false,
1435
+ })) {
1436
+ return { name: spec.name };
1437
+ }
1425
1438
  const st = await stat(path);
1426
1439
  if (st.isDirectory()) {
1427
1440
  return this.packageJson.read(path);
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.8.2",
4
+ "version": "1.9.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -13,17 +13,17 @@
13
13
  "url": "http://vlt.sh"
14
14
  },
15
15
  "dependencies": {
16
- "@vltpkg/error-cause": "1.8.2",
17
- "@vltpkg/git": "1.8.2",
18
- "@vltpkg/output": "1.8.2",
19
- "@vltpkg/package-json": "1.8.2",
20
- "@vltpkg/pick-manifest": "1.8.2",
21
- "@vltpkg/registry-client": "1.8.2",
22
- "@vltpkg/spec": "1.8.2",
23
- "@vltpkg/tar": "1.8.2",
24
- "@vltpkg/types": "1.8.2",
25
- "@vltpkg/workspaces": "1.8.2",
26
- "@vltpkg/xdg": "1.8.2",
16
+ "@vltpkg/error-cause": "1.9.0",
17
+ "@vltpkg/git": "1.9.0",
18
+ "@vltpkg/output": "1.9.0",
19
+ "@vltpkg/package-json": "1.9.0",
20
+ "@vltpkg/pick-manifest": "1.9.0",
21
+ "@vltpkg/registry-client": "1.9.0",
22
+ "@vltpkg/spec": "1.9.0",
23
+ "@vltpkg/tar": "1.9.0",
24
+ "@vltpkg/types": "1.9.0",
25
+ "@vltpkg/workspaces": "1.9.0",
26
+ "@vltpkg/xdg": "1.9.0",
27
27
  "tar": "^7.5.2"
28
28
  },
29
29
  "devDependencies": {
@@ -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.8.2",
35
- "@vltpkg/vlt-json": "1.8.2",
34
+ "@vltpkg/cache-unzip": "1.9.0",
35
+ "@vltpkg/vlt-json": "1.9.0",
36
36
  "eslint": "^10.14.0",
37
37
  "pacote": "^21.0.4",
38
38
  "prettier": "^3.7.4",