Skip to content

Commit ce195dc

Browse files
committed
1 parent e839b07 commit ce195dc

18 files changed

Lines changed: 23 additions & 385 deletions

File tree

DEPENDENCIES.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"@npmcli/promise-spawn",
5454
"npm-install-checks",
5555
"npm-package-arg",
56-
"unique-filename",
5756
"npm-packlist",
5857
"bin-links",
5958
"nopt",
@@ -75,7 +74,6 @@
7574
"validate-npm-package-name",
7675
"json-parse-even-better-errors",
7776
"ssri",
78-
"unique-slug",
7977
"@npmcli/node-gyp",
8078
"@npmcli/redact",
8179
"@npmcli/agent",

DEPENDENCIES.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ graph LR;
1212
bin-links-->write-file-atomic;
1313
cacache-->npmcli-fs["@npmcli/fs"];
1414
cacache-->ssri;
15-
cacache-->unique-filename;
1615
init-package-json-->npm-package-arg;
1716
init-package-json-->npmcli-package-json["@npmcli/package-json"];
1817
init-package-json-->promzard;
@@ -246,7 +245,6 @@ graph LR;
246245
parse-conflict-json-->json-parse-even-better-errors;
247246
promzard-->read;
248247
read-->mute-stream;
249-
unique-filename-->unique-slug;
250248
```
251249

252250
## all dependencies
@@ -268,7 +266,6 @@ graph LR;
268266
cacache-->npmcli-fs["@npmcli/fs"];
269267
cacache-->p-map;
270268
cacache-->ssri;
271-
cacache-->unique-filename;
272269
debug-->ms;
273270
fdir-->picomatch;
274271
fs-minipass-->minipass;
@@ -716,8 +713,6 @@ graph LR;
716713
tuf-js-->tufjs-models["@tufjs/models"];
717714
tufjs-models-->minimatch;
718715
tufjs-models-->tufjs-canonical-json["@tufjs/canonical-json"];
719-
unique-filename-->unique-slug;
720-
unique-slug-->imurmurhash;
721716
which-->isexe;
722717
write-file-atomic-->signal-exit;
723718
```
@@ -737,5 +732,5 @@ packages higher up the chain.
737732
- @npmcli/package-json, npm-registry-fetch
738733
- @npmcli/git, make-fetch-happen
739734
- @npmcli/smoke-tests, @npmcli/installed-package-contents, npm-pick-manifest, cacache, promzard
740-
- @npmcli/docs, @npmcli/fs, npm-bundled, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, unique-filename, npm-packlist, bin-links, nopt, parse-conflict-json, @npmcli/mock-globals, read
741-
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, which, ini, hosted-git-info, proc-log, validate-npm-package-name, json-parse-even-better-errors, ssri, unique-slug, @npmcli/node-gyp, @npmcli/redact, @npmcli/agent, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, proggy, minify-registry-metadata, mute-stream, npm-audit-report, npm-user-validate
735+
- @npmcli/docs, @npmcli/fs, npm-bundled, @npmcli/promise-spawn, npm-install-checks, npm-package-arg, npm-packlist, bin-links, nopt, parse-conflict-json, @npmcli/mock-globals, read
736+
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, which, ini, hosted-git-info, proc-log, validate-npm-package-name, json-parse-even-better-errors, ssri, @npmcli/node-gyp, @npmcli/redact, @npmcli/agent, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, proggy, minify-registry-metadata, mute-stream, npm-audit-report, npm-user-validate

node_modules/.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
!/https-proxy-agent
7272
!/iconv-lite
7373
!/ignore-walk
74-
!/imurmurhash
7574
!/ini
7675
!/init-package-json
7776
!/ip-address
@@ -152,8 +151,6 @@
152151
!/tinyglobby/node_modules/picomatch
153152
!/treeverse
154153
!/tuf-js
155-
!/unique-filename
156-
!/unique-slug
157154
!/util-deprecate
158155
!/validate-npm-package-name
159156
!/walk-up-path

node_modules/cacache/lib/content/write.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Pipeline = require('minipass-pipeline')
1010
const Flush = require('minipass-flush')
1111
const path = require('path')
1212
const ssri = require('ssri')
13-
const uniqueFilename = require('unique-filename')
13+
const { tmpName } = require('../util/tmp')
1414
const fsm = require('fs-minipass')
1515

1616
module.exports = write
@@ -152,7 +152,7 @@ async function pipeToTmp (inputStream, cache, tmpTarget, opts) {
152152
}
153153

154154
async function makeTmp (cache, opts) {
155-
const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
155+
const tmpTarget = tmpName(cache, opts.tmpPrefix)
156156
await fs.mkdir(path.dirname(tmpTarget), { recursive: true })
157157
return {
158158
target: tmpTarget,

node_modules/cacache/lib/entry-index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212
const { Minipass } = require('minipass')
1313
const path = require('path')
1414
const ssri = require('ssri')
15-
const uniqueFilename = require('unique-filename')
15+
const { tmpName } = require('./util/tmp')
1616

1717
const contentPath = require('./content/path')
1818
const hashToSegments = require('./util/hash-to-segments')
@@ -69,7 +69,7 @@ async function compact (cache, key, matchFn, opts = {}) {
6969
}).join('\n')
7070

7171
const setup = async () => {
72-
const target = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix)
72+
const target = tmpName(cache, opts.tmpPrefix)
7373
await mkdir(path.dirname(target), { recursive: true })
7474
return {
7575
target,

node_modules/cacache/lib/util/tmp.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
'use strict'
22

3+
const crypto = require('crypto')
34
const { withTempDir } = require('@npmcli/fs')
45
const fs = require('fs/promises')
56
const path = require('path')
67

78
module.exports.mkdir = mktmpdir
89

10+
module.exports.tmpName = function tmpName (cache, tmpPrefix) {
11+
const id = crypto.randomUUID()
12+
return path.join(cache, 'tmp', tmpPrefix ? `${tmpPrefix}-${id}` : id)
13+
}
14+
915
async function mktmpdir (cache, opts = {}) {
1016
const { tmpPrefix } = opts
1117
const tmpDir = path.join(cache, 'tmp')

node_modules/cacache/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cacache",
3-
"version": "20.0.3",
3+
"version": "20.0.4",
44
"cache-version": {
55
"content": "2",
66
"index": "5"
@@ -55,12 +55,11 @@
5555
"minipass-flush": "^1.0.5",
5656
"minipass-pipeline": "^1.2.4",
5757
"p-map": "^7.0.2",
58-
"ssri": "^13.0.0",
59-
"unique-filename": "^5.0.0"
58+
"ssri": "^13.0.0"
6059
},
6160
"devDependencies": {
6261
"@npmcli/eslint-config": "^6.0.1",
63-
"@npmcli/template-oss": "4.28.0",
62+
"@npmcli/template-oss": "4.29.0",
6463
"tap": "^16.0.0"
6564
},
6665
"engines": {
@@ -69,7 +68,7 @@
6968
"templateOSS": {
7069
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
7170
"windowsCI": false,
72-
"version": "4.28.0",
71+
"version": "4.29.0",
7372
"publish": "true"
7473
},
7574
"author": "GitHub Inc.",

node_modules/imurmurhash/imurmurhash.js

Lines changed: 0 additions & 138 deletions
This file was deleted.

node_modules/imurmurhash/imurmurhash.min.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

node_modules/imurmurhash/package.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)