[Pkg-javascript-commits] [node-es6-module-transpiler] 04/05: Add a patch to search the standard path

Julien Puydt julien.puydt at laposte.net
Fri Jul 7 04:37:18 UTC 2017


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

jpuydt-guest pushed a commit to branch master
in repository node-es6-module-transpiler.

commit f032b08e4b9f579ce8ff149ea2f0da3b78db2063
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Thu Jul 6 16:20:26 2017 +0200

    Add a patch to search the standard path
---
 debian/changelog                        |  1 +
 debian/patches/search_system_path.patch | 15 +++++++++++++++
 debian/patches/series                   |  1 +
 lib/file_resolver.js                    |  2 ++
 4 files changed, 19 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 10aab7c..e8a0641 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ node-es6-module-transpiler (0.10.0-2) UNRELEASED; urgency=medium
   * Add a patch for better module detection.
   * Push standards-version to 4.0.0.
   * Add a patch to detect standard modules.
+  * Add a patch to search /usr/lib/nodejs.
 
  -- Julien Puydt <julien.puydt at laposte.net>  Wed, 05 Jul 2017 17:45:09 +0200
 
diff --git a/debian/patches/search_system_path.patch b/debian/patches/search_system_path.patch
new file mode 100644
index 0000000..350aeaf
--- /dev/null
+++ b/debian/patches/search_system_path.patch
@@ -0,0 +1,15 @@
+Description: search Debian's standard system path
+Author: Julien Puydt
+Forwarded: no
+
+--- a/lib/file_resolver.js
++++ b/lib/file_resolver.js
+@@ -68,6 +68,8 @@
+     paths = [Path.dirname(fromModule.path)];
+   }
+ 
++  paths.push('/usr/lib/nodejs')
++
+   for (var i = 0, length = paths.length; i < length; i++) {
+     var includePath = paths[i];
+     var resolved = Path.resolve(includePath, importedPath);
diff --git a/debian/patches/series b/debian/patches/series
index b3abf23..bf1808d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+search_system_path.patch
 accept_standard_modules.patch
 detect_module_index.patch
 0001-On-Debian-systems-use-nodejs.patch
diff --git a/lib/file_resolver.js b/lib/file_resolver.js
index bae8f72..511e9b5 100644
--- a/lib/file_resolver.js
+++ b/lib/file_resolver.js
@@ -68,6 +68,8 @@ FileResolver.prototype.resolvePath = function(importedPath, fromModule) {
     paths = [Path.dirname(fromModule.path)];
   }
 
+  paths.push('/usr/lib/nodejs')
+
   for (var i = 0, length = paths.length; i < length; i++) {
     var includePath = paths[i];
     var resolved = Path.resolve(includePath, importedPath);

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



More information about the Pkg-javascript-commits mailing list