Update action

This commit is contained in:
Anton Medvedev 2021-10-15 22:41:21 +02:00
commit 2c2db8c641
59 changed files with 1430 additions and 4763 deletions

View file

@ -1,35 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [3.0.3](https://github.com/tapjs/signal-exit/compare/v3.0.2...v3.0.3) (2020-03-26)
### Bug Fixes
* patch `SIGHUP` to `SIGINT` when on Windows ([cfd1046](https://github.com/tapjs/signal-exit/commit/cfd1046079af4f0e44f93c69c237a09de8c23ef2))
* **ci:** use Travis for Windows builds ([007add7](https://github.com/tapjs/signal-exit/commit/007add793d2b5ae3c382512103adbf321768a0b8))
<a name="3.0.1"></a>
## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08)
### Bug Fixes
* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb))
<a name="3.0.0"></a>
# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13)
### Bug Fixes
* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8))
* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c))
### BREAKING CHANGES
* signal-exit no longer wires into SIGPROF

2
node_modules/signal-exit/README.md generated vendored
View file

@ -30,7 +30,7 @@ The return value of the function is a function that will remove the
handler.
Note that the function *only* fires for signals if the signal would
cause the proces to exit. That is, there are no other listeners, and
cause the process to exit. That is, there are no other listeners, and
it is a fatal signal.
## Options

277
node_modules/signal-exit/index.js generated vendored
View file

