[Pkg-javascript-commits] [node-yarnpkg] 02/03: Patch user-home away as we are on nodejs >= 4

Paolo Greppi paolog-guest at moszumanska.debian.org
Sun Dec 25 07:34:48 UTC 2016


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

paolog-guest pushed a commit to branch master
in repository node-yarnpkg.

commit d05bf07d2b50caf47c231620381007052772367c
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Sun Dec 25 07:24:14 2016 +0000

    Patch user-home away as we are on nodejs >= 4
---
 debian/control                   |  1 -
 debian/patches/04-user-home.diff | 47 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 3 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index b3f4732..265ce46 100644
--- a/debian/control
+++ b/debian/control
@@ -50,7 +50,6 @@ Depends:
  , node-strip-bom (>= 2.0.0)
  , node-tar (>= 2.2.1)
  , node-tar-stream (>= 1.5.2)
- , node-user-home (>= 2.0.0)
  , node-validate-npm-package-license (>= 3.0.1)
 Description: Fast, reliable and secure npm alternative
  Fast: Yarnpkg caches every package it downloads so it never needs to
diff --git a/debian/patches/04-user-home.diff b/debian/patches/04-user-home.diff
new file mode 100644
index 0000000..289892f
--- /dev/null
+++ b/debian/patches/04-user-home.diff
@@ -0,0 +1,47 @@
+Description: Patch user-home away as we are on nodejs >= 4.
+ see: https://nodejs.org/api/os.html#os_os_homedir
+Forwarded: not-needed
+Author: Paolo Greppi <paolo.greppi at libpf.com>
+
+Index: node-yarnpkg/src/constants.js
+===================================================================
+--- node-yarnpkg.orig/src/constants.js
++++ node-yarnpkg/src/constants.js
+@@ -1,7 +1,8 @@
+ /* @flow */
+ 
+ const path = require('path');
+-let userHome = require('user-home');
++const os = require('os');
++let userHome = os.homedir();
+ 
+ if (process.platform === 'linux' && process.env.USER === 'root') {
+   userHome = path.resolve('/usr/local/share');
+Index: node-yarnpkg/src/registries/npm-registry.js
+===================================================================
+--- node-yarnpkg.orig/src/registries/npm-registry.js
++++ node-yarnpkg/src/registries/npm-registry.js
+@@ -11,7 +11,8 @@ import Registry from './base-registry.js
+ import {addSuffix, removePrefix} from '../util/misc';
+ 
+ const defaults = require('defaults');
+-const userHome = require('user-home');
++const os = require('os');
++const userHome = os.homedir();
+ const path = require('path');
+ const url = require('url');
+ const ini = require('ini');
+Index: node-yarnpkg/src/registries/yarn-registry.js
+===================================================================
+--- node-yarnpkg.orig/src/registries/yarn-registry.js
++++ node-yarnpkg/src/registries/yarn-registry.js
+@@ -8,7 +8,8 @@ import stringify from '../lockfile/strin
+ import parse from '../lockfile/parse.js';
+ import * as fs from '../util/fs.js';
+ 
+-const userHome = require('user-home');
++const os = require('os');
++const userHome = os.homedir();
+ const defaults = require('defaults');
+ const path = require('path');
+ const pkg: { version: string } = require('../../package.json');
diff --git a/debian/patches/series b/debian/patches/series
index ff1f16f..eb6cb3c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 01-cmd-shim.diff
 02-is-ci.diff
 03-leven.diff
+04-user-home.diff

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



More information about the Pkg-javascript-commits mailing list