[Pkg-javascript-commits] [node-module-deps] 160/444: normalize the missing enoent errors to match the errors from browserify core
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:47:52 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 7e93c6f85f28337afbc7ff15f011ac667536a3ab
Author: James Halliday <mail at substack.net>
Date: Mon Jan 20 23:28:54 2014 -0800
normalize the missing enoent errors to match the errors from browserify core
---
index.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/index.js b/index.js
index 4f6b3cb..10c1927 100644
--- a/index.js
+++ b/index.js
@@ -156,6 +156,14 @@ module.exports = function (mains, opts) {
+ ' from file '
+ parent.filename
);
+ Object.keys(err).forEach(function (key) {
+ e[key] = err[key];
+ });
+ if (err.code === 'ENOENT') {
+ e.type = 'not found';
+ }
+ e.parent = parent.filename;
+ e.filename = file;
return output.emit('error', e);
}
applyTransforms(file, trx, src, 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