pacote 11.1.13 → 11.1.14
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/fetcher.js +10 -3
- package/package.json +2 -2
package/lib/fetcher.js
CHANGED
|
@@ -75,7 +75,12 @@ class FetcherBase {
|
|
|
75
75
|
this.type = this.constructor.name
|
|
76
76
|
this.fmode = opts.fmode || 0o666
|
|
77
77
|
this.dmode = opts.dmode || 0o777
|
|
78
|
-
|
|
78
|
+
// we don't need a default umask, because we don't chmod files coming
|
|
79
|
+
// out of package tarballs. they're forced to have a mode that is
|
|
80
|
+
// valid, regardless of what's in the tarball entry, and then we let
|
|
81
|
+
// the process's umask setting do its job. but if configured, we do
|
|
82
|
+
// respect it.
|
|
83
|
+
this.umask = opts.umask || 0
|
|
79
84
|
this.log = opts.log || procLog
|
|
80
85
|
|
|
81
86
|
this.preferOnline = !!opts.preferOnline
|
|
@@ -290,7 +295,7 @@ class FetcherBase {
|
|
|
290
295
|
return cacache.rm.content(this.cache, this.integrity, this.opts)
|
|
291
296
|
}
|
|
292
297
|
|
|
293
|
-
[_chown] (path, uid, gid) {
|
|
298
|
+
async [_chown] (path, uid, gid) {
|
|
294
299
|
return selfOwner && (selfOwner.gid !== gid || selfOwner.uid !== uid)
|
|
295
300
|
? chownr(path, uid, gid)
|
|
296
301
|
: /* istanbul ignore next - we don't test in root-owned folders */ null
|
|
@@ -388,13 +393,15 @@ class FetcherBase {
|
|
|
388
393
|
|
|
389
394
|
// make sure package bins are executable
|
|
390
395
|
const exe = isPackageBin(this.package, path) ? 0o111 : 0
|
|
391
|
-
|
|
396
|
+
// always ensure that files are read/writable by the owner
|
|
397
|
+
return ((mode | m) & ~this.umask) | exe | 0o600
|
|
392
398
|
}
|
|
393
399
|
|
|
394
400
|
[_tarxOptions] ({ cwd, uid, gid }) {
|
|
395
401
|
const sawIgnores = new Set()
|
|
396
402
|
return {
|
|
397
403
|
cwd,
|
|
404
|
+
noChmod: true,
|
|
398
405
|
filter: (name, entry) => {
|
|
399
406
|
if (/Link$/.test(entry.type))
|
|
400
407
|
return false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pacote",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.14",
|
|
4
4
|
"description": "JavaScript package downloader",
|
|
5
5
|
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
|
|
6
6
|
"bin": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"read-package-json-fast": "^1.1.3",
|
|
55
55
|
"rimraf": "^3.0.2",
|
|
56
56
|
"ssri": "^8.0.0",
|
|
57
|
-
"tar": "^6.0
|
|
57
|
+
"tar": "^6.1.0"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=10"
|