Skip to content

Commit

Permalink
fix: fix run message warning always displaying for workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Jul 30, 2022
1 parent 2fff3cd commit 2e7e01d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dist/check-package-with-workspaces.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions dist/index-node14.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node14.cjs.js.map

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions src/check-package-with-workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,10 @@ export function createCheckPackageWithWorkspaces(
}),
);

let runCalled = false;

process.on('beforeExit', () => {
if (!runCalled) {
console.warn('\nFor future compatibility, call .run()');
}
});

return {
async run() {
runCalled = true;
await Promise.all(
[...checksWorkspaces.values()].map((checksWorkspace) =>
[checkPackage, ...checksWorkspaces.values()].map((checksWorkspace) =>
checksWorkspace.run(),
),
);
Expand Down

0 comments on commit 2e7e01d

Please sign in to comment.