[Pkg-javascript-commits] [node-module-deps] 336/444: Use rec.expose key to pass resolved pathname back.

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:10 UTC 2017


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

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

commit cf20d2ada65785bc09d2c36520b1cb1b21dcbe73
Author: Jesse McCarthy <git_commits at jessemccarthy.net>
Date:   Thu Jan 15 12:46:50 2015 -0500

    Use rec.expose key to pass resolved pathname back.
    
    E.g., set an entry in browserify._exposed.
---
 index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 91e22a3..8287be0 100644
--- a/index.js
+++ b/index.js
@@ -290,7 +290,11 @@ Deps.prototype.walk = function (id, parent, cb) {
     
     self.resolve(id, parent, function (err, file, pkg) {
         if (rec.expose) {
-            self.options.modules[rec.expose] = file;
+            // Set options.expose to make the resolved pathname available to the
+            // caller. They may or may not have requested it, but it's harmless
+            // to set this if they didn't.
+            self.options.expose[rec.expose] =
+                self.options.modules[rec.expose] = file;
         }
         if (pkg) self.emit('package', pkg);
         

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



More information about the Pkg-javascript-commits mailing list