[Pkg-javascript-commits] [uglifyjs] 485/491: Unfuzz patches.
Jonas Smedegaard
dr at jones.dk
Wed Feb 14 19:52:07 UTC 2018
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/3.3.10-1
in repository uglifyjs.
commit 01c5fb96a07c7ef6b98811cf2d37b8da9e31d514
Author: Jonas Smedegaard <dr at jones.dk>
Date: Wed Feb 14 19:47:31 2018 +0100
Unfuzz patches.
---
debian/patches/1001_break_dep_loop.patch | 69 +++++-------------------
debian/patches/1002_avoid_timeout_in_tests.patch | 59 ++++++++++++++------
debian/patches/2002_node_conflict.patch | 10 +---
3 files changed, 57 insertions(+), 81 deletions(-)
diff --git a/debian/patches/1001_break_dep_loop.patch b/debian/patches/1001_break_dep_loop.patch
index 6a4917e..e78ecf0 100644
--- a/debian/patches/1001_break_dep_loop.patch
+++ b/debian/patches/1001_break_dep_loop.patch
@@ -6,31 +6,19 @@ Last-Update: 2016-12-09
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/package.json
+++ b/package.json
-@@ -29,7 +29,6 @@
- "LICENSE"
- ],
- "dependencies": {
-- "source-map": "~0.5.1",
- "yargs": "~3.10.0"
- },
- "devDependencies": {
-@@ -37,8 +36,12 @@
- "mocha": "~2.3.4"
- },
- "optionalDependencies": {
-+ "source-map": "~0.5.1",
- "uglify-to-browserify": "~1.0.0"
+@@ -32,6 +32,9 @@
+ "mocha": "~3.5.1",
+ "semver": "~5.5.0"
},
+ "optionalDependencies": {
-+ "source-map": "~0.5.1"
++ "source-map": "~0.6.1"
+ },
- "browserify": {
- "transform": [
- "uglify-to-browserify"
+ "scripts": {
+ "test": "node test/run-tests.js"
+ },
--- a/tools/node.js
+++ b/tools/node.js
-@@ -7,6 +7,12 @@
- var path = require("path");
+@@ -1,5 +1,11 @@
var fs = require("fs");
+var sourceMap;
@@ -42,45 +30,12 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
var UglifyJS = exports;
var FILES = UglifyJS.FILES = [
"../lib/utils.js",
-@@ -27,7 +33,7 @@
- new Function("MOZ_SourceMap", "exports", FILES.map(function(file){
- return fs.readFileSync(file, "utf8");
- }).join("\n\n"))(
+@@ -25,7 +31,7 @@
+ code.push("exports.describe_ast = " + describe_ast.toString());
+ return code.join("\n\n");
+ }())(
- require("source-map"),
+ sourceMap,
UglifyJS
);
-@@ -139,18 +145,22 @@
- // 5. output
- var output = { max_line_len: 32000 };
- if (options.outSourceMap || options.sourceMapInline) {
-- output.source_map = UglifyJS.SourceMap({
-- // 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
-- });
-- if (options.sourceMapIncludeSources) {
-- for (var file in sourcesContent) {
-- if (sourcesContent.hasOwnProperty(file)) {
-- output.source_map.get().setSourceContent(file, sourcesContent[file]);
-+ if (sourceMap) {
-+ output.source_map = UglifyJS.SourceMap({
-+ // 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
-+ });
-+ if (options.sourceMapIncludeSources) {
-+ for (var file in sourcesContent) {
-+ 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");
- }
-
- }
diff --git a/debian/patches/1002_avoid_timeout_in_tests.patch b/debian/patches/1002_avoid_timeout_in_tests.patch
index 1739f91..93c8ed2 100644
--- a/debian/patches/1002_avoid_timeout_in_tests.patch
+++ b/debian/patches/1002_avoid_timeout_in_tests.patch
@@ -10,32 +10,61 @@ Last-Update: 2017-02-08
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/mocha/let.js
+++ b/test/mocha/let.js
-@@ -3,7 +3,6 @@
+@@ -2,7 +2,6 @@
+ var assert = require("assert");
describe("let", function() {
- it("Should not produce `let` as a variable name in mangle", function(done) {
-- this.timeout(10000);
-
+- this.timeout(30000);
+ it("Should not produce reserved keywords as variable name in mangle", function() {
// Produce a lot of variables in a function and run it through mangle.
- var s = '"use strict"; function foo() {';
+ var s = '"dddddeeeeelllllooooottttt"; function foo() {';
--- a/test/mocha/spidermonkey.js
+++ b/test/mocha/spidermonkey.js
@@ -4,7 +4,6 @@
describe("spidermonkey export/import sanity test", function() {
- it("should produce a functional build when using --self with spidermonkey", function (done) {
-- this.timeout(20000);
+ it("should produce a functional build when using --self with spidermonkey", function(done) {
+- this.timeout(60000);
var uglifyjs = '"' + process.argv[0] + '" bin/uglifyjs';
- var command = uglifyjs + " --self -cm --wrap SpiderUglify --dump-spidermonkey-ast | " +
+ var command = uglifyjs + " --self -cm --wrap SpiderUglify -o spidermonkey | " +
+--- a/test/mocha/cli.js
++++ b/test/mocha/cli.js
+@@ -9,8 +9,6 @@
+ describe("bin/uglifyjs", function () {
+ var uglifyjscmd = '"' + process.argv[0] + '" bin/uglifyjs';
+ it("should produce a functional build when using --self", function (done) {
+- this.timeout(30000);
+-
+ var command = uglifyjscmd + ' --self -cm --wrap WrappedUglifyJS';
+
+ exec(command, function (err, stdout) {
+--- a/test/mocha/release.js
++++ b/test/mocha/release.js
+@@ -14,7 +14,6 @@
+ }
+
+ describe("test/benchmark.js", function() {
+- this.timeout(10 * 60 * 1000);
+ [
+ "-b",
+ "-b bracketize",
+@@ -35,7 +34,6 @@
+
+ if (semver.satisfies(process.version, "0.12")) return;
+ describe("test/jetstream.js", function() {
+- this.timeout(20 * 60 * 1000);
+ [
+ "-mc",
+ "-mc keep_fargs=false,passes=3,pure_getters,unsafe,unsafe_comps,unsafe_math,unsafe_proto",
--- a/test/mocha.js
+++ b/test/mocha.js
-@@ -3,7 +3,7 @@
- path = require('path');
-
- // Instantiate a Mocha instance.
--var mocha = new Mocha({});
-+var mocha = new Mocha({ timeout: 0 });
+@@ -4,7 +4,7 @@
- var testDir = __dirname + '/mocha/';
+ // Instantiate a Mocha instance
+ var mocha = new Mocha({
+- timeout: 5000
++ timeout: 0
+ });
+ var testDir = __dirname + "/mocha/";
diff --git a/debian/patches/2002_node_conflict.patch b/debian/patches/2002_node_conflict.patch
index f22fde8..e5bf4a7 100644
--- a/debian/patches/2002_node_conflict.patch
+++ b/debian/patches/2002_node_conflict.patch
@@ -21,13 +21,5 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-#! /usr/bin/env node
+#! /usr/bin/nodejs
- var U = require("../tools/node");
+ var U = require("./node");
var path = require("path");
---- a/bin/extract-props.js
-+++ b/bin/extract-props.js
-@@ -1,4 +1,4 @@
--#! /usr/bin/env node
-+#!/usr/bin/nodejs
-
- "use strict";
-
--
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