-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add process exit handler #1212
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
base: main
Are you sure you want to change the base?
Conversation
|
View your CI Pipeline Execution ↗ for commit 586a93f
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/coverage-plugin
@code-pushup/eslint-plugin
@code-pushup/js-packages-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
commit: |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 72be53f with previous commit 7d3681c. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 1 group improved, 👎 2 groups regressed, 👍 2 audits improved, 👎 7 audits regressed, 14 audits changed without impacting score🗃️ Groups
31 other groups are unchanged. 🛡️ Audits
656 other audits are unchanged. |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 72be53f with previous commit 7d3681c. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🔴 36 | 🔴 36 | |
| Code coverage | 🟢 94 | 🟢 94 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 2 audits improved, 👎 4 audits regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🔴 36 | 🔴 36 | |
| Code coverage | Code coverage metrics | 🟢 94 | 🟢 94 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Types coverage | 🟥 59 undocumented types | 🟥 61 undocumented types | |
| JSDocs coverage | Variables coverage | 🟥 43 undocumented variables | 🟥 44 undocumented variables | |
| Code coverage | Line coverage | 🟩 93.8 % | 🟩 93.9 % | |
| Code coverage | Branch coverage | 🟩 91.8 % | 🟩 91.8 % | |
| JSDocs coverage | Functions coverage | 🟥 246 undocumented functions | 🟥 247 undocumented functions | |
| Code coverage | Function coverage | 🟩 95.8 % | 🟩 95.9 % |
438 other audits are unchanged.
13 other projects are unchanged.
| const SIGNALS = [ | ||
| ['SIGINT', 130], | ||
| ['SIGTERM', 143], | ||
| ['SIGQUIT', 131], | ||
| ] as const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array defines exit codes but only the signal names are referenced. Are these planned for future use? Also, logger.ts already defines similar signal constants - might be worth extracting and reusing.
| // Graceful shutdown signals | ||
| SIGNALS.forEach(([signal]) => { | ||
| process.on(signal, () => { | ||
| options.onClose?.(); | ||
| }); | ||
| }); | ||
|
|
||
| // Normal exit | ||
| process.on('exit', () => { | ||
| options.onClose?.(); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a signal is received, onClose is called. Then when the process exits, the 'exit' event also triggers onClose. Should there be a guard to prevent duplicate calls?
related to #1197