Changeset e29cc2e for trip-planner-front/node_modules/signal-exit
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- Location:
- trip-planner-front/node_modules/signal-exit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/signal-exit/index.js
r59329aa re29cc2e 4 4 // grab a reference to node's real process object right away 5 5 var process = global.process 6 7 const processOk = function (process) { 8 return process && 9 typeof process === 'object' && 10 typeof process.removeListener === 'function' && 11 typeof process.emit === 'function' && 12 typeof process.reallyExit === 'function' && 13 typeof process.listeners === 'function' && 14 typeof process.kill === 'function' && 15 typeof process.pid === 'number' && 16 typeof process.on === 'function' 17 } 18 6 19 // some kind of non-node environment, just no-op 7 if (typeof process !== 'object' || !process) { 20 /* istanbul ignore if */ 21 if (!processOk(process)) { 8 22 module.exports = function () {} 9 23 } else { … … 37 51 38 52 module.exports = function (cb, opts) { 39 if (global.process !== process) { 53 /* istanbul ignore if */ 54 if (!processOk(global.process)) { 40 55 return 41 56 } … … 64 79 65 80 var unload = function unload () { 66 if (!loaded || global.process !== process) {81 if (!loaded || !processOk(global.process)) { 67 82 return 68 83 } … … 81 96 82 97 var emit = function emit (event, code, signal) { 98 /* istanbul ignore if */ 83 99 if (emitter.emitted[event]) { 84 100 return … … 92 108 signals.forEach(function (sig) { 93 109 sigListeners[sig] = function listener () { 94 if (process !== global.process) { 110 /* istanbul ignore if */ 111 if (!processOk(global.process)) { 95 112 return 96 113 } … … 111 128 sig = 'SIGINT' 112 129 } 130 /* istanbul ignore next */ 113 131 process.kill(process.pid, sig) 114 132 } … … 123 141 124 142 var load = function load () { 125 if (loaded || process !== global.process) {143 if (loaded || !processOk(global.process)) { 126 144 return 127 145 } … … 150 168 var originalProcessReallyExit = process.reallyExit 151 169 var processReallyExit = function processReallyExit (code) { 152 if (process !== global.process) { 153 return 154 } 155 process.exitCode = code || 0 170 /* istanbul ignore if */ 171 if (!processOk(global.process)) { 172 return 173 } 174 process.exitCode = code || /* istanbul ignore next */ 0 156 175 emit('exit', process.exitCode, null) 157 176 /* istanbul ignore next */ … … 163 182 var originalProcessEmit = process.emit 164 183 var processEmit = function processEmit (ev, arg) { 165 if (ev === 'exit' && process === global.process) { 184 if (ev === 'exit' && processOk(global.process)) { 185 /* istanbul ignore else */ 166 186 if (arg !== undefined) { 167 187 process.exitCode = arg 168 188 } 169 189 var ret = originalProcessEmit.apply(this, arguments) 190 /* istanbul ignore next */ 170 191 emit('exit', process.exitCode, null) 171 192 /* istanbul ignore next */ 172 193 emit('afterexit', process.exitCode, null) 194 /* istanbul ignore next */ 173 195 return ret 174 196 } else { -
trip-planner-front/node_modules/signal-exit/package.json
r59329aa re29cc2e 1 1 { 2 "_args": [ 3 [ 4 "signal-exit@3.0.5", 5 "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front" 6 ] 7 ], 8 "_development": true, 9 "_from": "signal-exit@3.0.5", 10 "_id": "signal-exit@3.0.5", 2 "_from": "signal-exit@^3.0.2", 3 "_id": "signal-exit@3.0.6", 11 4 "_inBundle": false, 12 "_integrity": "sha512- KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==",5 "_integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", 13 6 "_location": "/signal-exit", 14 7 "_phantomChildren": {}, 15 8 "_requested": { 16 "type": " version",9 "type": "range", 17 10 "registry": true, 18 "raw": "signal-exit@ 3.0.5",11 "raw": "signal-exit@^3.0.2", 19 12 "name": "signal-exit", 20 13 "escapedName": "signal-exit", 21 "rawSpec": " 3.0.5",14 "rawSpec": "^3.0.2", 22 15 "saveSpec": null, 23 "fetchSpec": " 3.0.5"16 "fetchSpec": "^3.0.2" 24 17 }, 25 18 "_requiredBy": [ … … 28 21 "/restore-cursor" 29 22 ], 30 "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", 31 "_spec": "3.0.5", 32 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front", 23 "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", 24 "_shasum": "24e630c4b0f03fea446a2bd299e62b4a6ca8d0af", 25 "_spec": "signal-exit@^3.0.2", 26 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\node_modules\\restore-cursor", 33 27 "author": { 34 28 "name": "Ben Coe", … … 38 32 "url": "https://github.com/tapjs/signal-exit/issues" 39 33 }, 34 "bundleDependencies": false, 35 "deprecated": false, 40 36 "description": "when you want to fire an event no matter how a process exits.", 41 37 "devDependencies": { … … 44 40 "nyc": "^15.1.0", 45 41 "standard-version": "^9.3.1", 46 "tap": "^15. 0.10"42 "tap": "^15.1.1" 47 43 }, 48 44 "files": [ … … 63 59 }, 64 60 "scripts": { 65 "coverage": "nyc report --reporter=text-lcov | coveralls", 66 "release": "standard-version", 67 "test": "tap --timeout=240 ./test/*.js --cov" 61 "postversion": "npm publish", 62 "prepublishOnly": "git push origin --follow-tags", 63 "preversion": "npm test", 64 "snap": "tap", 65 "test": "tap" 68 66 }, 69 "version": "3.0. 5"67 "version": "3.0.6" 70 68 }
Note:
See TracChangeset
for help on using the changeset viewer.