Skip to content

Commit

Permalink
fix: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Nov 10, 2018
1 parent 76fad65 commit 001a6df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions commands/bootstrap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ class BootstrapCommand extends Command {
let rootVersion;

if (hoisting && isHoistedPackage(externalName, hoisting)) {
const commonVersion = Array.from(externalDependents.keys()).reduce(
(a, b) => (externalDependents.get(a).size > externalDependents.get(b).size ? a : b)
const commonVersion = Array.from(externalDependents.keys()).reduce((a, b) =>
externalDependents.get(a).size > externalDependents.get(b).size ? a : b
);

// Get the version required by the repo root (if any).
Expand Down Expand Up @@ -471,13 +471,15 @@ class BootstrapCommand extends Command {
// installed in package directories.
actions.push(() => {
// Compute the list of candidate directories synchronously
const candidates = root.filter(dep => dep.dependents.length).reduce((list, { name, dependents }) => {
const dirs = dependents
.filter(pkg => pkg.nodeModulesLocation !== rootPkg.nodeModulesLocation)
.map(pkg => path.join(pkg.nodeModulesLocation, name));

return list.concat(dirs);
}, []);
const candidates = root
.filter(dep => dep.dependents.length)
.reduce((list, { name, dependents }) => {
const dirs = dependents
.filter(pkg => pkg.nodeModulesLocation !== rootPkg.nodeModulesLocation)
.map(pkg => path.join(pkg.nodeModulesLocation, name));

return list.concat(dirs);
}, []);

if (!candidates.length) {
tracker.verbose("hoist", "nothing to prune");
Expand Down
4 changes: 2 additions & 2 deletions commands/create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ class CreateCommand extends Command {
${this.binFileName} --help
`
: this.options.esModule
? `import ${this.camelName} from '${this.pkgName}';`
: `const ${this.camelName} = require('${this.pkgName}');`
? `import ${this.camelName} from '${this.pkgName}';`
: `const ${this.camelName} = require('${this.pkgName}');`
}
// TODO: DEMONSTRATE API
Expand Down

0 comments on commit 001a6df

Please sign in to comment.