[Pkg-javascript-commits] [node-browser-pack] 36/141: parent req no longer needed

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:22 UTC 2017


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

rouca pushed a commit to branch master
in repository node-browser-pack.

commit 764ad41739710f5292ef57e741c6ec786da6500e
Author: James Halliday <mail at substack.net>
Date:   Sun Mar 24 12:46:16 2013 -0700

    parent req no longer needed
---
 index.js   | 2 +-
 prelude.js | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/index.js b/index.js
index 51a0a57..d38d368 100644
--- a/index.js
+++ b/index.js
@@ -10,7 +10,7 @@ var combineSourceMap = require('combine-source-map');
 
 var prelude = (function () {
     var src = fs.readFileSync(path.join(__dirname, 'prelude.js'), 'utf8');
-    return uglify(src) + '(typeof require!=="undefined"&&require,{';
+    return uglify(src) + '({';
 })();
 
 function newlinesIn(src) {
diff --git a/prelude.js b/prelude.js
index 342840d..865085e 100644
--- a/prelude.js
+++ b/prelude.js
@@ -7,7 +7,7 @@
 // anything defined in a previous bundle is accessed via the
 // orig method which is the requireuire for previous bundles
 
-(function(parent_req, modules, cache, entry) {
+(function(modules, cache, entry) {
     function inner_req(name, jumped){
         if(!cache[name]) {
             if(!modules[name]) {
@@ -15,7 +15,6 @@
                 // current root require go all requires down from there
                 var rootRequire = typeof require == "function" && require;
                 if (!jumped && rootRequire) return rootRequire(name, true);
-                if (parent_req) return parent_req(name);
                 throw new Error('Cannot find module \'' + name + '\'');
             }
             var m = cache[name] = {exports:{}};

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



More information about the Pkg-javascript-commits mailing list