[Pkg-javascript-commits] [uglifyjs] 72/228: resolve issue with outdated version of async (#1549)

Jonas Smedegaard dr at jones.dk
Sat Apr 15 14:25:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository uglifyjs.

commit ea9ab9fb0e48b4bf011da67f86652f148ae6ed1a
Author: Alex Lam S.L <alexlamsl at gmail.com>
Date:   Sun Mar 5 01:54:20 2017 +0800

    resolve issue with outdated version of async (#1549)
    
    fixes #746
---
 bin/uglifyjs | 12 ++++++++----
 package.json |  1 -
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/bin/uglifyjs b/bin/uglifyjs
index 367d66e..4dd234d 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -8,7 +8,6 @@ var sys = require("util");
 var yargs = require("yargs");
 var fs = require("fs");
 var path = require("path");
-var async = require("async");
 var acorn;
 var screw_ie8 = true;
 var ARGS = yargs
@@ -319,8 +318,11 @@ var STATS = {};
 var TOPLEVEL = null;
 var P_RELATIVE = ARGS.p && ARGS.p == "relative";
 var SOURCES_CONTENT = {};
+var index = 0;
 
-async.eachLimit(files, 1, function (file, cb) {
+!function cb() {
+    if (index == files.length) return done();
+    var file = files[index++];
     read_whole_file(file, function (err, code) {
         if (err) {
             print_error("ERROR: can't read file: " + file);
@@ -388,7 +390,9 @@ async.eachLimit(files, 1, function (file, cb) {
         });
         cb();
     });
-}, function () {
+}();
+
+function done() {
     var OUTPUT_FILE = ARGS.o;
 
     var SOURCE_MAP = (ARGS.source_map || ARGS.source_map_inline) ? UglifyJS.SourceMap({
@@ -537,7 +541,7 @@ async.eachLimit(files, 1, function (file, cb) {
             }));
         }
     }
-});
+}
 
 /* -----[ functions ]----- */
 
diff --git a/package.json b/package.json
index f152a51..4512eb7 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,6 @@
     "LICENSE"
   ],
   "dependencies": {
-    "async": "~0.2.6",
     "source-map": "~0.5.1",
     "uglify-to-browserify": "~1.0.0",
     "yargs": "~3.10.0"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list