@ -1,163 +1,178 @@
// Note: since nyc uses this module to output coverage, any lines
// that are in the direct sync flow of nyc's outputCoverage are
// ignored, since we can never get coverage for them.
var assert = require('assert')
var signals = require('./signals.js')
var isWin = /^win/i.test(process.platform)
var EE = require('events')
/* istanbul ignore if */
if (typeof EE !== 'function') {
EE = EE.EventEmitter
}
var emitter
if (process.__signal_exit_emitter__) {
emitter = process.__signal_exit_emitter__
// grab a reference to node's real process object right away
var process = global.process
// some kind of non-node environment, just no-op
if (typeof process !== 'object' || !process) {
module.exports = function () {}
} else {
emitter = process.__signal_exit_emitter__ = new EE()
emitter.count = 0
emitter.emitted = {}
}
var assert = require('assert')
var signals = require('./signals.js')
var isWin = /^win/i.test(process.platform)
// Because this emitter is a global, we have to check to see if a
// previous version of this library failed to enable infinite listeners.
// I know what you're about to say. But literally everything about
// signal-exit is a compromise with evil. Get used to it.
if (!emitter.infinite) {
emitter.setMaxListeners(Infinity)
emitter.infinite = true
}
module.exports = function (cb, opts) {
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
if (loaded === false) {
load()
var EE = require('events')
/* istanbul ignore if */
if (typeof EE !== 'function') {
EE = EE.EventEmitter
}
var ev = 'exit'
if (opts && opts.alwaysLast) {
ev = 'afterexit'
var emitter
if (process.__signal_exit_emitter__) {
emitter = process.__signal_exit_emitter__
} else {
emitter = process.__signal_exit_emitter__ = new EE()
emitter.count = 0
emitter.emitted = {}
}
var remove = function () {
emitter.removeListener(ev, cb)
if (emitter.listeners('exit').length === 0 &&
emitter.listeners('afterexit').length === 0) {
unload()
// Because this emitter is a global, we have to check to see if a
// previous version of this library failed to enable infinite listeners.
// I know what you're about to say. But literally everything about
// signal-exit is a compromise with evil. Get used to it.
if (!emitter.infinite) {
emitter.setMaxListeners(Infinity)
emitter.infinite = true
}
module.exports = function (cb, opts) {
if (global.process !== process) {
return
}
}
emitter.on(ev, cb)
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
return remove
}
if (loaded === false) {
load()
}
module.exports.unload = unload
function unload () {
if (!loaded) {
return
}
loaded = false
var ev = 'exit'
if (opts && opts.alwaysLast) {
ev = 'afterexit'
}
signals.forEach(function (sig) {
try {
process.removeListener(sig, sigListeners[sig])
} catch (er) {}
})
process.emit = originalProcessEmit
process.reallyExit = originalProcessReallyExit
emitter.count -= 1
}
function emit (event, code, signal) {
if (emitter.emitted[event]) {
return
}
emitter.emitted[event] = true
emitter.emit(event, code, signal)
}
// { <signal>: <listener fn>, ... }
var sigListeners = {}
signals.forEach(function (sig) {
sigListeners[sig] = function listener () {
// If there are no other listeners, an exit is coming!
// Simplest way: remove us and then re-send the signal.
// We know that this will kill the process, so we can
// safely emit now.
var listeners = process.listeners(sig)
if (listeners.length === emitter.count) {
unload()
emit('exit', null, sig)
/* istanbul ignore next */
emit('afterexit', null, sig)
/* istanbul ignore next */
if (isWin && sig === 'SIGHUP') {
// "SIGHUP" throws an `ENOSYS` error on Windows,
// so use a supported signal instead
sig = 'SIGINT'
var remove = function () {
emitter.removeListener(ev, cb)
if (emitter.listeners('exit').length === 0 &&
emitter.listeners('afterexit').length === 0) {
unload()
}
process.kill(process.pid, sig)
}
emitter.on(ev, cb)
return remove
}
})
module.exports.signals = function () {
return signals
}
var unload = function unload () {
if (!loaded || global.process !== process) {
return
}
loaded = false
module.exports.load = load
var loaded = false
function load () {
if (loaded) {
return
signals.forEach(function (sig) {
try {
process.removeListener(sig, sigListeners[sig])
} catch (er) {}
})
process.emit = originalProcessEmit
process.reallyExit = originalProcessReallyExit
emitter.count -= 1
}
loaded = true
module.exports.unload = unload
// This is the number of onSignalExit's that are in play.
// It's important so that we can count the correct number of
// listeners on signals, and don't wait for the other one to
// handle it instead of us.
emitter.count += 1
var emit = function emit (event, code, signal) {
if (emitter.emitted[event]) {
return
}
emitter.emitted[event] = true
emitter.emit(event, code, signal)
}
signals = signals.filter(function (sig) {
try {
process.on(sig, sigListeners[sig])
return true
} catch (er) {
return false
// { <signal>: <listener fn>, ... }
var sigListeners = {}
signals.forEach(function (sig) {
sigListeners[sig] = function listener () {
if (process !== global.process) {
return
}
// If there are no other listeners, an exit is coming!
// Simplest way: remove us and then re-send the signal.
// We know that this will kill the process, so we can
// safely emit now.
var listeners = process.listeners(sig)
if (listeners.length === emitter.count) {
unload()
emit('exit', null, sig)
/* istanbul ignore next */
emit('afterexit', null, sig)
/* istanbul ignore next */
if (isWin && sig === 'SIGHUP') {
// "SIGHUP" throws an `ENOSYS` error on Windows,
// so use a supported signal instead
sig = 'SIGINT'
}
process.kill(process.pid, sig)
}
}
})
process.emit = processEmit
process.reallyExit = processReallyExit
}
module.exports.signals = function () {
return signals
}
var originalProcessReallyExit = process.reallyExit
function processReallyExit (code) {
process.exitCode = code || 0
emit('exit', process.exitCode, null)
/* istanbul ignore next */
emit('afterexit', process.exitCode, null)
/* istanbul ignore next */
originalProcessReallyExit.call(process, process.exitCode)
}
var loaded = false
var originalProcessEmit = process.emit
function processEmit (ev, arg) {
if (ev === 'exit') {
if (arg !== undefined) {
process.exitCode = arg
var load = function load () {
if (loaded || process !== global.process) {
return
}
var ret = originalProcessEmit.apply(this, arguments)
loaded = true
// This is the number of onSignalExit's that are in play.
// It's important so that we can count the correct number of
// listeners on signals, and don't wait for the other one to
// handle it instead of us.
emitter.count += 1
signals = signals.filter(function (sig) {
try {
process.on(sig, sigListeners[sig])
return true
} catch (er) {
return false
}
})
process.emit = processEmit
process.reallyExit = processReallyExit
}
module.exports.load = load
var originalProcessReallyExit = process.reallyExit
var processReallyExit = function processReallyExit (code) {
if (process !== global.process) {
return
}
process.exitCode = code || 0
emit('exit', process.exitCode, null)
/* istanbul ignore next */
emit('afterexit', process.exitCode, null)
return ret
} else {
return originalProcessEmit.apply(this, arguments)
/* istanbul ignore next */
originalProcessReallyExit.call(process, process.exitCode)
}
var originalProcessEmit = process.emit
var processEmit = function processEmit (ev, arg) {
if (ev === 'exit' && process === global.process) {
if (arg !== undefined) {
process.exitCode = arg
}
var ret = originalProcessEmit.apply(this, arguments)
emit('exit', process.exitCode, null)
/* istanbul ignore next */
emit('afterexit', process.exitCode, null)
return ret
} else {
return originalProcessEmit.apply(this, arguments)
}
}
}

View file

@ -1,66 +1,36 @@
{
"_from": "signal-exit@^3.0.2",
"_id": "signal-exit@3.0.3",
"_inBundle": false,
"_integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
"_location": "/signal-exit",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "signal-exit@^3.0.2",
"name": "signal-exit",
"escapedName": "signal-exit",
"rawSpec": "^3.0.2",
"saveSpec": null,
"fetchSpec": "^3.0.2"
},
"_requiredBy": [
"/execa"
],
"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
"_shasum": "a1410c2edd8f077b08b4e253c8eacfcaf057461c",
"_spec": "signal-exit@^3.0.2",
"_where": "/Users/anton/dev/action/node_modules/execa",
"author": {
"name": "Ben Coe",
"email": "ben@npmjs.com"
},
"bugs": {
"url": "https://github.com/tapjs/signal-exit/issues"
},
"bundleDependencies": false,
"deprecated": false,
"name": "signal-exit",
"version": "3.0.5",
"description": "when you want to fire an event no matter how a process exits.",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.10",
"nyc": "^8.1.0",
"standard": "^8.1.0",
"standard-version": "^2.3.0",
"tap": "^8.0.1"
"main": "index.js",
"scripts": {
"test": "tap --timeout=240 ./test/*.js --cov",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"release": "standard-version"
},
"files": [
"index.js",
"signals.js"
],
"homepage": "https://github.com/tapjs/signal-exit",
"repository": {
"type": "git",
"url": "https://github.com/tapjs/signal-exit.git"
},
"keywords": [
"signal",
"exit"
],
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"main": "index.js",
"name": "signal-exit",
"repository": {
"type": "git",
"url": "git+https://github.com/tapjs/signal-exit.git"
"bugs": {
"url": "https://github.com/tapjs/signal-exit/issues"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"pretest": "standard",
"release": "standard-version",
"test": "tap --timeout=240 ./test/*.js --cov"
},
"version": "3.0.3"
"homepage": "https://github.com/tapjs/signal-exit",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^3.1.1",
"nyc": "^15.1.0",
"standard-version": "^9.3.1",
"tap": "^15.0.10"
}
}