From c2405a1d30e053684654dc3a7e2669caca846fd1 Mon Sep 17 00:00:00 2001 From: Daniel Stockman Date: Mon, 20 Aug 2018 14:40:40 -0700 Subject: [PATCH] fix(bootstrap): Remove redundant duplicate name check --- commands/bootstrap/index.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/commands/bootstrap/index.js b/commands/bootstrap/index.js index 5864a2ae55..7281b4bb93 100644 --- a/commands/bootstrap/index.js +++ b/commands/bootstrap/index.js @@ -87,8 +87,6 @@ class BootstrapCommand extends Command { this.filteredPackages = filteredPackages; }); - chain = chain.then(() => this.validatePackageNames()); - chain = chain.then(() => { this.batchedPackages = this.toposort ? batchPackages(this.filteredPackages, this.options.rejectCycles) @@ -559,29 +557,6 @@ class BootstrapCommand extends Command { symlinkPackages() { return symlinkDependencies(this.filteredPackages, this.packageGraph, this.logger); } - - validatePackageNames() { - const seen = new Map(); - - for (const { name, location } of this.filteredPackages) { - if (seen.has(name)) { - seen.get(name).push(location); - } else { - seen.set(name, [location]); - } - } - - for (const [name, locations] of seen) { - if (locations.length > 1) { - throw new ValidationError( - "ENAME", - [`Package name "${name}" used in multiple packages:`, ...locations].join("\n\t") - ); - } - } - - // hooray no duplicates - } } module.exports.BootstrapCommand = BootstrapCommand;