npm-packlist 1.1.12 → 1.2.0

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/index.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -57,7 +57,11 @@ const npmWalker = Class => class Walker extends Class {
57
57
 
58
58
  opt.includeEmpty = false
59
59
  opt.path = opt.path || process.cwd()
60
- opt.follow = path.basename(opt.path) === 'node_modules'
60
+ const dirName = path.basename(opt.path)
61
+ const parentName = path.basename(path.dirname(opt.path))
62
+ opt.follow =
63
+ dirName === 'node_modules' ||
64
+ (parentName === 'node_modules' && /^@/.test(dirName))
61
65
  super(opt)
62
66
 
63
67
  // ignore a bunch of things by default at the root level.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-packlist",
3
- "version": "1.1.12",
3
+ "version": "1.2.0",
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"