cacache 19.0.0 → 20.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/lib/entry-index.js +1 -1
- package/lib/verify.js +2 -1
- package/package.json +7 -7
package/lib/entry-index.js
CHANGED
|
@@ -19,7 +19,6 @@ const hashToSegments = require('./util/hash-to-segments')
|
|
|
19
19
|
const indexV = require('../package.json')['cache-version'].index
|
|
20
20
|
const { moveFile } = require('@npmcli/fs')
|
|
21
21
|
|
|
22
|
-
const pMap = require('p-map')
|
|
23
22
|
const lsStreamConcurrency = 5
|
|
24
23
|
|
|
25
24
|
module.exports.NotFoundError = class NotFoundError extends Error {
|
|
@@ -184,6 +183,7 @@ function lsStream (cache) {
|
|
|
184
183
|
|
|
185
184
|
// Set all this up to run on the stream and then just return the stream
|
|
186
185
|
Promise.resolve().then(async () => {
|
|
186
|
+
const { default: pMap } = await import('p-map')
|
|
187
187
|
const buckets = await readdirOrEmpty(indexDir)
|
|
188
188
|
await pMap(buckets, async (bucket) => {
|
|
189
189
|
const bucketPath = path.join(indexDir, bucket)
|
package/lib/verify.js
CHANGED
|
@@ -8,7 +8,6 @@ const {
|
|
|
8
8
|
truncate,
|
|
9
9
|
writeFile,
|
|
10
10
|
} = require('fs/promises')
|
|
11
|
-
const pMap = require('p-map')
|
|
12
11
|
const contentPath = require('./content/path')
|
|
13
12
|
const fsm = require('fs-minipass')
|
|
14
13
|
const glob = require('./util/glob.js')
|
|
@@ -93,6 +92,7 @@ async function fixPerms (cache, opts) {
|
|
|
93
92
|
//
|
|
94
93
|
async function garbageCollect (cache, opts) {
|
|
95
94
|
opts.log.silly('verify', 'garbage collecting content')
|
|
95
|
+
const { default: pMap } = await import('p-map')
|
|
96
96
|
const indexStream = index.lsStream(cache)
|
|
97
97
|
const liveContent = new Set()
|
|
98
98
|
indexStream.on('data', (entry) => {
|
|
@@ -176,6 +176,7 @@ async function verifyContent (filepath, sri) {
|
|
|
176
176
|
|
|
177
177
|
async function rebuildIndex (cache, opts) {
|
|
178
178
|
opts.log.silly('verify', 'rebuilding index')
|
|
179
|
+
const { default: pMap } = await import('p-map')
|
|
179
180
|
const entries = await index.ls(cache)
|
|
180
181
|
const stats = {
|
|
181
182
|
missingContent: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cacache",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"cache-version": {
|
|
5
5
|
"content": "2",
|
|
6
6
|
"index": "5"
|
|
@@ -48,29 +48,29 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@npmcli/fs": "^4.0.0",
|
|
50
50
|
"fs-minipass": "^3.0.0",
|
|
51
|
-
"glob": "^
|
|
52
|
-
"lru-cache": "^
|
|
51
|
+
"glob": "^11.0.3",
|
|
52
|
+
"lru-cache": "^11.1.0",
|
|
53
53
|
"minipass": "^7.0.3",
|
|
54
54
|
"minipass-collect": "^2.0.1",
|
|
55
55
|
"minipass-flush": "^1.0.5",
|
|
56
56
|
"minipass-pipeline": "^1.2.4",
|
|
57
|
-
"p-map": "^
|
|
57
|
+
"p-map": "^7.0.2",
|
|
58
58
|
"ssri": "^12.0.0",
|
|
59
59
|
"tar": "^7.4.3",
|
|
60
60
|
"unique-filename": "^4.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@npmcli/eslint-config": "^5.0.0",
|
|
64
|
-
"@npmcli/template-oss": "4.
|
|
64
|
+
"@npmcli/template-oss": "4.25.0",
|
|
65
65
|
"tap": "^16.0.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
|
-
"node": "^
|
|
68
|
+
"node": "^20.17.0 || >=22.9.0"
|
|
69
69
|
},
|
|
70
70
|
"templateOSS": {
|
|
71
71
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
72
72
|
"windowsCI": false,
|
|
73
|
-
"version": "4.
|
|
73
|
+
"version": "4.25.0",
|
|
74
74
|
"publish": "true"
|
|
75
75
|
},
|
|
76
76
|
"author": "GitHub Inc.",
|