[Pkg-javascript-commits] [node-dryice] 05/06: patch to use uglifyjs version 2.x (closes: #765814)
Leo Iannacone
l3on-guest at moszumanska.debian.org
Mon Oct 20 16:04:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
l3on-guest pushed a commit to branch master
in repository node-dryice.
commit 814e9686e052a9d5df70c5bb1ed62ae5ef2f57a4
Author: Leo Iannacone <l3on at ubuntu.com>
Date: Mon Oct 20 17:49:22 2014 +0200
patch to use uglifyjs version 2.x (closes: #765814)
---
debian/patches/0000-use_uglifyjs_2.patch | 68 ++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 69 insertions(+)
diff --git a/debian/patches/0000-use_uglifyjs_2.patch b/debian/patches/0000-use_uglifyjs_2.patch
new file mode 100644
index 0000000..010f0a8
--- /dev/null
+++ b/debian/patches/0000-use_uglifyjs_2.patch
@@ -0,0 +1,68 @@
+Description: Patch to use UglifyJS version 2.x
+Author: Leo Iannacone <l3on at ubuntu.com>
+Bug-Debian: https://bugs.debian.org/765814
+Forwarded: yes, https://github.com/mozilla/dryice/issues/34
+
+---
+ lib/dryice/index.js | 31 ++++++++++---------------------
+ 1 file changed, 10 insertions(+), 21 deletions(-)
+
+--- a/lib/dryice/index.js
++++ b/lib/dryice/index.js
+@@ -828,7 +828,7 @@
+ var code = fs.readFileSync(module.fullname).toString();
+ var ast;
+ try {
+- ast = ujs.parser.parse(code, false);
++ ast = ujs.parse(code, {strict: false});
+ }
+ catch (ex) {
+ console.error('- Failed to compile ' + module.path + ': ' + ex);
+@@ -882,10 +882,8 @@
+ }
+ };
+
+- var walker = ujs.uglify.ast_walker();
+- walker.with_walkers(walkers, function() {
+- return walker.walk(ast);
+- });
++ var walker = new ujs.TreeWalker(walkers.call);
++ ast.walk(walker);
+
+ return reply;
+ }
+@@ -999,27 +997,18 @@
+ }
+
+ var opt = copy.filter.uglifyjs.options;
+- var ast;
++
+ try {
+- ast = ujs.parser.parse(input, opt.parse_strict_semicolons);
++ return ujs.minify(input, {
++ fromString: true,
++ mangle: opt.mangle,
++ output: { beautify: opt.beautify }
++ });
+ }
+ catch (ex) {
+- console.error('- Failed to compile code: ' + ex);
++ console.error('- Failed to compile code: ', ex);
+ return input;
+ }
+-
+- if (opt.mangle) {
+- ast = ujs.uglify.ast_mangle(ast, opt.mangle_toplevel);
+- }
+-
+- if (opt.squeeze) {
+- ast = ujs.uglify.ast_squeeze(ast, opt.squeeze_options);
+- if (opt.squeeze_more) {
+- ast = ujs.uglify.ast_squeeze_more(ast);
+- }
+- }
+-
+- return ujs.uglify.gen_code(ast, opt.beautify);
+ };
+ copy.filter.uglifyjs.onRead = false;
+ /**
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b747ccf
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0000-use_uglifyjs_2.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-dryice.git
More information about the Pkg-javascript-commits
mailing list