File: fix-for-signal-exit-4.patch

package info (click to toggle)
node-tap 16.3.7%2Bds3%2B~cs49.5.20-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 99,068 kB
  • sloc: javascript: 14,032; sh: 102; makefile: 37
file content (47 lines) | stat: -rw-r--r-- 1,474 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: fix for signal-exit >= 4
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2023-08-17

--- a/bin/run.js
+++ b/bin/run.js
@@ -6,7 +6,7 @@
   process.env.FORCE_COLOR = '0'
 }
 
-const signalExit = require('signal-exit')
+const { onExit } = require('signal-exit')
 const opener = require('opener')
 const node = process.execPath
 const fs = require('fs')
@@ -829,7 +829,7 @@
 
   if (options.after) {
     /* istanbul ignore next - run after istanbul's report */
-    signalExit(() => {
+    onExit(() => {
       if (options.ts && tsNode && /\.tsx?$/.test(options.after)) {
         beforeAfter(env, ['-r', tsNode, ...options['node-arg'], options.after])
       } else {
--- a/lib/watch.js
+++ b/lib/watch.js
@@ -4,7 +4,7 @@
 const Minipass = require('minipass')
 const bin = require.resolve('../bin/run.js')
 const {spawn} = require('child_process')
-const onExit = require('signal-exit')
+const { onExit } = require('signal-exit')
 const fs = require('fs')
 const {writeFileSync, readFileSync} = fs
 const {stringify} = require('tap-yaml')
--- a/module-libtap/lib/tap.js
+++ b/module-libtap/lib/tap.js
@@ -2,7 +2,7 @@
 const process = require('./process.js')
 const fakeProcess = require('./fake-process.js')
 const Domain = require('async-hook-domain')
-const onExit = require('signal-exit')
+const { onExit } = require('signal-exit')
 const Test = require('./test.js')
 const Stdin = require('./stdin.js')
 const Spawn = require('./spawn.js')