cacache 18.0.4 → 19.0.1

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.
@@ -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": "18.0.4",
3
+ "version": "19.0.1",
4
4
  "cache-version": {
5
5
  "content": "2",
6
6
  "index": "5"
@@ -16,13 +16,14 @@
16
16
  "snap": "tap",
17
17
  "coverage": "tap",
18
18
  "test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test",
19
- "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
19
+ "lint": "npm run eslint",
20
20
  "npmclilint": "npmcli-lint",
21
- "lintfix": "npm run lint -- --fix",
21
+ "lintfix": "npm run eslint -- --fix",
22
22
  "postsnap": "npm run lintfix --",
23
23
  "postlint": "template-oss-check",
24
24
  "posttest": "npm run lint",
25
- "template-oss-apply": "template-oss-apply --force"
25
+ "template-oss-apply": "template-oss-apply --force",
26
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
26
27
  },
27
28
  "repository": {
28
29
  "type": "git",
@@ -45,7 +46,7 @@
45
46
  ],
46
47
  "license": "ISC",
47
48
  "dependencies": {
48
- "@npmcli/fs": "^3.1.0",
49
+ "@npmcli/fs": "^4.0.0",
49
50
  "fs-minipass": "^3.0.0",
50
51
  "glob": "^10.2.2",
51
52
  "lru-cache": "^10.0.1",
@@ -53,23 +54,23 @@
53
54
  "minipass-collect": "^2.0.1",
54
55
  "minipass-flush": "^1.0.5",
55
56
  "minipass-pipeline": "^1.2.4",
56
- "p-map": "^4.0.0",
57
- "ssri": "^10.0.0",
58
- "tar": "^6.1.11",
59
- "unique-filename": "^3.0.0"
57
+ "p-map": "^7.0.2",
58
+ "ssri": "^12.0.0",
59
+ "tar": "^7.4.3",
60
+ "unique-filename": "^4.0.0"
60
61
  },
61
62
  "devDependencies": {
62
- "@npmcli/eslint-config": "^4.0.0",
63
- "@npmcli/template-oss": "4.22.0",
63
+ "@npmcli/eslint-config": "^5.0.0",
64
+ "@npmcli/template-oss": "4.23.3",
64
65
  "tap": "^16.0.0"
65
66
  },
66
67
  "engines": {
67
- "node": "^16.14.0 || >=18.0.0"
68
+ "node": "^18.17.0 || >=20.5.0"
68
69
  },
69
70
  "templateOSS": {
70
71
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
71
72
  "windowsCI": false,
72
- "version": "4.22.0",
73
+ "version": "4.23.3",
73
74
  "publish": "true"
74
75
  },
75
76
  "author": "GitHub Inc.",