@jsenv/node-signals
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "@jsenv/node-signals", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Register callback on node process signals.", | ||
@@ -20,3 +20,3 @@ "license": "MIT", | ||
"module": "index.js", | ||
"main": "dist/commonjs/main.js", | ||
"main": "dist/commonjs/main.cjs", | ||
"files": [ | ||
@@ -48,11 +48,11 @@ "/dist/", | ||
"@jsenv/assert": "1.2.1", | ||
"@jsenv/codecov-upload": "3.1.0", | ||
"@jsenv/core": "10.5.0", | ||
"@jsenv/eslint-config": "12.1.0", | ||
"@jsenv/codecov-upload": "3.2.0", | ||
"@jsenv/core": "10.6.0-alpha.0", | ||
"@jsenv/eslint-config": "12.2.0", | ||
"@jsenv/git-hooks": "1.2.0", | ||
"@jsenv/github-release-package": "1.1.1", | ||
"@jsenv/node-module-import-map": "10.0.1", | ||
"@jsenv/package-publish": "1.2.0", | ||
"@jsenv/prettier-check-project": "5.1.1", | ||
"@jsenv/prettier-config": "1.1.0", | ||
"@jsenv/node-module-import-map": "10.1.0", | ||
"@jsenv/package-publish": "1.4.0", | ||
"@jsenv/prettier-check-project": "5.3.0", | ||
"@jsenv/prettier-config": "1.2.0", | ||
"babel-eslint": "11.0.0-beta.0", | ||
@@ -59,0 +59,0 @@ "eslint": "6.8.0", |
@@ -17,4 +17,2 @@ # node-signals | ||
`jsenv-node-signals` github repository corresponds to `@jsenv/node-signals` package published on github and npm package registries. | ||
`@jsenv/node-signals` was designed to cleanup things (gracefully if possible), when node process exits or crash. | ||
@@ -25,3 +23,17 @@ | ||
```console | ||
npm install @jsenv/node-signals@1.1.0 | ||
npm install @jsenv/node-signals@1.2.1 | ||
``` | ||
```js | ||
import { teardownSignal } from "@jsenv/node-signals" | ||
teardownSignal.addCallback((reason) => { | ||
console.log(`teardown because ${reason}`) | ||
}) | ||
``` | ||
For node < 13 | ||
```js | ||
const { teardownSignal } = require("@jsenv/node-signals") | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35376
38
1