tar 4.3.2 → 4.3.3

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/README.md CHANGED
@@ -322,6 +322,8 @@ The following options are supported:
322
322
  the archive entry. If a falsey value is provided, then the entry is
323
323
  written to disk as normal. (To exclude items from extraction, use
324
324
  the `filter` option described above.)
325
+ - `onentry` A function that gets called with `(entry)` for each entry
326
+ that passes the filter.
325
327
 
326
328
  The following options are mostly internal, but can be modified in some
327
329
  advanced use cases, such as re-using caches between runs.
@@ -621,6 +623,11 @@ Most unpack errors will cause a `warn` event to be emitted. If the
621
623
  the archive entry. If a falsey value is provided, then the entry is
622
624
  written to disk as normal. (To exclude items from extraction, use
623
625
  the `filter` option described above.)
626
+ - `strict` Treat warnings as crash-worthy errors. Default false.
627
+ - `onentry` A function that gets called with `(entry)` for each entry
628
+ that passes the filter.
629
+ - `onwarn` A function that will get called with `(message, data)` for
630
+ any warnings encountered.
624
631
 
625
632
  ### class tar.Unpack.Sync
626
633
 
package/lib/unpack.js CHANGED
@@ -49,8 +49,6 @@ class Unpack extends Parser {
49
49
  this[MAYBECLOSE]()
50
50
  }
51
51
 
52
- opt.onentry = entry => this[ONENTRY](entry)
53
-
54
52
  super(opt)
55
53
 
56
54
  this.transform = typeof opt.transform === 'function' ? opt.transform : null
@@ -122,6 +120,7 @@ class Unpack extends Parser {
122
120
  // default mode for dirs created as parents
123
121
  this.dmode = opt.dmode || (0o0777 & (~this.umask))
124
122
  this.fmode = opt.fmode || (0o0666 & (~this.umask))
123
+ this.on('entry', entry => this[ONENTRY](entry))
125
124
  }
126
125
 
127
126
  [MAYBECLOSE] () {
package/package.json CHANGED
@@ -2,7 +2,7 @@
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.3.2",
5
+ "version": "4.3.3",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/npm/node-tar.git"
Binary file