summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-packlist/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npm-packlist/index.js')
-rw-r--r--deps/npm/node_modules/npm-packlist/index.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js
index 2cdd37ec3d..110a344cb0 100644
--- a/deps/npm/node_modules/npm-packlist/index.js
+++ b/deps/npm/node_modules/npm-packlist/index.js
@@ -57,7 +57,11 @@ const npmWalker = Class => class Walker extends Class {
opt.includeEmpty = false
opt.path = opt.path || process.cwd()
- opt.follow = path.basename(opt.path) === 'node_modules'
+ const dirName = path.basename(opt.path)
+ const parentName = path.basename(path.dirname(opt.path))
+ opt.follow =
+ dirName === 'node_modules' ||
+ (parentName === 'node_modules' && /^@/.test(dirName))
super(opt)
// ignore a bunch of things by default at the root level.