Skip to content

Commit

Permalink
feat: rename type into installationType
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Nov 14, 2018
1 parent 9095239 commit 3e8ea0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/private/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ module.exports = async (command, packageName, inputOptions) => {
};
const updateProgress = () => {
cliFooter.updateProgress(
Array.from(ongoing, ([inProgressPackageName, { type }]) =>
format(`${ logWordForms.present[type] } %s`, inProgressPackageName)
Array.from(ongoing, ([inProgressPackageName, { installationType }]) =>
format(`${ logWordForms.present[installationType] } %s`, inProgressPackageName)
)
);
};
progressData.on("start", updateProgress);
progressData.on("end", ({ name: endedPackageName, progressData: packageProgressData }) => {
const { type } = packageProgressData;
log.notice(`${ logWordForms.past[type] } %s`, endedPackageName);
const { installationType } = packageProgressData;
log.notice(`${ logWordForms.past[installationType] } %s`, endedPackageName);
updateProgress();
});
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/private/install-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = async (packageContext, userConfiguration, inputOptions, progres
const meta = (packageContext.meta = packagesMeta[name]);
const path = (packageContext.path = resolve(packagesPath, name));
const packageProgressData = {
type: (await isDirectory(path)) ? "update" : "install",
installationType: (await isDirectory(path)) ? "update" : "install",
hooks: { after: [] }
};

Expand Down
2 changes: 1 addition & 1 deletion lib/private/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = async (packageContext, userConfiguration, inputOptions, progres
// Ensure to emit "start" event in next event loop
await wait();

progressData.emit("start", { name, progressData: { type: "update" } });
progressData.emit("start", { name, progressData: { installationType: "update" } });

// Cleanup outcome of eventual previous npm crashes
await cleanupNpmInstall(packageContext);
Expand Down

0 comments on commit 3e8ea0d

Please sign in to comment.