Skip to content

Commit

Permalink
feat: rename hooks into installationHooks
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Nov 14, 2018
1 parent 3e8ea0d commit 66a8f14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/private/install-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const finalize = async ({ name }, progressData) => {
ongoing.delete(name);

// Run after jobs
const { hooks: { after: jobs } } = packageProgressData;
const { installationHooks: { after: jobs } } = packageProgressData;
if (jobs.length) {
log.info("run pending jobs of %s", name);
for (const job of jobs) await job();
Expand All @@ -41,7 +41,7 @@ module.exports = async (packageContext, userConfiguration, inputOptions, progres
const path = (packageContext.path = resolve(packagesPath, name));
const packageProgressData = {
installationType: (await isDirectory(path)) ? "update" : "install",
hooks: { after: [] }
installationHooks: { after: [] }
};

log.debug("mark %s as ongoing", name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ module.exports = async (dependencyContext, progressData) => {
if (ongoing.has(name)) {
ongoing
.get(name)
.hooks.after.push(() => generateLink(dependencyContext, isVersionRangeValid));
.installationHooks.after.push(() =>
generateLink(dependencyContext, isVersionRangeValid)
);
return;
}
await generateLink(dependencyContext, isVersionRangeValid);
Expand Down

0 comments on commit 66a8f14

Please sign in to comment.