[Pkg-javascript-commits] [sockjs-client] 01/01: Update sockjs to work with UglifyJS2.
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Mon Jun 23 05:18:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository sockjs-client.
commit ec15a07833749d62dd9c5362a8694a4623b0399d
Author: Tonnerre LOMBARD <tonnerre at ancient-solutions.com>
Date: Mon Jun 23 07:13:36 2014 +0200
Update sockjs to work with UglifyJS2.
---
debian/changelog | 6 ++++++
debian/control | 2 +-
debian/patches/series | 1 +
debian/patches/update-uglifyjs.patch | 19 +++++++++++++++++++
debian/patches/use-optimist-not-optparse.patch | 22 +++++++++++++++++++++-
5 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 973ffd0..d346e89 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+sockjs-client (0.3.4+dfsg-2) unstable; urgency=low
+
+ * Modify build coffeescript to work with uglifyjs 2.0. Closes: #750719
+
+ -- Tonnerre LOMBARD <tonnerre at ancient-solutions.com> Mon, 23 Jun 2014 07:10:24 +0200
+
sockjs-client (0.3.4+dfsg-1) unstable; urgency=low
* Initial release. Closes: #733821
diff --git a/debian/control b/debian/control
index 8bb24f7..bfcb399 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: web
Priority: optional
Maintainer: Tonnerre LOMBARD <tonnerre at ancient-solutions.com>
Build-Depends: coffeescript, debhelper (>= 9), node-optimist, node-static,
- node-uglify, nodejs, libjs-json
+ node-uglify (>= 2.0), nodejs, libjs-json
Standards-Version: 3.9.5
Homepage: https://github.com/sockjs/sockjs-client
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-javascript/sockjs-client.git
diff --git a/debian/patches/series b/debian/patches/series
index 9c5e7c5..8b7df67 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
fix-coffee-path.patch
use-optimist-not-optparse.patch
dont-include-sockjs-license.patch
+update-uglifyjs.patch
diff --git a/debian/patches/update-uglifyjs.patch b/debian/patches/update-uglifyjs.patch
new file mode 100644
index 0000000..75f52bf
--- /dev/null
+++ b/debian/patches/update-uglifyjs.patch
@@ -0,0 +1,19 @@
+Description: Require uglifyjs version 2.0.
+ Version 2 has an entirely different API, so we need to require the new
+ version in order to be compatible.
+Author: Tonnerre LOMBARD <tonnerre at ancient-solutions.com>
+Bug-Debian: http://bugs.debian.org/733821
+Forwarded: not-needed
+Last-Update: 2014-06-17
+
+--- sockjs-client-0.3.4+dfsg.orig/package.json
++++ sockjs-client-0.3.4+dfsg/package.json
+@@ -9,7 +9,7 @@
+ "repository": {"type" : "git",
+ "url" : "https://github.com/sockjs/sockjs-client.git"},
+ "devDependencies": {
+- "uglify-js" : "1.2.5",
++ "uglify-js" : "2.0.0",
+ "coffee-script" : "1.2.x",
+ "optparse" : "1.0.3",
+ "node-static" : "0.5.9"
diff --git a/debian/patches/use-optimist-not-optparse.patch b/debian/patches/use-optimist-not-optparse.patch
index f39c549..3476644 100644
--- a/debian/patches/use-optimist-not-optparse.patch
+++ b/debian/patches/use-optimist-not-optparse.patch
@@ -2,6 +2,8 @@ Description: Use optimist instead of optparse-js
Most JavaScript projects use optimist to parse arguments. Using optparse-js
for the build scripts here adds an unnecessary dependency on a package
most people don't use anyway, so we patch it out.
+ .
+ Also, update the uglify code to work with the UglifyJS2 API.
Author: Tonnerre LOMBARD <tonnerre at ancient-solutions.com>
Forwarded: https://github.com/sockjs/sockjs-client/pull/148
Last-Update: 2014-01-08
@@ -19,7 +21,25 @@ Index: sockjs/bin/render.coffee
array_flatten = (arr, acc) ->
if typeof acc is 'undefined'
-@@ -86,20 +86,34 @@
+@@ -39,10 +39,13 @@ stringify_unicode = (str) ->
+
+
+ minify = (data, minify_options)->
+- ast = uglify.parser.parse(data)
+- ast = uglify.uglify.ast_mangle(ast, minify_options)
+- ast = uglify.uglify.ast_squeeze(ast)
+- uglify.uglify.gen_code(ast, minify_options)
++ ast = uglify.parse(data)
++ compressor = uglify.Compressor()
++ ast.figure_out_scope()
++ ast = ast.transform(compressor)
++ ast.compute_char_frequency()
++ ast.mangle_names()
++ ast.print_to_string()
+
+ render = (filename, depth, options) ->
+ tags =
+@@ -86,20 +89,34 @@
main = ->
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list