npm-packlist 7.0.3 → 7.0.4

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.
Files changed (2) hide show
  1. package/lib/index.js +5 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -384,6 +384,11 @@ class PackWalker extends IgnoreWalker {
384
384
 
385
385
  // get a reference to the node we're bundling
386
386
  const node = this.tree.edgesOut.get(dep).to
387
+ // if there's no node, this is most likely an optional dependency that hasn't been
388
+ // installed. just skip it.
389
+ if (!node) {
390
+ continue
391
+ }
387
392
  // we use node.path for the path because we want the location the node was linked to,
388
393
  // not where it actually lives on disk
389
394
  const path = node.path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-packlist",
3
- "version": "7.0.3",
3
+ "version": "7.0.4",
4
4
  "description": "Get a list of the files to add from a folder into an npm package",
5
5
  "directories": {
6
6
  "test": "test"