Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2018-03-08 11:08:45 +0300
committerKat Marchán <kzm@sykosomatic.org>2018-03-09 01:20:36 +0300
commit75279c4884d02bd7d451b66616e320eb8cb03bcb (patch)
tree37b97aaf1e971363309cab6109031c6a1624144d /node_modules/tar
parent92ad344399f7a23e308d0f3f02547656a47ae6c5 (diff)
tar@4.4.0
Credit: @isaacs
Diffstat (limited to 'node_modules/tar')
-rw-r--r--node_modules/tar/README.md6
-rw-r--r--node_modules/tar/lib/pack.js4
-rw-r--r--node_modules/tar/lib/write-entry.js7
-rw-r--r--node_modules/tar/package.json25
4 files changed, 25 insertions, 17 deletions
diff --git a/node_modules/tar/README.md b/node_modules/tar/README.md
index 69b66f179..ea98e0b21 100644
--- a/node_modules/tar/README.md
+++ b/node_modules/tar/README.md
@@ -428,6 +428,8 @@ The following options are supported:
Note that this prevents using other mtime-based features like
`tar.update` or the `keepNewer` option with the resulting tar archive.
[Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
### tar.r(options, fileList, callback) [alias: tar.replace]
@@ -477,6 +479,8 @@ The following options are supported:
Note that this prevents using other mtime-based features like
`tar.update` or the `keepNewer` option with the resulting tar archive.
[Alias: `m`, `no-mtime`]
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
## Low-Level API
@@ -527,6 +531,8 @@ The following options are supported:
- `noMtime` Set to true to omit writing `mtime` values for entries.
Note that this prevents using other mtime-based features like
`tar.update` or the `keepNewer` option with the resulting tar archive.
+- `mtime` Set to a `Date` object to force a specific `mtime` for
+ everything added to the archive. Overridden by `noMtime`.
#### add(path)
diff --git a/node_modules/tar/lib/pack.js b/node_modules/tar/lib/pack.js
index ef6ea81a1..8df366e11 100644
--- a/node_modules/tar/lib/pack.js
+++ b/node_modules/tar/lib/pack.js
@@ -89,6 +89,7 @@ const Pack = warner(class Pack extends MiniPass {
this.noDirRecurse = !!opt.noDirRecurse
this.follow = !!opt.follow
this.noMtime = !!opt.noMtime
+ this.mtime = opt.mtime || null
this.filter = typeof opt.filter === 'function' ? opt.filter : _ => true
@@ -293,7 +294,8 @@ const Pack = warner(class Pack extends MiniPass {
portable: this.portable,
linkCache: this.linkCache,
statCache: this.statCache,
- noMtime: this.noMtime
+ noMtime: this.noMtime,
+ mtime: this.mtime
}
}
diff --git a/node_modules/tar/lib/write-entry.js b/node_modules/tar/lib/write-entry.js
index ad6d36caf..4eddb8b7c 100644
--- a/node_modules/tar/lib/write-entry.js
+++ b/node_modules/tar/lib/write-entry.js
@@ -45,6 +45,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
this.strict = !!opt.strict
this.noPax = !!opt.noPax
this.noMtime = !!opt.noMtime
+ this.mtime = opt.mtime || null
if (typeof opt.onwarn === 'function')
this.on('warn', opt.onwarn)
@@ -115,7 +116,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
uid: this.portable ? null : this.stat.uid,
gid: this.portable ? null : this.stat.gid,
size: this.stat.size,
- mtime: this.noMtime ? null : this.stat.mtime,
+ mtime: this.noMtime ? null : this.mtime || this.stat.mtime,
type: this.type,
uname: this.portable ? null :
this.stat.uid === this.myuid ? this.myuser : '',
@@ -128,7 +129,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass {
atime: this.portable ? null : this.header.atime,
ctime: this.portable ? null : this.header.ctime,
gid: this.portable ? null : this.header.gid,
- mtime: this.noMtime ? null : this.header.mtime,
+ mtime: this.noMtime ? null : this.mtime || this.header.mtime,
path: this.path,
linkpath: this.linkpath,
size: this.header.size,
@@ -318,7 +319,7 @@ const WriteEntryTar = warner(class WriteEntryTar extends MiniPass {
this.uname = this.portable ? null : readEntry.uname
this.gname = this.portable ? null : readEntry.gname
this.size = readEntry.size
- this.mtime = this.noMtime ? null : readEntry.mtime
+ this.mtime = this.noMtime ? null : opt.mtime || readEntry.mtime
this.atime = this.portable ? null : readEntry.atime
this.ctime = this.portable ? null : readEntry.ctime
this.linkpath = readEntry.linkpath
diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json
index a242c23fa..38c4ec516 100644
--- a/node_modules/tar/package.json
+++ b/node_modules/tar/package.json
@@ -1,28 +1,27 @@
{
- "_from": "tar@latest",
- "_id": "tar@4.3.3",
+ "_from": "tar@4.4.0",
+ "_id": "tar@4.4.0",
"_inBundle": false,
- "_integrity": "sha512-v9wjbOXloOIeXifMQGkKhPH3H7tjd+8BubFKOTU+64JpFZ3q2zBfsGlnc7KmyRgl8UxVa1SCRiF3F9tqSOgcaQ==",
+ "_integrity": "sha512-gJlTiiErwo96K904FnoYWl+5+FBgS+FimU6GMh66XLdLa55al8+d4jeDfPoGwSNHdtWI5FJP6xurmVqhBuGJpQ==",
"_location": "/tar",
"_phantomChildren": {},
"_requested": {
- "type": "tag",
+ "type": "version",
"registry": true,
- "raw": "tar@latest",
+ "raw": "tar@4.4.0",
"name": "tar",
"escapedName": "tar",
- "rawSpec": "latest",
+ "rawSpec": "4.4.0",
"saveSpec": null,
- "fetchSpec": "latest"
+ "fetchSpec": "4.4.0"
},
"_requiredBy": [
"#USER",
- "/",
- "/pacote"
+ "/"
],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-4.3.3.tgz",
- "_shasum": "e03823dbde4e8060f606fef7d09f92ce06c1064b",
- "_spec": "tar@latest",
+ "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.0.tgz",
+ "_shasum": "3aaf8c29b6b800a8215f33efb4df1c95ce2ac2f5",
+ "_spec": "tar@4.4.0",
"_where": "/Users/zkat/Documents/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
@@ -75,5 +74,5 @@
"preversion": "npm test",
"test": "tap test/*.js --100 -J --coverage-report=text -c"
},
- "version": "4.3.3"
+ "version": "4.4.0"
}