[Pkg-javascript-commits] [uglifyjs] 48/49: Unfuzz and slightly update patch 1001.

Jonas Smedegaard dr at jones.dk
Fri Dec 9 11:43:33 UTC 2016


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

js pushed a commit to branch master
in repository uglifyjs.

commit ba90274971cadc202695071069a098fd41d428a4
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Fri Dec 9 12:02:20 2016 +0100

    Unfuzz and slightly update patch 1001.
---
 debian/patches/1001_break_dep_loop.patch | 35 ++++++++++++++------------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/debian/patches/1001_break_dep_loop.patch b/debian/patches/1001_break_dep_loop.patch
index 9bc112a..32b1b9c 100644
--- a/debian/patches/1001_break_dep_loop.patch
+++ b/debian/patches/1001_break_dep_loop.patch
@@ -1,12 +1,10 @@
 Description: break dependency loop by making source-map module optional
 Forwarded: https://github.com/mishoo/UglifyJS2/pull/477
 Author: Jérémy Lal <kapouer at melix.org>
-Last-Update: 2014-05-02
+Last-Update: 2016-12-09
 
-Index: uglifyjs/package.json
-===================================================================
---- uglifyjs.orig/package.json
-+++ uglifyjs/package.json
+--- a/package.json
++++ b/package.json
 @@ -30,7 +30,6 @@
    ],
    "dependencies": {
@@ -25,10 +23,8 @@ Index: uglifyjs/package.json
    "browserify": {
      "transform": [
        "uglify-to-browserify"
-Index: uglifyjs/tools/node.js
-===================================================================
---- uglifyjs.orig/tools/node.js
-+++ uglifyjs/tools/node.js
+--- a/tools/node.js
++++ b/tools/node.js
 @@ -7,6 +7,12 @@
  var path = require("path");
  var fs = require("fs");
@@ -42,7 +38,7 @@ Index: uglifyjs/tools/node.js
  var FILES = exports.FILES = [
      "../lib/utils.js",
      "../lib/ast.js",
-@@ -28,7 +34,7 @@ var UglifyJS = exports;
+@@ -28,7 +34,7 @@
  new Function("MOZ_SourceMap", "exports", "DEBUG", FILES.map(function(file){
      return fs.readFileSync(file, "utf8");
  }).join("\n\n"))(
@@ -51,12 +47,13 @@ Index: uglifyjs/tools/node.js
      UglifyJS,
      !!global.UGLIFY_DEBUG
  );
-@@ -119,18 +125,22 @@ exports.minify = function(files, options
+@@ -120,18 +126,22 @@
          inMap = JSON.parse(fs.readFileSync(options.inSourceMap, "utf8"));
      }
      if (options.outSourceMap || options.sourceMapInline) {
 -        output.source_map = UglifyJS.SourceMap({
--            file: options.outSourceMap,
+-            // prefer outFileName, otherwise use outSourceMap without .map suffix
+-            file: options.outFileName || (typeof options.outSourceMap === 'string' ? options.outSourceMap.replace(/\.map$/i, '') : null),
 -            orig: inMap,
 -            root: options.sourceRoot
 -        });
@@ -64,10 +61,10 @@ Index: uglifyjs/tools/node.js
 -            for (var file in sourcesContent) {
 -                if (sourcesContent.hasOwnProperty(file)) {
 -                    output.source_map.get().setSourceContent(file, sourcesContent[file]);
--                }
 +        if (sourceMap) {
 +            output.source_map = UglifyJS.SourceMap({
-+                file: options.outSourceMap,
++                // prefer outFileName, otherwise use outSourceMap without .map suffix
++                file: options.outFileName || (typeof options.outSourceMap === 'string' ? options.outSourceMap.replace(/\.map$/i, '') : null),
 +                orig: inMap,
 +                root: options.sourceRoot
 +            });
@@ -76,12 +73,10 @@ Index: uglifyjs/tools/node.js
 +                    if (sourcesContent.hasOwnProperty(file)) {
 +                        output.source_map.get().setSourceContent(file, sourcesContent[file]);
 +                    }
-+               }
+                 }
              }
--        }
-+	} else {
-+	    console.error("source-map module is missing and needed by outSourceMap option");
-+	}
++        } else {
++            console.error("source-map module is missing and needed by outSourceMap option");
+         }
  
      }
-     if (options.output) {

-- 
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