[Pkg-javascript-commits] [node-module-deps] 322/444: merge entry and id records
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:48:09 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 a3ce24272eefa9e0fcd36d4bf02b9741ca56f48d
Author: James Halliday <mail at substack.net>
Date: Wed Dec 3 04:31:36 2014 -0800
merge entry and id records
---
index.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/index.js b/index.js
index 68fd74e..1d6ba19 100644
--- a/index.js
+++ b/index.js
@@ -84,7 +84,22 @@ Deps.prototype._transform = function (row, enc, next) {
Deps.prototype._flush = function () {
var self = this;
+ var files = {};
self._input.forEach(function (r) {
+ var w = r.row, f = files[w.file];
+ if (f) {
+ f.row.entry = f.row.entry || w.entry;
+ var ex = f.row.expose || w.expose;
+ f.row.expose = ex;
+ if (ex && f.row.file === f.row.id && w.file !== w.id) {
+ f.row.id = w.id;
+ }
+ }
+ else files[w.file] = r;
+ });
+
+ Object.keys(files).forEach(function (key) {
+ var r = files[key];
var pkg = r.pkg || {};
if (!pkg.__dirname) pkg.__dirname = path.dirname(r.row.file);
self.walk(r.row, self.top);
--
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