Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 29cf56d

Browse files
forivallzkat
authored andcommitted
tar: include scoped packages in bundledDeps
PR-URL: #13438 Fixes: #8614 Credit: @forivall Reviewed-By: @iarna Reviewed-By: @zkat
1 parent d98cd9b commit 29cf56d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/utils/tar.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,17 @@ BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) {
117117
// if they're not already present at a higher level.
118118
if (this.bundleMagic) {
119119
// bubbling up. stop here and allow anything the bundled pkg allows
120-
if (entry.indexOf('/') !== -1) return true
120+
if (entry.charAt(0) === '@') {
121+
var firstSlash = entry.indexOf('/')
122+
// continue to list the packages in this scope
123+
if (firstSlash === -1) return true
124+
125+
// bubbling up. stop here and allow anything the bundled pkg allows
126+
if (entry.indexOf('/', firstSlash + 1) !== -1) return true
127+
// bubbling up. stop here and allow anything the bundled pkg allows
128+
} else if (entry.indexOf('/') !== -1) {
129+
return true
130+
}
121131

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

0 commit comments

Comments
 (0)