[Pkg-javascript-commits] [node-tap] 127/186: Opener could be optional

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 16:40:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-tap.

commit 8d3a6741ecf30d7445f90c97a800dd8ac2382113
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sun Sep 10 22:49:23 2017 +0200

    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 8be0c6a..b1971fc 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')
@@ -518,8 +517,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 0e44e36..f9072cc 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,6 @@
     "minipass": "^2.2.1",
     "mkdirp": "^0.5.1",
     "nyc": "^11.3.0",
-    "opener": "^1.4.1",
     "os-homedir": "^1.0.2",
     "own-or": "^1.0.0",
     "own-or-env": "^1.0.0",
@@ -42,6 +41,9 @@
     "write-file-atomic": "^2.3.0",
     "yapool": "^1.0.0"
   },
+  "optionalDependencies" : {
+    "opener": "^1.4.1"
+  },
   "keywords": [
     "assert",
     "tap",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap.git



More information about the Pkg-javascript-commits mailing list