tar 4.4.12 → 4.4.16
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/extract.js +4 -3
- package/lib/list.js +4 -3
- package/lib/mkdir.js +55 -48
- package/lib/normalize-windows-path.js +8 -0
- package/lib/pack.js +8 -18
- package/lib/path-reservations.js +127 -0
- package/lib/read-entry.js +4 -3
- package/lib/replace.js +2 -1
- package/lib/strip-absolute-path.js +14 -0
- package/lib/strip-trailing-slashes.js +24 -0
- package/lib/unpack.js +238 -85
- package/lib/write-entry.js +178 -82
- package/package.json +18 -12
package/lib/write-entry.js
CHANGED
|
@@ -6,8 +6,16 @@ const Header = require('./header.js')
|
|
|
6
6
|
const ReadEntry = require('./read-entry.js')
|
|
7
7
|
const fs = require('fs')
|
|
8
8
|
const path = require('path')
|
|
9
|
+
const normPath = require('./normalize-windows-path.js')
|
|
10
|
+
const stripSlash = require('./strip-trailing-slashes.js')
|
|
11
|
+
|
|
12
|
+
const prefixPath = (path, prefix) => {
|
|
13
|
+
if (!prefix)
|
|
14
|
+
return path
|
|
15
|
+
path = normPath(path).replace(/^\.(\/|$)/, '')
|
|
16
|
+
return stripSlash(prefix) + '/' + path
|
|
17
|
+
}
|
|
9
18
|
|
|
10
|
-
const types = require('./types.js')
|
|
11
19
|
const maxReadSize = 16 * 1024 * 1024
|
|
12
20
|
const PROCESS = Symbol('process')
|
|
13
21
|
const FILE = Symbol('file')
|
|
@@ -24,8 +32,13 @@ const OPENFILE = Symbol('openfile')
|
|
|
24
32
|
const ONOPENFILE = Symbol('onopenfile')
|
|
25
33
|
const CLOSE = Symbol('close')
|
|
26
34
|
const MODE = Symbol('mode')
|
|
35
|
+
const AWAITDRAIN = Symbol('awaitDrain')
|
|
36
|
+
const ONDRAIN = Symbol('ondrain')
|
|
37
|
+
const PREFIX = Symbol('prefix')
|
|
38
|
+
const HAD_ERROR = Symbol('hadError')
|
|
27
39
|
const warner = require('./warn-mixin.js')
|
|
28
40
|
const winchars = require('./winchars.js')
|
|
41
|
+
const stripAbsolutePath = require('./strip-absolute-path.js')
|
|
29
42
|
|
|
30
43
|
const modeFix = require('./mode-fix.js')
|
|
31
44
|
|
|
@@ -35,40 +48,52 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
35
48
|
super(opt)
|
|
36
49
|
if (typeof p !== 'string')
|
|
37
50
|
throw new TypeError('path is required')
|
|
38
|
-
this.path = p
|
|
51
|
+
this.path = normPath(p)
|
|
39
52
|
// suppress atime, ctime, uid, gid, uname, gname
|
|
40
53
|
this.portable = !!opt.portable
|
|
41
54
|
// until node has builtin pwnam functions, this'll have to do
|
|
42
|
-
this.myuid = process.getuid && process.getuid()
|
|
55
|
+
this.myuid = process.getuid && process.getuid() || 0
|
|
43
56
|
this.myuser = process.env.USER || ''
|
|
44
57
|
this.maxReadSize = opt.maxReadSize || maxReadSize
|
|
45
58
|
this.linkCache = opt.linkCache || new Map()
|
|
46
59
|
this.statCache = opt.statCache || new Map()
|
|
47
60
|
this.preservePaths = !!opt.preservePaths
|
|
48
|
-
this.cwd = opt.cwd || process.cwd()
|
|
61
|
+
this.cwd = normPath(opt.cwd || process.cwd())
|
|
49
62
|
this.strict = !!opt.strict
|
|
50
63
|
this.noPax = !!opt.noPax
|
|
51
64
|
this.noMtime = !!opt.noMtime
|
|
52
65
|
this.mtime = opt.mtime || null
|
|
66
|
+
this.prefix = opt.prefix ? normPath(opt.prefix) : null
|
|
67
|
+
|
|
68
|
+
this.fd = null
|
|
69
|
+
this.blockLen = null
|
|
70
|
+
this.blockRemain = null
|
|
71
|
+
this.buf = null
|
|
72
|
+
this.offset = null
|
|
73
|
+
this.length = null
|
|
74
|
+
this.pos = null
|
|
75
|
+
this.remain = null
|
|
53
76
|
|
|
54
77
|
if (typeof opt.onwarn === 'function')
|
|
55
78
|
this.on('warn', opt.onwarn)
|
|
56
79
|
|
|
57
|
-
if (!this.preservePaths
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
80
|
+
if (!this.preservePaths) {
|
|
81
|
+
const s = stripAbsolutePath(this.path)
|
|
82
|
+
if (s[0]) {
|
|
83
|
+
this.warn('stripping ' + s[0] + ' from absolute path', this.path)
|
|
84
|
+
this.path = s[1]
|
|
85
|
+
}
|
|
63
86
|
}
|
|
64
87
|
|
|
65
88
|
this.win32 = !!opt.win32 || process.platform === 'win32'
|
|
66
89
|
if (this.win32) {
|
|
90
|
+
// force the \ to / normalization, since we might not *actually*
|
|
91
|
+
// be on windows, but want \ to be considered a path separator.
|
|
67
92
|
this.path = winchars.decode(this.path.replace(/\\/g, '/'))
|
|
68
93
|
p = p.replace(/\\/g, '/')
|
|
69
94
|
}
|
|
70
95
|
|
|
71
|
-
this.absolute = opt.absolute || path.resolve(this.cwd, p)
|
|
96
|
+
this.absolute = normPath(opt.absolute || path.resolve(this.cwd, p))
|
|
72
97
|
|
|
73
98
|
if (this.path === '')
|
|
74
99
|
this.path = './'
|
|
@@ -79,6 +104,12 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
79
104
|
this[LSTAT]()
|
|
80
105
|
}
|
|
81
106
|
|
|
107
|
+
emit (ev, ...data) {
|
|
108
|
+
if (ev === 'error')
|
|
109
|
+
this[HAD_ERROR] = true
|
|
110
|
+
return super.emit(ev, ...data)
|
|
111
|
+
}
|
|
112
|
+
|
|
82
113
|
[LSTAT] () {
|
|
83
114
|
fs.lstat(this.absolute, (er, stat) => {
|
|
84
115
|
if (er)
|
|
@@ -111,13 +142,19 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
111
142
|
return modeFix(mode, this.type === 'Directory')
|
|
112
143
|
}
|
|
113
144
|
|
|
145
|
+
[PREFIX] (path) {
|
|
146
|
+
return prefixPath(path, this.prefix)
|
|
147
|
+
}
|
|
148
|
+
|
|
114
149
|
[HEADER] () {
|
|
115
150
|
if (this.type === 'Directory' && this.portable)
|
|
116
151
|
this.noMtime = true
|
|
117
152
|
|
|
118
153
|
this.header = new Header({
|
|
119
|
-
path: this.path,
|
|
120
|
-
|
|
154
|
+
path: this[PREFIX](this.path),
|
|
155
|
+
// only apply the prefix to hard links.
|
|
156
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
157
|
+
: this.linkpath,
|
|
121
158
|
// only the permissions and setuid/setgid/sticky bitflags
|
|
122
159
|
// not the higher-order bits that specify file type
|
|
123
160
|
mode: this[MODE](this.stat.mode),
|
|
@@ -132,14 +169,15 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
132
169
|
ctime: this.portable ? null : this.stat.ctime
|
|
133
170
|
})
|
|
134
171
|
|
|
135
|
-
if (this.header.encode() && !this.noPax)
|
|
136
|
-
|
|
172
|
+
if (this.header.encode() && !this.noPax) {
|
|
173
|
+
super.write(new Pax({
|
|
137
174
|
atime: this.portable ? null : this.header.atime,
|
|
138
175
|
ctime: this.portable ? null : this.header.ctime,
|
|
139
176
|
gid: this.portable ? null : this.header.gid,
|
|
140
177
|
mtime: this.noMtime ? null : this.mtime || this.header.mtime,
|
|
141
|
-
path: this.path,
|
|
142
|
-
linkpath: this.linkpath
|
|
178
|
+
path: this[PREFIX](this.path),
|
|
179
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
180
|
+
: this.linkpath,
|
|
143
181
|
size: this.header.size,
|
|
144
182
|
uid: this.portable ? null : this.header.uid,
|
|
145
183
|
uname: this.portable ? null : this.header.uname,
|
|
@@ -147,7 +185,8 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
147
185
|
ino: this.portable ? null : this.stat.ino,
|
|
148
186
|
nlink: this.portable ? null : this.stat.nlink
|
|
149
187
|
}).encode())
|
|
150
|
-
|
|
188
|
+
}
|
|
189
|
+
super.write(this.header.block)
|
|
151
190
|
}
|
|
152
191
|
|
|
153
192
|
[DIRECTORY] () {
|
|
@@ -167,14 +206,14 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
167
206
|
}
|
|
168
207
|
|
|
169
208
|
[ONREADLINK] (linkpath) {
|
|
170
|
-
this.linkpath = linkpath
|
|
209
|
+
this.linkpath = normPath(linkpath)
|
|
171
210
|
this[HEADER]()
|
|
172
211
|
this.end()
|
|
173
212
|
}
|
|
174
213
|
|
|
175
214
|
[HARDLINK] (linkpath) {
|
|
176
215
|
this.type = 'Link'
|
|
177
|
-
this.linkpath = path.relative(this.cwd, linkpath)
|
|
216
|
+
this.linkpath = normPath(path.relative(this.cwd, linkpath))
|
|
178
217
|
this.stat.size = 0
|
|
179
218
|
this[HEADER]()
|
|
180
219
|
this.end()
|
|
@@ -207,75 +246,111 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
|
|
|
207
246
|
}
|
|
208
247
|
|
|
209
248
|
[ONOPENFILE] (fd) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
249
|
+
this.fd = fd
|
|
250
|
+
if (this[HAD_ERROR])
|
|
251
|
+
return this[CLOSE]()
|
|
252
|
+
|
|
253
|
+
this.blockLen = 512 * Math.ceil(this.stat.size / 512)
|
|
254
|
+
this.blockRemain = this.blockLen
|
|
255
|
+
const bufLen = Math.min(this.blockLen, this.maxReadSize)
|
|
256
|
+
this.buf = Buffer.allocUnsafe(bufLen)
|
|
257
|
+
this.offset = 0
|
|
258
|
+
this.pos = 0
|
|
259
|
+
this.remain = this.stat.size
|
|
260
|
+
this.length = this.buf.length
|
|
261
|
+
this[READ]()
|
|
214
262
|
}
|
|
215
263
|
|
|
216
|
-
[READ] (
|
|
264
|
+
[READ] () {
|
|
265
|
+
const { fd, buf, offset, length, pos } = this
|
|
217
266
|
fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {
|
|
218
|
-
if (er)
|
|
219
|
-
|
|
220
|
-
|
|
267
|
+
if (er) {
|
|
268
|
+
// ignoring the error from close(2) is a bad practice, but at
|
|
269
|
+
// this point we already have an error, don't need another one
|
|
270
|
+
return this[CLOSE](() => this.emit('error', er))
|
|
271
|
+
}
|
|
272
|
+
this[ONREAD](bytesRead)
|
|
221
273
|
})
|
|
222
274
|
}
|
|
223
275
|
|
|
224
|
-
[CLOSE] (
|
|
225
|
-
fs.close(fd, cb)
|
|
276
|
+
[CLOSE] (cb) {
|
|
277
|
+
fs.close(this.fd, cb)
|
|
226
278
|
}
|
|
227
279
|
|
|
228
|
-
[ONREAD] (
|
|
229
|
-
if (bytesRead <= 0 && remain > 0) {
|
|
280
|
+
[ONREAD] (bytesRead) {
|
|
281
|
+
if (bytesRead <= 0 && this.remain > 0) {
|
|
230
282
|
const er = new Error('encountered unexpected EOF')
|
|
231
283
|
er.path = this.absolute
|
|
232
284
|
er.syscall = 'read'
|
|
233
285
|
er.code = 'EOF'
|
|
234
|
-
this[CLOSE](
|
|
235
|
-
return this.emit('error', er)
|
|
286
|
+
return this[CLOSE](() => this.emit('error', er))
|
|
236
287
|
}
|
|
237
288
|
|
|
238
|
-
if (bytesRead > remain) {
|
|
289
|
+
if (bytesRead > this.remain) {
|
|
239
290
|
const er = new Error('did not encounter expected EOF')
|
|
240
291
|
er.path = this.absolute
|
|
241
292
|
er.syscall = 'read'
|
|
242
293
|
er.code = 'EOF'
|
|
243
|
-
this[CLOSE](
|
|
244
|
-
return this.emit('error', er)
|
|
294
|
+
return this[CLOSE](() => this.emit('error', er))
|
|
245
295
|
}
|
|
246
296
|
|
|
247
297
|
// null out the rest of the buffer, if we could fit the block padding
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
298
|
+
// at the end of this loop, we've incremented bytesRead and this.remain
|
|
299
|
+
// to be incremented up to the blockRemain level, as if we had expected
|
|
300
|
+
// to get a null-padded file, and read it until the end. then we will
|
|
301
|
+
// decrement both remain and blockRemain by bytesRead, and know that we
|
|
302
|
+
// reached the expected EOF, without any null buffer to append.
|
|
303
|
+
if (bytesRead === this.remain) {
|
|
304
|
+
for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) {
|
|
305
|
+
this.buf[i + this.offset] = 0
|
|
306
|
+
bytesRead++
|
|
307
|
+
this.remain++
|
|
253
308
|
}
|
|
254
309
|
}
|
|
255
310
|
|
|
256
|
-
const writeBuf = offset === 0 && bytesRead === buf.length ?
|
|
257
|
-
buf : buf.slice(offset, offset + bytesRead)
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
311
|
+
const writeBuf = this.offset === 0 && bytesRead === this.buf.length ?
|
|
312
|
+
this.buf : this.buf.slice(this.offset, this.offset + bytesRead)
|
|
313
|
+
|
|
314
|
+
const flushed = this.write(writeBuf)
|
|
315
|
+
if (!flushed)
|
|
316
|
+
this[AWAITDRAIN](() => this[ONDRAIN]())
|
|
317
|
+
else
|
|
318
|
+
this[ONDRAIN]()
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
[AWAITDRAIN] (cb) {
|
|
322
|
+
this.once('drain', cb)
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
write (writeBuf) {
|
|
326
|
+
if (this.blockRemain < writeBuf.length) {
|
|
327
|
+
const er = new Error('writing more data than expected')
|
|
328
|
+
er.path = this.absolute
|
|
329
|
+
return this.emit('error', er)
|
|
330
|
+
}
|
|
331
|
+
this.remain -= writeBuf.length
|
|
332
|
+
this.blockRemain -= writeBuf.length
|
|
333
|
+
this.pos += writeBuf.length
|
|
334
|
+
this.offset += writeBuf.length
|
|
335
|
+
return super.write(writeBuf)
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
[ONDRAIN] () {
|
|
339
|
+
if (!this.remain) {
|
|
340
|
+
if (this.blockRemain)
|
|
341
|
+
super.write(Buffer.alloc(this.blockRemain))
|
|
342
|
+
return this[CLOSE](/* istanbul ignore next - legacy */
|
|
343
|
+
er => er ? this.emit('error', er) : this.end())
|
|
271
344
|
}
|
|
272
345
|
|
|
273
|
-
if (offset >= length) {
|
|
274
|
-
|
|
275
|
-
|
|
346
|
+
if (this.offset >= this.length) {
|
|
347
|
+
// if we only have a smaller bit left to read, alloc a smaller buffer
|
|
348
|
+
// otherwise, keep it the same length it was before.
|
|
349
|
+
this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length))
|
|
350
|
+
this.offset = 0
|
|
276
351
|
}
|
|
277
|
-
length = buf.length - offset
|
|
278
|
-
this[READ](
|
|
352
|
+
this.length = this.buf.length - this.offset
|
|
353
|
+
this[READ]()
|
|
279
354
|
}
|
|
280
355
|
})
|
|
281
356
|
|
|
@@ -296,20 +371,31 @@ class WriteEntrySync extends WriteEntry {
|
|
|
296
371
|
this[ONOPENFILE](fs.openSync(this.absolute, 'r'))
|
|
297
372
|
}
|
|
298
373
|
|
|
299
|
-
[READ] (
|
|
374
|
+
[READ] () {
|
|
300
375
|
let threw = true
|
|
301
376
|
try {
|
|
377
|
+
const { fd, buf, offset, length, pos } = this
|
|
302
378
|
const bytesRead = fs.readSync(fd, buf, offset, length, pos)
|
|
303
|
-
this[ONREAD](
|
|
379
|
+
this[ONREAD](bytesRead)
|
|
304
380
|
threw = false
|
|
305
381
|
} finally {
|
|
306
|
-
|
|
307
|
-
|
|
382
|
+
// ignoring the error from close(2) is a bad practice, but at
|
|
383
|
+
// this point we already have an error, don't need another one
|
|
384
|
+
if (threw) {
|
|
385
|
+
try {
|
|
386
|
+
this[CLOSE](() => {})
|
|
387
|
+
} catch (er) {}
|
|
388
|
+
}
|
|
308
389
|
}
|
|
309
390
|
}
|
|
310
391
|
|
|
311
|
-
[
|
|
312
|
-
|
|
392
|
+
[AWAITDRAIN] (cb) {
|
|
393
|
+
cb()
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
[CLOSE] (cb) {
|
|
397
|
+
fs.closeSync(this.fd)
|
|
398
|
+
cb()
|
|
313
399
|
}
|
|
314
400
|
}
|
|
315
401
|
|
|
@@ -328,7 +414,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
328
414
|
if (this.type === 'Directory' && this.portable)
|
|
329
415
|
this.noMtime = true
|
|
330
416
|
|
|
331
|
-
this.
|
|
417
|
+
this.prefix = opt.prefix || null
|
|
418
|
+
|
|
419
|
+
this.path = normPath(readEntry.path)
|
|
332
420
|
this.mode = this[MODE](readEntry.mode)
|
|
333
421
|
this.uid = this.portable ? null : readEntry.uid
|
|
334
422
|
this.gid = this.portable ? null : readEntry.gid
|
|
@@ -338,26 +426,29 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
338
426
|
this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime
|
|
339
427
|
this.atime = this.portable ? null : readEntry.atime
|
|
340
428
|
this.ctime = this.portable ? null : readEntry.ctime
|
|
341
|
-
this.linkpath = readEntry.linkpath
|
|
429
|
+
this.linkpath = normPath(readEntry.linkpath)
|
|
342
430
|
|
|
343
431
|
if (typeof opt.onwarn === 'function')
|
|
344
432
|
this.on('warn', opt.onwarn)
|
|
345
433
|
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
434
|
+
if (!this.preservePaths) {
|
|
435
|
+
const s = stripAbsolutePath(this.path)
|
|
436
|
+
if (s[0]) {
|
|
437
|
+
this.warn(
|
|
438
|
+
'stripping ' + s[0] + ' from absolute path',
|
|
439
|
+
this.path
|
|
440
|
+
)
|
|
441
|
+
this.path = s[1]
|
|
442
|
+
}
|
|
353
443
|
}
|
|
354
444
|
|
|
355
445
|
this.remain = readEntry.size
|
|
356
446
|
this.blockRemain = readEntry.startBlockSize
|
|
357
447
|
|
|
358
448
|
this.header = new Header({
|
|
359
|
-
path: this.path,
|
|
360
|
-
linkpath: this.linkpath
|
|
449
|
+
path: this[PREFIX](this.path),
|
|
450
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
451
|
+
: this.linkpath,
|
|
361
452
|
// only the permissions and setuid/setgid/sticky bitflags
|
|
362
453
|
// not the higher-order bits that specify file type
|
|
363
454
|
mode: this.mode,
|
|
@@ -377,8 +468,9 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
377
468
|
ctime: this.portable ? null : this.ctime,
|
|
378
469
|
gid: this.portable ? null : this.gid,
|
|
379
470
|
mtime: this.noMtime ? null : this.mtime,
|
|
380
|
-
path: this.path,
|
|
381
|
-
linkpath: this.linkpath
|
|
471
|
+
path: this[PREFIX](this.path),
|
|
472
|
+
linkpath: this.type === 'Link' ? this[PREFIX](this.linkpath)
|
|
473
|
+
: this.linkpath,
|
|
382
474
|
size: this.size,
|
|
383
475
|
uid: this.portable ? null : this.uid,
|
|
384
476
|
uname: this.portable ? null : this.uname,
|
|
@@ -391,6 +483,10 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
391
483
|
readEntry.pipe(this)
|
|
392
484
|
}
|
|
393
485
|
|
|
486
|
+
[PREFIX] (path) {
|
|
487
|
+
return prefixPath(path, this.prefix)
|
|
488
|
+
}
|
|
489
|
+
|
|
394
490
|
[MODE] (mode) {
|
|
395
491
|
return modeFix(mode, this.type === 'Directory')
|
|
396
492
|
}
|
|
@@ -405,7 +501,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
|
|
|
405
501
|
|
|
406
502
|
end () {
|
|
407
503
|
if (this.blockRemain)
|
|
408
|
-
|
|
504
|
+
super.write(Buffer.alloc(this.blockRemain))
|
|
409
505
|
return super.end()
|
|
410
506
|
}
|
|
411
507
|
})
|
package/package.json
CHANGED
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
|
3
3
|
"name": "tar",
|
|
4
4
|
"description": "tar for node",
|
|
5
|
-
"version": "4.4.
|
|
5
|
+
"version": "4.4.16",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"tag": "v4-legacy"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "https://github.com/npm/node-tar.git"
|
|
9
12
|
},
|
|
10
13
|
"scripts": {
|
|
11
|
-
"test": "tap",
|
|
14
|
+
"test:posix": "tap",
|
|
15
|
+
"test:win32": "tap --lines=98 --branches=98 --statements=98 --functions=98",
|
|
16
|
+
"test": "node test/fixtures/test.js",
|
|
12
17
|
"preversion": "npm test",
|
|
13
18
|
"postversion": "npm publish",
|
|
14
19
|
"postpublish": "git push origin --follow-tags",
|
|
@@ -16,21 +21,22 @@
|
|
|
16
21
|
"bench": "for i in benchmarks/*/*.js; do echo $i; for j in {1..5}; do node $i || break; done; done"
|
|
17
22
|
},
|
|
18
23
|
"dependencies": {
|
|
19
|
-
"chownr": "^1.1.
|
|
20
|
-
"fs-minipass": "^1.2.
|
|
21
|
-
"minipass": "^2.
|
|
22
|
-
"minizlib": "^1.
|
|
23
|
-
"mkdirp": "^0.5.
|
|
24
|
-
"safe-buffer": "^5.1
|
|
25
|
-
"yallist": "^3.
|
|
24
|
+
"chownr": "^1.1.4",
|
|
25
|
+
"fs-minipass": "^1.2.7",
|
|
26
|
+
"minipass": "^2.9.0",
|
|
27
|
+
"minizlib": "^1.3.3",
|
|
28
|
+
"mkdirp": "^0.5.5",
|
|
29
|
+
"safe-buffer": "^5.2.1",
|
|
30
|
+
"yallist": "^3.1.1"
|
|
26
31
|
},
|
|
27
32
|
"devDependencies": {
|
|
28
33
|
"chmodr": "^1.2.0",
|
|
29
|
-
"end-of-stream": "^1.4.
|
|
34
|
+
"end-of-stream": "^1.4.4",
|
|
30
35
|
"events-to-array": "^1.1.2",
|
|
31
36
|
"mutate-fs": "^2.1.1",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
37
|
+
"require-inject": "^1.4.4",
|
|
38
|
+
"rimraf": "^2.7.1",
|
|
39
|
+
"tap": "^14.11.0",
|
|
34
40
|
"tar-fs": "^1.16.3",
|
|
35
41
|
"tar-stream": "^1.6.2"
|
|
36
42
|
},
|