fix(bootstrap): properly dedupe all node modules

This commit is contained in:
Evan Morikawa 2016-05-17 09:32:35 -07:00
parent 835e008ca2
commit 056df36a8f

View file

@ -31,7 +31,7 @@ function executeCommands(commands, done, index) {
function printArgs(args) {
out = "";
for(key in args) {
out += "--"+key+"="+args[key]+" ";
out += "--"+key+"="+JSON.stringify(args[key])+" ";
}
return out;
}
@ -65,8 +65,6 @@ function bootstrap() {
var gruntPath = '"' + path.resolve(__dirname, '..', 'build', 'node_modules', '.bin', 'grunt') + '"';
var packagesToDedupe = ['fs-plus', 'humanize-plus', 'roaster', 'season', 'grim'];
// use the system version of npm to install build folder dependencies, including our
// own copy of NPM 3.x, which we'll use for subsequent commands
var buildInstallCommand = 'npm' + npmFlags + 'install';
@ -140,7 +138,7 @@ function bootstrap() {
m4 += " $ "+apmInstallCommand+"\n"
m5 = "\n\n---> De-duping packages `apm dedupe`\n\n"
m5 += " $ "+apmDedupeCommand+" "+packagesToDedupe.join(' ')+"\n"
m5 += " $ "+apmDedupeCommand+"\n"
m6 = "\n\n---> Request version `apm dedupe`\n\n"
m6 += " $ "+apmDedupeCommand+" request semver "+printArgs(semverOptions)+"\n"
@ -217,7 +215,7 @@ function bootstrap() {
message: m4
},
{
command: apmDedupeCommand + ' ' + packagesToDedupe.join(' '),
command: apmDedupeCommand,
options: { env: apmEnv },
message: m5
},