Skip to content

Commit

Permalink
refactor(symlink-dependencies): Pass Tracker instance instead of this…
Browse files Browse the repository at this point in the history
….logger
  • Loading branch information
evocateur committed Dec 31, 2018
1 parent da81e60 commit 8957648
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion commands/bootstrap/index.js
Expand Up @@ -543,7 +543,11 @@ class BootstrapCommand extends Command {
* @returns {Promise}
*/
symlinkPackages() {
return symlinkDependencies(this.filteredPackages, this.targetGraph, this.logger);
return symlinkDependencies(
this.filteredPackages,
this.targetGraph,
this.logger.newItem("bootstrap dependencies")
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion commands/link/index.js
Expand Up @@ -30,7 +30,7 @@ class LinkCommand extends Command {
return this.convertLinksToFileSpecs();
}

return symlinkDependencies(this.allPackages, this.targetGraph, this.logger);
return symlinkDependencies(this.allPackages, this.targetGraph, this.logger.newItem("link dependencies"));
}

convertLinksToFileSpecs() {
Expand Down
6 changes: 2 additions & 4 deletions utils/symlink-dependencies/symlink-dependencies.js
Expand Up @@ -17,12 +17,10 @@ module.exports = symlinkDependencies;
* Symlink package binaries to dependent packages' node_modules/.bin directory
* @param {Array.<Package>} packages
* @param {Object} packageGraph
* @param {Object} logger
* @param {Tracker} tracker
* @returns {Promise}
*/
function symlinkDependencies(packages, packageGraph, logger) {
const tracker = logger.newItem("symlink packages");

function symlinkDependencies(packages, packageGraph, tracker) {
tracker.info("", "Symlinking packages and binaries");
tracker.addWork(packages.length);

Expand Down

0 comments on commit 8957648

Please sign in to comment.