[Pkg-javascript-commits] [node-browser-pack] 58/141: stable stringify for the deps field

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:24 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 0e392acf1bbf9525a8ce12da32c5dbfde581cc0f
Author: James Halliday <mail at substack.net>
Date:   Mon Jul 8 17:06:46 2013 -0700

    stable stringify for the deps field
---
 index.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index ec1e47a..79fdfab 100644
--- a/index.js
+++ b/index.js
@@ -24,7 +24,6 @@ module.exports = function (opts) {
     
     var first = true;
     var entries = [];
-    var order = []; 
     
     var lineno = 1 + newlinesIn(prelude);
     var sourcemap;
@@ -49,7 +48,11 @@ module.exports = function (opts) {
             'function(require,module,exports){\n',
             combineSourceMap.removeComments(row.source),
             '\n},',
-            JSON.stringify(row.deps || {}),
+            '{' + Object.keys(row.deps || {}).sort().map(function (key) {
+                return JSON.stringify(key) + ':'
+                    + JSON.stringify(row.deps[key])
+                ;
+            }).join(',') + '}',
             ']'
         ].join('');
 

-- 
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