fsevents 1.2.2 → 1.2.7
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.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.travis.yml +2 -1
- package/fsevents.cc +9 -22
- package/node_modules/abbrev/package.json +1 -1
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/aproba/package.json +1 -1
- package/node_modules/are-we-there-yet/CHANGES.md +6 -0
- package/node_modules/are-we-there-yet/package.json +8 -8
- package/node_modules/are-we-there-yet/tracker-stream.js +1 -0
- package/node_modules/balanced-match/package.json +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/chownr/chownr.js +74 -38
- package/node_modules/chownr/package.json +16 -13
- package/node_modules/code-point-at/package.json +1 -1
- package/node_modules/concat-map/package.json +1 -1
- package/node_modules/console-control-strings/package.json +1 -1
- package/node_modules/core-util-is/package.json +1 -1
- package/node_modules/debug/package.json +1 -1
- package/node_modules/deep-extend/CHANGELOG.md +28 -3
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +2 -1
- package/node_modules/deep-extend/lib/deep-extend.js +11 -5
- package/node_modules/deep-extend/package.json +20 -21
- package/node_modules/delegates/package.json +1 -1
- package/node_modules/detect-libc/package.json +1 -1
- package/node_modules/fs-minipass/package.json +1 -1
- package/node_modules/fs.realpath/package.json +1 -1
- package/node_modules/gauge/package.json +1 -1
- package/node_modules/glob/package.json +12 -12
- package/node_modules/has-unicode/package.json +1 -1
- package/node_modules/iconv-lite/Changelog.md +16 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +2 -2
- package/node_modules/iconv-lite/encodings/sbcs-data.js +5 -0
- package/node_modules/iconv-lite/lib/extend-node.js +1 -1
- package/node_modules/iconv-lite/lib/index.d.ts +2 -2
- package/node_modules/iconv-lite/package.json +8 -8
- package/node_modules/ignore-walk/package.json +1 -1
- package/node_modules/inflight/package.json +1 -1
- package/node_modules/inherits/package.json +1 -1
- package/node_modules/ini/package.json +1 -1
- package/node_modules/is-fullwidth-code-point/package.json +1 -1
- package/node_modules/isarray/package.json +1 -1
- package/node_modules/minimatch/package.json +1 -1
- package/node_modules/minimist/package.json +1 -1
- package/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass/README.md +81 -3
- package/node_modules/minipass/index.js +77 -6
- package/node_modules/minipass/package.json +13 -13
- package/node_modules/minizlib/index.js +66 -95
- package/node_modules/minizlib/package.json +12 -12
- package/node_modules/mkdirp/package.json +1 -1
- package/node_modules/ms/package.json +1 -1
- package/node_modules/needle/README.md +2 -1
- package/node_modules/needle/lib/cookies.js +12 -10
- package/node_modules/needle/lib/needle.js +16 -4
- package/node_modules/needle/note.xml +7 -0
- package/node_modules/needle/note.xml.1 +7 -0
- package/node_modules/needle/package.json +13 -13
- package/node_modules/needle/test/errors_spec.js +4 -4
- package/node_modules/needle/test/long_string_spec.js +1 -1
- package/node_modules/needle/test/url_spec.js +11 -3
- package/node_modules/node-pre-gyp/CHANGELOG.md +24 -3
- package/node_modules/node-pre-gyp/README.md +15 -18
- package/node_modules/node-pre-gyp/appveyor.yml +2 -9
- package/node_modules/node-pre-gyp/contributing.md +2 -2
- package/node_modules/node-pre-gyp/lib/install.js +29 -7
- package/node_modules/node-pre-gyp/lib/package.js +5 -2
- package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +100 -0
- package/node_modules/node-pre-gyp/package.json +13 -14
- package/node_modules/nopt/package.json +1 -1
- package/node_modules/npm-bundled/LICENSE +15 -0
- package/node_modules/npm-bundled/README.md +2 -0
- package/node_modules/npm-bundled/index.js +3 -1
- package/node_modules/npm-bundled/package.json +7 -7
- package/node_modules/npm-packlist/index.js +16 -7
- package/node_modules/npm-packlist/package.json +7 -7
- package/node_modules/npmlog/package.json +1 -1
- package/node_modules/number-is-nan/package.json +1 -1
- package/node_modules/object-assign/package.json +1 -1
- package/node_modules/once/package.json +1 -1
- package/node_modules/os-homedir/package.json +1 -1
- package/node_modules/os-tmpdir/package.json +1 -1
- package/node_modules/osenv/package.json +1 -1
- package/node_modules/path-is-absolute/package.json +1 -1
- package/node_modules/process-nextick-args/package.json +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/readable-stream/package.json +1 -1
- package/node_modules/rimraf/package.json +11 -8
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/package.json +9 -9
- package/node_modules/safer-buffer/package.json +6 -6
- package/node_modules/sax/package.json +1 -1
- package/node_modules/semver/README.md +17 -6
- package/node_modules/semver/bin/semver +14 -4
- package/node_modules/semver/package.json +7 -7
- package/node_modules/semver/semver.js +132 -104
- package/node_modules/set-blocking/package.json +1 -1
- package/node_modules/signal-exit/package.json +1 -1
- package/node_modules/string-width/package.json +1 -1
- package/node_modules/string_decoder/package.json +1 -1
- package/node_modules/strip-ansi/package.json +1 -1
- package/node_modules/strip-json-comments/package.json +1 -1
- package/node_modules/tar/README.md +7 -2
- package/node_modules/tar/lib/header.js +20 -4
- package/node_modules/tar/lib/mode-fix.js +14 -0
- package/node_modules/tar/lib/pack.js +1 -0
- package/node_modules/tar/lib/parse.js +2 -1
- package/node_modules/tar/lib/unpack.js +67 -6
- package/node_modules/tar/lib/write-entry.js +25 -6
- package/node_modules/tar/package.json +14 -14
- package/node_modules/util-deprecate/package.json +1 -1
- package/node_modules/wide-align/package.json +8 -8
- package/node_modules/wrappy/package.json +1 -1
- package/node_modules/yallist/iterator.js +5 -5
- package/node_modules/yallist/package.json +7 -7
- package/node_modules/yallist/yallist.js +2 -2
- package/package.json +3 -3
- package/src/async.cc +2 -2
- package/src/methods.cc +9 -7
- package/src/thread.cc +5 -6
- package/.npmignore +0 -1
- package/build/.target.mk +0 -53
- package/build/Makefile +0 -352
- package/build/Release/.deps/Release/.node.d +0 -1
- package/build/Release/.deps/Release/fse.node.d +0 -1
- package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +0 -1
- package/build/Release/.deps/Release/obj.target/fse/fsevents.o.d +0 -65
- package/build/Release/.deps/Users/eshanker/Code/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node.d +0 -1
- package/build/Release/.node +0 -0
- package/build/Release/fse.node +0 -0
- package/build/Release/obj.target/action_after_build.stamp +0 -0
- package/build/Release/obj.target/fse/fsevents.o +0 -0
- package/build/action_after_build.target.mk +0 -32
- package/build/binding.Makefile +0 -6
- package/build/fse.target.mk +0 -179
- package/build/gyp-mac-tool +0 -611
- package/build/stage/v1.1.2/fse-v1.1.2-node-v48-darwin-x64.tar.gz +0 -0
- package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v57-darwin-x64/fse.node +0 -0
- package/node_modules/are-we-there-yet/CHANGES.md~ +0 -27
- package/node_modules/iconv-lite/.travis.yml +0 -23
- package/node_modules/rc/.npmignore +0 -3
- package/node_modules/safe-buffer/.travis.yml +0 -7
- package/node_modules/safe-buffer/test.js +0 -101
- package/src/locking.cc +0 -27
@@ -6,13 +6,14 @@
|
|
6
6
|
|
7
7
|
const Buffer = require('./buffer.js')
|
8
8
|
const types = require('./types.js')
|
9
|
-
const pathModule = require('path')
|
9
|
+
const pathModule = require('path').posix
|
10
10
|
const large = require('./large-numbers.js')
|
11
11
|
|
12
|
+
const SLURP = Symbol('slurp')
|
12
13
|
const TYPE = Symbol('type')
|
13
14
|
|
14
15
|
class Header {
|
15
|
-
constructor (data, off) {
|
16
|
+
constructor (data, off, ex, gex) {
|
16
17
|
this.cksumValid = false
|
17
18
|
this.needPax = false
|
18
19
|
this.nullBlock = false
|
@@ -35,12 +36,12 @@ class Header {
|
|
35
36
|
this.ctime = null
|
36
37
|
|
37
38
|
if (Buffer.isBuffer(data))
|
38
|
-
this.decode(data, off || 0)
|
39
|
+
this.decode(data, off || 0, ex, gex)
|
39
40
|
else if (data)
|
40
41
|
this.set(data)
|
41
42
|
}
|
42
43
|
|
43
|
-
decode (buf, off) {
|
44
|
+
decode (buf, off, ex, gex) {
|
44
45
|
if (!off)
|
45
46
|
off = 0
|
46
47
|
|
@@ -55,6 +56,11 @@ class Header {
|
|
55
56
|
this.mtime = decDate(buf, off + 136, 12)
|
56
57
|
this.cksum = decNumber(buf, off + 148, 12)
|
57
58
|
|
59
|
+
// if we have extended or global extended headers, apply them now
|
60
|
+
// See https://github.com/npm/node-tar/pull/187
|
61
|
+
this[SLURP](ex)
|
62
|
+
this[SLURP](gex, true)
|
63
|
+
|
58
64
|
// old tar versions marked dirs as a file with a trailing /
|
59
65
|
this[TYPE] = decString(buf, off + 156, 1)
|
60
66
|
if (this[TYPE] === '')
|
@@ -101,6 +107,16 @@ class Header {
|
|
101
107
|
this.nullBlock = true
|
102
108
|
}
|
103
109
|
|
110
|
+
[SLURP] (ex, global) {
|
111
|
+
for (let k in ex) {
|
112
|
+
// we slurp in everything except for the path attribute in
|
113
|
+
// a global extended header, because that's weird.
|
114
|
+
if (ex[k] !== null && ex[k] !== undefined &&
|
115
|
+
!(global && k === 'path'))
|
116
|
+
this[k] = ex[k]
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
104
120
|
encode (buf, off) {
|
105
121
|
if (!buf) {
|
106
122
|
buf = this.block = Buffer.alloc(512)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
'use strict'
|
2
|
+
module.exports = (mode, isDir) => {
|
3
|
+
mode &= 0o7777
|
4
|
+
// if dirs are readable, then they should be listable
|
5
|
+
if (isDir) {
|
6
|
+
if (mode & 0o400)
|
7
|
+
mode |= 0o100
|
8
|
+
if (mode & 0o40)
|
9
|
+
mode |= 0o10
|
10
|
+
if (mode & 0o4)
|
11
|
+
mode |= 0o1
|
12
|
+
}
|
13
|
+
return mode
|
14
|
+
}
|
@@ -71,6 +71,7 @@ const Pack = warner(class Pack extends MiniPass {
|
|
71
71
|
this.linkCache = opt.linkCache || new Map()
|
72
72
|
this.statCache = opt.statCache || new Map()
|
73
73
|
this.readdirCache = opt.readdirCache || new Map()
|
74
|
+
|
74
75
|
this[WRITEENTRYCLASS] = WriteEntry
|
75
76
|
if (typeof opt.onwarn === 'function')
|
76
77
|
this.on('warn', opt.onwarn)
|
@@ -29,6 +29,7 @@ const maxMetaEntrySize = 1024 * 1024
|
|
29
29
|
const Entry = require('./read-entry.js')
|
30
30
|
const Pax = require('./pax.js')
|
31
31
|
const zlib = require('minizlib')
|
32
|
+
const Buffer = require('./buffer.js')
|
32
33
|
|
33
34
|
const gzipHeader = Buffer.from([0x1f, 0x8b])
|
34
35
|
const STATE = Symbol('state')
|
@@ -101,7 +102,7 @@ module.exports = warner(class Parser extends EE {
|
|
101
102
|
}
|
102
103
|
|
103
104
|
[CONSUMEHEADER] (chunk, position) {
|
104
|
-
const header = new Header(chunk, position)
|
105
|
+
const header = new Header(chunk, position, this[EX], this[GEX])
|
105
106
|
|
106
107
|
if (header.nullBlock)
|
107
108
|
this[EMIT]('nullBlock')
|
@@ -12,6 +12,7 @@ const wc = require('./winchars.js')
|
|
12
12
|
|
13
13
|
const ONENTRY = Symbol('onEntry')
|
14
14
|
const CHECKFS = Symbol('checkFs')
|
15
|
+
const ISREUSABLE = Symbol('isReusable')
|
15
16
|
const MAKEFS = Symbol('makeFs')
|
16
17
|
const FILE = Symbol('file')
|
17
18
|
const DIRECTORY = Symbol('directory')
|
@@ -32,6 +33,45 @@ const SKIP = Symbol('skip')
|
|
32
33
|
const DOCHOWN = Symbol('doChown')
|
33
34
|
const UID = Symbol('uid')
|
34
35
|
const GID = Symbol('gid')
|
36
|
+
const crypto = require('crypto')
|
37
|
+
|
38
|
+
// Unlinks on Windows are not atomic.
|
39
|
+
//
|
40
|
+
// This means that if you have a file entry, followed by another
|
41
|
+
// file entry with an identical name, and you cannot re-use the file
|
42
|
+
// (because it's a hardlink, or because unlink:true is set, or it's
|
43
|
+
// Windows, which does not have useful nlink values), then the unlink
|
44
|
+
// will be committed to the disk AFTER the new file has been written
|
45
|
+
// over the old one, deleting the new file.
|
46
|
+
//
|
47
|
+
// To work around this, on Windows systems, we rename the file and then
|
48
|
+
// delete the renamed file. It's a sloppy kludge, but frankly, I do not
|
49
|
+
// know of a better way to do this, given windows' non-atomic unlink
|
50
|
+
// semantics.
|
51
|
+
//
|
52
|
+
// See: https://github.com/npm/node-tar/issues/183
|
53
|
+
/* istanbul ignore next */
|
54
|
+
const unlinkFile = (path, cb) => {
|
55
|
+
if (process.platform !== 'win32')
|
56
|
+
return fs.unlink(path, cb)
|
57
|
+
|
58
|
+
const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
|
59
|
+
fs.rename(path, name, er => {
|
60
|
+
if (er)
|
61
|
+
return cb(er)
|
62
|
+
fs.unlink(name, cb)
|
63
|
+
})
|
64
|
+
}
|
65
|
+
|
66
|
+
/* istanbul ignore next */
|
67
|
+
const unlinkFileSync = path => {
|
68
|
+
if (process.platform !== 'win32')
|
69
|
+
return fs.unlinkSync(path)
|
70
|
+
|
71
|
+
const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
|
72
|
+
fs.renameSync(path, name)
|
73
|
+
fs.unlinkSync(name)
|
74
|
+
}
|
35
75
|
|
36
76
|
// this.gid, entry.gid, this.processUid
|
37
77
|
const uint32 = (a, b, c) =>
|
@@ -138,6 +178,12 @@ class Unpack extends Parser {
|
|
138
178
|
if (parts.length < this.strip)
|
139
179
|
return false
|
140
180
|
entry.path = parts.slice(this.strip).join('/')
|
181
|
+
|
182
|
+
if (entry.type === 'Link') {
|
183
|
+
const linkparts = entry.linkpath.split(/\/|\\/)
|
184
|
+
if (linkparts.length >= this.strip)
|
185
|
+
entry.linkpath = linkparts.slice(this.strip).join('/')
|
186
|
+
}
|
141
187
|
}
|
142
188
|
|
143
189
|
if (!this.preservePaths) {
|
@@ -291,8 +337,10 @@ class Unpack extends Parser {
|
|
291
337
|
})
|
292
338
|
|
293
339
|
const tx = this.transform ? this.transform(entry) || entry : entry
|
294
|
-
if (tx !== entry)
|
340
|
+
if (tx !== entry) {
|
341
|
+
tx.on('error', er => this[ONERROR](er, entry))
|
295
342
|
entry.pipe(tx)
|
343
|
+
}
|
296
344
|
tx.pipe(stream)
|
297
345
|
}
|
298
346
|
|
@@ -351,6 +399,17 @@ class Unpack extends Parser {
|
|
351
399
|
entry.resume()
|
352
400
|
}
|
353
401
|
|
402
|
+
// Check if we can reuse an existing filesystem entry safely and
|
403
|
+
// overwrite it, rather than unlinking and recreating
|
404
|
+
// Windows doesn't report a useful nlink, so we just never reuse entries
|
405
|
+
[ISREUSABLE] (entry, st) {
|
406
|
+
return entry.type === 'File' &&
|
407
|
+
!this.unlink &&
|
408
|
+
st.isFile() &&
|
409
|
+
st.nlink <= 1 &&
|
410
|
+
process.platform !== 'win32'
|
411
|
+
}
|
412
|
+
|
354
413
|
// check if a thing is there, and if so, try to clobber it
|
355
414
|
[CHECKFS] (entry) {
|
356
415
|
this[PEND]()
|
@@ -360,7 +419,7 @@ class Unpack extends Parser {
|
|
360
419
|
fs.lstat(entry.absolute, (er, st) => {
|
361
420
|
if (st && (this.keep || this.newer && st.mtime > entry.mtime))
|
362
421
|
this[SKIP](entry)
|
363
|
-
else if (er || (entry
|
422
|
+
else if (er || this[ISREUSABLE](entry, st))
|
364
423
|
this[MAKEFS](null, entry)
|
365
424
|
else if (st.isDirectory()) {
|
366
425
|
if (entry.type === 'Directory') {
|
@@ -371,7 +430,7 @@ class Unpack extends Parser {
|
|
371
430
|
} else
|
372
431
|
fs.rmdir(entry.absolute, er => this[MAKEFS](er, entry))
|
373
432
|
} else
|
374
|
-
|
433
|
+
unlinkFile(entry.absolute, er => this[MAKEFS](er, entry))
|
375
434
|
})
|
376
435
|
})
|
377
436
|
}
|
@@ -422,7 +481,7 @@ class UnpackSync extends Unpack {
|
|
422
481
|
const st = fs.lstatSync(entry.absolute)
|
423
482
|
if (this.keep || this.newer && st.mtime > entry.mtime)
|
424
483
|
return this[SKIP](entry)
|
425
|
-
else if (entry
|
484
|
+
else if (this[ISREUSABLE](entry, st))
|
426
485
|
return this[MAKEFS](null, entry)
|
427
486
|
else {
|
428
487
|
try {
|
@@ -433,7 +492,7 @@ class UnpackSync extends Unpack {
|
|
433
492
|
} else
|
434
493
|
fs.rmdirSync(entry.absolute)
|
435
494
|
} else
|
436
|
-
|
495
|
+
unlinkFileSync(entry.absolute)
|
437
496
|
return this[MAKEFS](null, entry)
|
438
497
|
} catch (er) {
|
439
498
|
return this[ONERROR](er, entry)
|
@@ -461,8 +520,10 @@ class UnpackSync extends Unpack {
|
|
461
520
|
return oner(er)
|
462
521
|
}
|
463
522
|
const tx = this.transform ? this.transform(entry) || entry : entry
|
464
|
-
if (tx !== entry)
|
523
|
+
if (tx !== entry) {
|
524
|
+
tx.on('error', er => this[ONERROR](er, entry))
|
465
525
|
entry.pipe(tx)
|
526
|
+
}
|
466
527
|
|
467
528
|
tx.on('data', chunk => {
|
468
529
|
try {
|
@@ -23,9 +23,12 @@ const ONREADLINK = Symbol('onreadlink')
|
|
23
23
|
const OPENFILE = Symbol('openfile')
|
24
24
|
const ONOPENFILE = Symbol('onopenfile')
|
25
25
|
const CLOSE = Symbol('close')
|
26
|
+
const MODE = Symbol('mode')
|
26
27
|
const warner = require('./warn-mixin.js')
|
27
28
|
const winchars = require('./winchars.js')
|
28
29
|
|
30
|
+
const modeFix = require('./mode-fix.js')
|
31
|
+
|
29
32
|
const WriteEntry = warner(class WriteEntry extends MiniPass {
|
30
33
|
constructor (p, opt) {
|
31
34
|
opt = opt || {}
|
@@ -104,6 +107,10 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
104
107
|
}
|
105
108
|
}
|
106
109
|
|
110
|
+
[MODE] (mode) {
|
111
|
+
return modeFix(mode, this.type === 'Directory')
|
112
|
+
}
|
113
|
+
|
107
114
|
[HEADER] () {
|
108
115
|
if (this.type === 'Directory' && this.portable)
|
109
116
|
this.noMtime = true
|
@@ -113,7 +120,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
113
120
|
linkpath: this.linkpath,
|
114
121
|
// only the permissions and setuid/setgid/sticky bitflags
|
115
122
|
// not the higher-order bits that specify file type
|
116
|
-
mode: this.stat.mode
|
123
|
+
mode: this[MODE](this.stat.mode),
|
117
124
|
uid: this.portable ? null : this.stat.uid,
|
118
125
|
gid: this.portable ? null : this.stat.gid,
|
119
126
|
size: this.stat.size,
|
@@ -220,11 +227,21 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
220
227
|
|
221
228
|
[ONREAD] (fd, buf, offset, length, pos, remain, blockRemain, bytesRead) {
|
222
229
|
if (bytesRead <= 0 && remain > 0) {
|
223
|
-
const er = new Error('unexpected EOF')
|
230
|
+
const er = new Error('encountered unexpected EOF')
|
231
|
+
er.path = this.absolute
|
232
|
+
er.syscall = 'read'
|
233
|
+
er.code = 'EOF'
|
234
|
+
this[CLOSE](fd)
|
235
|
+
return this.emit('error', er)
|
236
|
+
}
|
237
|
+
|
238
|
+
if (bytesRead > remain) {
|
239
|
+
const er = new Error('did not encounter expected EOF')
|
224
240
|
er.path = this.absolute
|
225
241
|
er.syscall = 'read'
|
226
242
|
er.code = 'EOF'
|
227
|
-
this
|
243
|
+
this[CLOSE](fd)
|
244
|
+
return this.emit('error', er)
|
228
245
|
}
|
229
246
|
|
230
247
|
// null out the rest of the buffer, if we could fit the block padding
|
@@ -312,9 +329,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
312
329
|
this.noMtime = true
|
313
330
|
|
314
331
|
this.path = readEntry.path
|
315
|
-
this.mode = readEntry.mode
|
316
|
-
if (this.mode)
|
317
|
-
this.mode = this.mode & 0o7777
|
332
|
+
this.mode = this[MODE](readEntry.mode)
|
318
333
|
this.uid = this.portable ? null : readEntry.uid
|
319
334
|
this.gid = this.portable ? null : readEntry.gid
|
320
335
|
this.uname = this.portable ? null : readEntry.uname
|
@@ -376,6 +391,10 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
376
391
|
readEntry.pipe(this)
|
377
392
|
}
|
378
393
|
|
394
|
+
[MODE] (mode) {
|
395
|
+
return modeFix(mode, this.type === 'Directory')
|
396
|
+
}
|
397
|
+
|
379
398
|
write (data) {
|
380
399
|
const writeLen = data.length
|
381
400
|
if (writeLen > this.blockRemain)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "tar@^4",
|
3
|
-
"_id": "tar@4.4.
|
3
|
+
"_id": "tar@4.4.8",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
|
6
6
|
"_location": "/tar",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"_requiredBy": [
|
19
19
|
"/node-pre-gyp"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.
|
22
|
-
"_shasum": "
|
21
|
+
"_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
|
22
|
+
"_shasum": "b19eec3fde2a96e64666df9fdb40c5ca1bc3747d",
|
23
23
|
"_spec": "tar@^4",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/node-pre-gyp",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -32,25 +32,25 @@
|
|
32
32
|
},
|
33
33
|
"bundleDependencies": false,
|
34
34
|
"dependencies": {
|
35
|
-
"chownr": "^1.
|
35
|
+
"chownr": "^1.1.1",
|
36
36
|
"fs-minipass": "^1.2.5",
|
37
|
-
"minipass": "^2.
|
38
|
-
"minizlib": "^1.1.
|
37
|
+
"minipass": "^2.3.4",
|
38
|
+
"minizlib": "^1.1.1",
|
39
39
|
"mkdirp": "^0.5.0",
|
40
|
-
"safe-buffer": "^5.1.
|
40
|
+
"safe-buffer": "^5.1.2",
|
41
41
|
"yallist": "^3.0.2"
|
42
42
|
},
|
43
43
|
"deprecated": false,
|
44
44
|
"description": "tar for node",
|
45
45
|
"devDependencies": {
|
46
|
-
"chmodr": "^1.0
|
46
|
+
"chmodr": "^1.2.0",
|
47
47
|
"end-of-stream": "^1.4.1",
|
48
48
|
"events-to-array": "^1.1.2",
|
49
49
|
"mutate-fs": "^2.1.1",
|
50
50
|
"rimraf": "^2.6.2",
|
51
|
-
"tap": "^
|
52
|
-
"tar-fs": "^1.16.
|
53
|
-
"tar-stream": "^1.
|
51
|
+
"tap": "^12.0.1",
|
52
|
+
"tar-fs": "^1.16.3",
|
53
|
+
"tar-stream": "^1.6.2"
|
54
54
|
},
|
55
55
|
"engines": {
|
56
56
|
"node": ">=4.5"
|
@@ -74,5 +74,5 @@
|
|
74
74
|
"preversion": "npm test",
|
75
75
|
"test": "tap test/*.js --100 -J --coverage-report=text -c"
|
76
76
|
},
|
77
|
-
"version": "4.4.
|
77
|
+
"version": "4.4.8"
|
78
78
|
}
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
22
22
|
"_shasum": "450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
23
23
|
"_spec": "util-deprecate@~1.0.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/readable-stream",
|
25
25
|
"author": {
|
26
26
|
"name": "Nathan Rajlich",
|
27
27
|
"email": "nathan@tootallnate.net",
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "wide-align@^1.1.0",
|
3
|
-
"_id": "wide-align@1.1.
|
3
|
+
"_id": "wide-align@1.1.3",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
6
6
|
"_location": "/wide-align",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"_requiredBy": [
|
19
19
|
"/gauge"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.
|
22
|
-
"_shasum": "
|
21
|
+
"_resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
22
|
+
"_shasum": "ae074e6bdc0c14a431e804e624549c633b000457",
|
23
23
|
"_spec": "wide-align@^1.1.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"email": "me@re-becca.org",
|
@@ -32,12 +32,12 @@
|
|
32
32
|
},
|
33
33
|
"bundleDependencies": false,
|
34
34
|
"dependencies": {
|
35
|
-
"string-width": "^1.0.2"
|
35
|
+
"string-width": "^1.0.2 || 2"
|
36
36
|
},
|
37
37
|
"deprecated": false,
|
38
38
|
"description": "A wide-character aware text alignment function for use on the console or with fixed width fonts.",
|
39
39
|
"devDependencies": {
|
40
|
-
"tap": "
|
40
|
+
"tap": "10 || 11 || 12"
|
41
41
|
},
|
42
42
|
"files": [
|
43
43
|
"align.js"
|
@@ -62,5 +62,5 @@
|
|
62
62
|
"test": "tap --coverage test/*.js",
|
63
63
|
"version": "perl -pi -e 's/^( \"version\": $ENV{npm_config_node_version}\").*?\",/$1abc\",/' package-lock.json ; git add package-lock.json"
|
64
64
|
},
|
65
|
-
"version": "1.1.
|
65
|
+
"version": "1.1.3"
|
66
66
|
}
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
23
23
|
"_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
|
24
24
|
"_spec": "wrappy@1",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/inflight",
|
26
26
|
"author": {
|
27
27
|
"name": "Isaac Z. Schlueter",
|
28
28
|
"email": "i@izs.me",
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use strict'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
module.exports = function (Yallist) {
|
3
|
+
Yallist.prototype[Symbol.iterator] = function* () {
|
4
|
+
for (let walker = this.head; walker; walker = walker.next) {
|
5
|
+
yield walker.value
|
6
|
+
}
|
7
7
|
}
|
8
8
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "yallist@^3.0.2",
|
3
|
-
"_id": "yallist@3.0.
|
3
|
+
"_id": "yallist@3.0.3",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "
|
5
|
+
"_integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
|
6
6
|
"_location": "/yallist",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -19,10 +19,10 @@
|
|
19
19
|
"/minipass",
|
20
20
|
"/tar"
|
21
21
|
],
|
22
|
-
"_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.
|
23
|
-
"_shasum": "
|
22
|
+
"_resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
|
23
|
+
"_shasum": "b4b049e314be545e3ce802236d6cd22cd91c3de9",
|
24
24
|
"_spec": "yallist@^3.0.2",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/tar",
|
26
26
|
"author": {
|
27
27
|
"name": "Isaac Z. Schlueter",
|
28
28
|
"email": "i@izs.me",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"deprecated": false,
|
37
37
|
"description": "Yet Another Linked List",
|
38
38
|
"devDependencies": {
|
39
|
-
"tap": "^
|
39
|
+
"tap": "^12.1.0"
|
40
40
|
},
|
41
41
|
"directories": {
|
42
42
|
"test": "test"
|
@@ -59,5 +59,5 @@
|
|
59
59
|
"preversion": "npm test",
|
60
60
|
"test": "tap test/*.js --100"
|
61
61
|
},
|
62
|
-
"version": "3.0.
|
62
|
+
"version": "3.0.3"
|
63
63
|
}
|
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "fsevents",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.7",
|
4
4
|
"description": "Native Access to Mac OS-X FSEvents",
|
5
5
|
"main": "fsevents.js",
|
6
6
|
"dependencies": {
|
7
7
|
"nan": "^2.9.2",
|
8
|
-
"node-pre-gyp": "^0.
|
8
|
+
"node-pre-gyp": "^0.10.0"
|
9
9
|
},
|
10
10
|
"os": [
|
11
11
|
"darwin"
|
12
12
|
],
|
13
13
|
"engines": {
|
14
|
-
"node": ">=
|
14
|
+
"node": ">=4.0"
|
15
15
|
},
|
16
16
|
"scripts": {
|
17
17
|
"install": "node install",
|
package/src/async.cc
CHANGED
@@ -11,7 +11,7 @@ void async_propagate(uv_async_t *async) {
|
|
11
11
|
fse_event *event;
|
12
12
|
char pathbuf[1024];
|
13
13
|
const char *pathptr = NULL;
|
14
|
-
fse->
|
14
|
+
uv_mutex_lock(&fse->mutex);
|
15
15
|
cnt = fse->events.size();
|
16
16
|
for (idx=0; idx<cnt; idx++) {
|
17
17
|
event = fse->events.at(idx);
|
@@ -22,7 +22,7 @@ void async_propagate(uv_async_t *async) {
|
|
22
22
|
delete event;
|
23
23
|
}
|
24
24
|
if (cnt>0) fse->events.clear();
|
25
|
-
fse->
|
25
|
+
uv_mutex_unlock(&fse->mutex);
|
26
26
|
}
|
27
27
|
|
28
28
|
void FSEvents::asyncStart() {
|
package/src/methods.cc
CHANGED
@@ -4,28 +4,30 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
void FSEvents::emitEvent(const char *path, UInt32 flags, UInt64 id) {
|
7
|
-
if (!handler) return;
|
8
7
|
Nan::HandleScope handle_scope;
|
8
|
+
v8::Local<v8::Object> object = handle();
|
9
|
+
v8::Local<v8::Value> key = Nan::New<v8::String>("handler").ToLocalChecked();
|
10
|
+
Nan::Callback handler(Nan::To<v8::Function>(Nan::Get(object, key).ToLocalChecked()).ToLocalChecked());
|
9
11
|
v8::Local<v8::Value> argv[] = {
|
10
12
|
Nan::New<v8::String>(path).ToLocalChecked(),
|
11
13
|
Nan::New<v8::Number>(flags),
|
12
14
|
Nan::New<v8::Number>(id)
|
13
15
|
};
|
14
|
-
handler
|
16
|
+
handler.Call(3, argv, &async_resource);
|
15
17
|
}
|
16
18
|
|
17
19
|
NAN_METHOD(FSEvents::New) {
|
18
|
-
Nan::Utf8String
|
19
|
-
Nan::Callback *callback = new Nan::Callback(info[1].As<v8::Function>());
|
20
|
+
Nan::Utf8String path(info[0]);
|
20
21
|
|
21
|
-
FSEvents *fse = new FSEvents(
|
22
|
+
FSEvents *fse = new FSEvents(*path);
|
22
23
|
fse->Wrap(info.This());
|
24
|
+
Nan::Set(info.This(), Nan::New<v8::String>("handler").ToLocalChecked(), info[1]);
|
23
25
|
|
24
26
|
info.GetReturnValue().Set(info.This());
|
25
27
|
}
|
26
28
|
|
27
29
|
NAN_METHOD(FSEvents::Stop) {
|
28
|
-
FSEvents* fse =
|
30
|
+
FSEvents* fse = Nan::ObjectWrap::Unwrap<FSEvents>(info.This());
|
29
31
|
|
30
32
|
fse->threadStop();
|
31
33
|
fse->asyncStop();
|
@@ -34,7 +36,7 @@ NAN_METHOD(FSEvents::Stop) {
|
|
34
36
|
}
|
35
37
|
|
36
38
|
NAN_METHOD(FSEvents::Start) {
|
37
|
-
FSEvents* fse =
|
39
|
+
FSEvents* fse = Nan::ObjectWrap::Unwrap<FSEvents>(info.This());
|
38
40
|
fse->asyncStart();
|
39
41
|
fse->threadStart();
|
40
42
|
|
package/src/thread.cc
CHANGED
@@ -30,13 +30,13 @@
|
|
30
30
|
|
31
31
|
void FSEvents::threadStart() {
|
32
32
|
if (threadloop) return;
|
33
|
-
|
33
|
+
if (uv_thread_create(&thread, &FSEvents::threadRun, this)) abort();
|
34
34
|
}
|
35
35
|
|
36
36
|
void HandleStreamEvents(ConstFSEventStreamRef stream, void *ctx, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) {
|
37
37
|
FSEvents * fse = (FSEvents *)ctx;
|
38
38
|
size_t idx;
|
39
|
-
fse->
|
39
|
+
uv_mutex_lock(&fse->mutex);
|
40
40
|
for (idx=0; idx < numEvents; idx++) {
|
41
41
|
fse_event *event = new fse_event(
|
42
42
|
(CFStringRef)CFArrayGetValueAtIndex((CFArrayRef)eventPaths, idx),
|
@@ -46,10 +46,10 @@ void HandleStreamEvents(ConstFSEventStreamRef stream, void *ctx, size_t numEvent
|
|
46
46
|
fse->events.push_back(event);
|
47
47
|
}
|
48
48
|
fse->asyncTrigger();
|
49
|
-
fse->
|
49
|
+
uv_mutex_unlock(&fse->mutex);
|
50
50
|
}
|
51
51
|
|
52
|
-
void
|
52
|
+
void FSEvents::threadRun(void *ctx) {
|
53
53
|
FSEvents *fse = (FSEvents*)ctx;
|
54
54
|
FSEventStreamContext context = { 0, ctx, NULL, NULL, NULL };
|
55
55
|
fse->threadloop = CFRunLoopGetCurrent();
|
@@ -62,11 +62,10 @@ void *FSEvents::threadRun(void *ctx) {
|
|
62
62
|
FSEventStreamInvalidate(stream);
|
63
63
|
FSEventStreamRelease(stream);
|
64
64
|
fse->threadloop = NULL;
|
65
|
-
return NULL;
|
66
65
|
}
|
67
66
|
|
68
67
|
void FSEvents::threadStop() {
|
69
68
|
if (!threadloop) return;
|
70
69
|
CFRunLoopStop(threadloop);
|
71
|
-
|
70
|
+
if (uv_thread_join(&thread)) abort();
|
72
71
|
}
|
package/.npmignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
test/
|