[Pkg-javascript-commits] [node-tap] 146/186: Do not use osHomedir
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 16:40:54 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 7f9cca93e7d997b99ca0e039400f3c2246b505c4
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Sun Sep 10 22:59:23 2017 +0200
Do not use osHomedir
Forwarded: no
---
bin/run.js | 3 +--
lib/stack.js | 4 ++--
package.json | 1 -
test-legacy/rcfiles.js | 4 ++--
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/bin/run.js b/bin/run.js
index 9d950e5..862fdc8 100755
--- a/bin/run.js
+++ b/bin/run.js
@@ -15,7 +15,6 @@ return nycBin;
}
const glob = require('glob')
const isexe = require('isexe')
-const osHomedir = require('os-homedir')
const yaml = require('js-yaml')
const path = require('path')
const exists = require('fs-exists-cached').sync
@@ -66,7 +65,7 @@ const main = _ => {
const defaults = constructDefaultArgs()
// parse dotfile
- const rcFile = process.env.TAP_RCFILE || (osHomedir() + '/.taprc')
+ const rcFile = process.env.TAP_RCFILE || (os.homedir() + '/.taprc')
const rcOptions = parseRcFile(rcFile)
// supplement defaults with parsed rc options
diff --git a/lib/stack.js b/lib/stack.js
index 5c8e511..c7665ba 100644
--- a/lib/stack.js
+++ b/lib/stack.js
@@ -3,7 +3,7 @@ const sourceMapSupport = require('source-map-support')
const StackUtils = require('stack-utils')
const path = require('path')
const tapDir = path.resolve(__dirname, '..')
-const osHomedir = require('os-homedir')
+const osHomedir = require('os')
const resc = str =>
str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')
@@ -16,7 +16,7 @@ const skip = (process.cwd() !== tapDir ||
+process.env.TAP_DEV_LONGSTACK !== 1
? [
/node_modules[\/\\]tap[\/\\]/,
- new RegExp(resc(path.resolve(osHomedir(), '.node-spawn-wrap-')) + '.*'),
+ new RegExp(resc(path.resolve(os.Homedir(), '.node-spawn-wrap-')) + '.*'),
new RegExp(resc(tapDir) + '\\b', 'i'),
new RegExp(resc(require.resolve('function-loop'))),
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json'))))
diff --git a/package.json b/package.json
index e2ec8ff..63e6df2 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,6 @@
"js-yaml": "^3.10.0",
"minipass": "^2.2.1",
"mkdirp": "^0.5.1",
- "os-homedir": "^1.0.2",
"own-or": "^1.0.0",
"own-or-env": "^1.0.0",
"rimraf": "^2.6.2",
diff --git a/test-legacy/rcfiles.js b/test-legacy/rcfiles.js
index 5696b23..bf8592e 100644
--- a/test-legacy/rcfiles.js
+++ b/test-legacy/rcfiles.js
@@ -3,11 +3,11 @@ var t = require('../')
var spawn = require('child_process').spawn
var node = process.execPath
var run = require.resolve('../bin/run.js')
+var os = require('os')
// fake this one in case you have some weird stuff in ~/.taprc
var path = require('path')
process.env.HOME = path.resolve(__dirname, 'fixtures')
-var osHomedir = require('os-homedir')
var defaults = {
grep: [],
@@ -31,7 +31,7 @@ var defaults = {
jobs: 1,
lines: 0,
statements: 0,
- rcFile: osHomedir() + '/.taprc',
+ rcFile: os.homedir() + '/.taprc',
outputFile: null
}
--
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