Skip to content

Commit

Permalink
fix(exit-hook): define package using @alwatr/dedupe to prevent duplic…
Browse files Browse the repository at this point in the history
…ates
  • Loading branch information
AliMD committed Aug 31, 2024
1 parent bdf6f52 commit e16638c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/exit-hook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,8 @@
"@alwatr/tsconfig-base": "workspace:^",
"@types/node": "^22.5.1",
"typescript": "^5.5.4"
},
"dependencies": {
"@alwatr/dedupe": "workspace:^"
}
}
6 changes: 5 additions & 1 deletion packages/exit-hook/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import {definePackage} from '@alwatr/dedupe';

definePackage('@alwatr/exit-hook', __package_version__);

/**
* Array of callback functions to be called when the process is exiting.
*/
Expand Down Expand Up @@ -30,7 +34,7 @@ export function exitHook(callback: () => void): void {
* A once callback to be called on process exit event.
*/
function onExit_(signal: number | 'SIGINT' | 'SIGTERM') {
console.log('onExit({signal: %s, %s})', signal);
console.log('onExit({signal: %s})', signal);

if (exiting === true) return;
exiting = true;
Expand Down

0 comments on commit e16638c

Please sign in to comment.