Package: node-tap / 12.0.1+ds-1

0001-Opener-could-be-optional.patch Patch series | download
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
48
49
50
51
52
53
54
55
56
57
58
59
From 18673849a26bbed91d8ad9331cb3c38c79bebe2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Sun, 10 Sep 2017 22:49:23 +0200
Subject: Opener could be optional

Render opener optional

Forwarded: no
---
 bin/run.js   | 6 +++---
 package.json | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/bin/run.js b/bin/run.js
index 87976c5..117fa34 100755
--- a/bin/run.js
+++ b/bin/run.js
@@ -5,7 +5,6 @@ const node = process.execPath
 const fs = require('fs')
 const spawn = require('child_process').spawn
 const fg = require('foreground-child')
-const opener = require('opener')
 const colorSupport = require('color-support')
 const nycBin = require.resolve('nyc/bin/nyc.js')
 const glob = require('glob')
@@ -516,8 +515,9 @@ const runCoverageReportOnly = (options, code, signal) => {
     // otherwise just run the reporter
     child = fg(node, args)
     if (options.coverageReport === 'lcov' && options.browser)
-      child.on('exit', () =>
-        opener('coverage/lcov-report/index.html'))
+      child.on('exit', function () {
+        require('opener')('coverage/lcov-report/index.html')
+      })
   }
 
   if (code || signal) {
diff --git a/package.json b/package.json
index c429d7c..301f1bb 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,6 @@
     "minipass": "^2.3.0",
     "mkdirp": "^0.5.1",
     "nyc": "^11.8.0",
-    "opener": "^1.4.1",
     "os-homedir": "^1.0.2",
     "own-or": "^1.0.0",
     "own-or-env": "^1.0.1",
@@ -42,6 +41,9 @@
     "write-file-atomic": "^2.3.0",
     "yapool": "^1.0.0"
   },
+  "optionalDependencies" : {
+    "opener": "^1.4.1"
+  },
   "keywords": [
     "assert",
     "tap",