Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap risky co.wrap yields #49

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/commands/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const showChangelog = co.wrap(function*(cwd, pkg, options) {

const tasks = [ensureVersionTag, getPendingChanges, generateChangeLog];

for (const task of tasks) yield runTask(task);
for (const task of tasks) yield Promise.resolve(runTask(task));

return printChangelog();
});
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function release(cwd, pkg, options) {
publishTasks = [publishToNpm];
}

for (const task of publishTasks) yield runTask(task);
for (const task of publishTasks) yield Promise.resolve(runTask(task));

return null;
});
Expand Down
4 changes: 2 additions & 2 deletions lib/commands/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ function verify(cwd, pkg, options) {
];

function runTask(task) {
return Promise.resolve(task(cwd, pkg, options));
return task(cwd, pkg, options);
}

const runVerifyTasks = co.wrap(function*() {
for (const task of verifyTasks) yield runTask(task);
for (const task of verifyTasks) yield Promise.resolve(runTask(task));
});

return runVerifyTasks();
Expand Down