Skip to content

Commit 9cae975

Browse files
committed
Update check for extra files
1 parent cae0744 commit 9cae975

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

gulpfile.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,24 @@ ${formatPackageUpgrades(validUpgrades)}`);
133133
{ stdio: 'inherit' }
134134
);
135135

136-
if (
137-
manifest.files
138-
.concat(manifest.resources || [])
139-
.some(f => !f.startsWith('node_modules'))
140-
) {
141-
return name;
142-
}
136+
const fileGlobs = manifest.files.concat(
137+
manifest.resources || []
138+
);
139+
const hasExtraFiles = fileGlobs.some(
140+
f => f[0] !== '!' && !f.startsWith('node_modules')
141+
);
142+
143+
return hasExtraFiles ? name : null;
143144
}
144145
);
145146

146-
upgradeWarnings.forEach(libraryName =>
147-
log.warn(
148-
chalk`The library {magenta ${libraryName}} has some resources that do not come from {gray node_modules}, please verify that the upgrade was complete`
149-
)
150-
);
147+
upgradeWarnings
148+
.filter(libraryName => libraryName !== null)
149+
.forEach(libraryName =>
150+
log.warn(
151+
chalk`The library {magenta ${libraryName}} has some resources that do not come from {gray node_modules}, please verify that the upgrade was complete`
152+
)
153+
);
151154
});
152155
})
153156
);

0 commit comments

Comments
 (0)