包详细信息

graceful-process

node-modules99.5kMIT2.2.0

graceful exit process even parent exit on SIGKILL.

自述文件

graceful-process

NPM version NPM quality NPM download Node.js Version Continuous Integration Test coverage

graceful exit process even parent exit on SIGKILL.

Install

npm i graceful-process

Usage

Import this module and execute it on every child process file.

// mycli.ts
import { graceful } from 'graceful-process';

graceful({ logger: console, label: 'mycli-child-cmd' });

Support

  • [x] cluster
  • [x] child_process.fork()
  • [ ] child_process.spawn()

Contributors

Contributors

Made with contributors-img.

更新日志

Changelog

2.2.0 (2025-05-17)

Features

2.1.0 (2025-04-08)

Features

  • support using process.on to listen SIGTERM (#10) (b3d3626)

2.0.0 (2024-12-15)

⚠ BREAKING CHANGES

  • drop Node.js < 18.19.0 support

part of https://github.com/eggjs/egg/issues/3644

https://github.com/eggjs/egg/issues/5257

Summary by CodeRabbit

Release Notes

  • New Features
  • Introduced new GitHub Actions workflows for publishing and release processes.
  • Added TypeScript configuration for stricter type-checking and modern module support.

    • New exit handler functionality for graceful application termination.
  • Documentation

  • Updated README.md for clarity on usage and installation instructions.

  • Bug Fixes

    • Improved error handling and logging in the exit process.
  • Chores

  • Updated .gitignore and package.json to reflect new structure and dependencies.
    • Modified CI pipeline to use updated Node.js versions.

Features

  • support cjs and esm both by tshy (#8) (a31a80e)
  • support timeout && drop node 14 support (#6) (8551bae)

1.2.0 / 2018-03-02

features

1.1.0 / 2018-01-17

features

others

1.0.0 / 2017-06-12

  • first release