Package: node-v8flags / 3.1.2-3

0002-use-oshomedir.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Subject: use os.homedir()
author: Bastien Roucariès <rouca@debian.org>
forwarded: not-needed

Use only nodejs (>= 4) thus do not need polyfill

Index: node-v8flags/config-path.js
===================================================================
--- node-v8flags.orig/config-path.js
+++ node-v8flags/config-path.js
@@ -1,6 +1,6 @@
 var os = require('os');
 var path = require('path');
-var userHome = require('homedir-polyfill')();
+var userHome = os.homedir();
 
 var env = process.env;
 var name = 'js-v8flags';
Index: node-v8flags/test/index.js
===================================================================
--- node-v8flags.orig/test/index.js
+++ node-v8flags/test/index.js
@@ -52,7 +52,6 @@ function cleanup() {
 
   delete require.cache[require.resolve('../')];
   delete require.cache[require.resolve('../config-path')];
-  delete require.cache[require.resolve('homedir-polyfill')];
 
   delete process.versions.electron;
 }
@@ -189,16 +188,16 @@ describe('config-path', function() {
     done();
   });
 
-  it('should return fallback path when homedir is falsy', function(done) {
+  /* it('should return fallback path when homedir is falsy', function(done) {
     var configPath = proxyquire('../config-path.js', {
       'homedir-polyfill': function() {
         return null;
       },
     })('win32');
-
     expect(configPath).toEqual(os.tmpdir());
     done();
   });
+  */
 });
 
 describe('platform specific tests', function() {
Index: node-v8flags/package.json
===================================================================
--- node-v8flags.orig/package.json
+++ node-v8flags/package.json
@@ -28,9 +28,6 @@
     "cover": "istanbul cover _mocha --report lcovonly",
     "coveralls": "npm run cover && istanbul-coveralls"
   },
-  "dependencies": {
-    "homedir-polyfill": "^1.0.1"
-  },
   "devDependencies": {
     "async": "^2.5.0",
     "eslint": "^2.13.0",
@@ -38,8 +35,7 @@
     "expect": "^1.20.2",
     "istanbul": "^0.4.3",
     "istanbul-coveralls": "^1.0.3",
-    "mocha": "^3.5.3",
-    "proxyquire": "^1.8.0"
+    "mocha": "^3.5.3"
   },
   "keywords": [
     "v8 flags",