Skip to content

Commit

Permalink
tar: include scoped packages in bundledDeps
Browse files Browse the repository at this point in the history
PR-URL: npm/npm#13438
Fixes: npm/npm#8614
Credit: @forivall
Reviewed-By: @iarna
Reviewed-By: @zkat
  • Loading branch information
forivall authored and zkat committed Aug 2, 2016
1 parent d98cd9b commit 29cf56d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/utils/tar.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,17 @@ BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) {
// if they're not already present at a higher level.
if (this.bundleMagic) {
// bubbling up. stop here and allow anything the bundled pkg allows
if (entry.indexOf('/') !== -1) return true
if (entry.charAt(0) === '@') {
var firstSlash = entry.indexOf('/')
// continue to list the packages in this scope
if (firstSlash === -1) return true

// bubbling up. stop here and allow anything the bundled pkg allows
if (entry.indexOf('/', firstSlash + 1) !== -1) return true
// bubbling up. stop here and allow anything the bundled pkg allows
} else if (entry.indexOf('/') !== -1) {
return true
}

// never include the .bin. It's typically full of platform-specific
// stuff like symlinks and .cmd files anyway.
Expand Down

0 comments on commit 29cf56d

Please sign in to comment.