update links to repository after rename (#3847)

This commit is contained in:
Alex Lam S.L
2020-05-05 14:07:33 +01:00
committed by GitHub
parent ffa1943177
commit 6bf1486935
13 changed files with 28 additions and 28 deletions

View File

@@ -4,8 +4,8 @@ UglifyJS 3
UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit.
#### Note: #### Note:
- **`uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage) that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. - **`uglify-js@3` has a simplified [API](#api-reference) and [CLI](#command-line-usage) that is not backwards compatible with [`uglify-js@2`](https://github.com/mishoo/UglifyJS/tree/v2.x)**.
- **Documentation for UglifyJS `2.x` releases can be found [here](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. - **Documentation for UglifyJS `2.x` releases can be found [here](https://github.com/mishoo/UglifyJS/tree/v2.x)**.
- `uglify-js` only supports JavaScript (ECMAScript 5). - `uglify-js` only supports JavaScript (ECMAScript 5).
- To minify ECMAScript 2015 or above, transpile using tools like [Babel](https://babeljs.io/). - To minify ECMAScript 2015 or above, transpile using tools like [Babel](https://babeljs.io/).
@@ -913,7 +913,7 @@ can pass additional arguments that control the code output:
- `wrap_iife` (default `false`) -- pass `true` to wrap immediately invoked - `wrap_iife` (default `false`) -- pass `true` to wrap immediately invoked
function expressions. See function expressions. See
[#640](https://github.com/mishoo/UglifyJS2/issues/640) for more details. [#640](https://github.com/mishoo/UglifyJS/issues/640) for more details.
# Miscellaneous # Miscellaneous
@@ -1072,8 +1072,8 @@ var result = UglifyJS.minify(ast, {
### Working with Uglify AST ### Working with Uglify AST
Transversal and transformation of the native AST can be performed through Transversal and transformation of the native AST can be performed through
[`TreeWalker`](https://github.com/mishoo/UglifyJS2/blob/master/lib/ast.js) and [`TreeWalker`](https://github.com/mishoo/UglifyJS/blob/master/lib/ast.js) and
[`TreeTransformer`](https://github.com/mishoo/UglifyJS2/blob/master/lib/transform.js) [`TreeTransformer`](https://github.com/mishoo/UglifyJS/blob/master/lib/transform.js)
respectively. respectively.
### ESTree / SpiderMonkey AST ### ESTree / SpiderMonkey AST

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------
@@ -212,7 +212,7 @@ merge(Compressor.prototype, {
node.hoist_declarations(this); node.hoist_declarations(this);
node.process_boolean_returns(this); node.process_boolean_returns(this);
} }
// Before https://github.com/mishoo/UglifyJS2/pull/1602 AST_Node.optimize() // Before https://github.com/mishoo/UglifyJS/pull/1602 AST_Node.optimize()
// would call AST_Node.transform() if a different instance of AST_Node is // would call AST_Node.transform() if a different instance of AST_Node is
// produced after OPT(). // produced after OPT().
// This corrupts TreeWalker.stack, which cause AST look-ups to malfunction. // This corrupts TreeWalker.stack, which cause AST look-ups to malfunction.
@@ -4392,7 +4392,7 @@ merge(Compressor.prototype, {
} }
if (node instanceof AST_LabeledStatement && node.body instanceof AST_For) { if (node instanceof AST_LabeledStatement && node.body instanceof AST_For) {
// Certain combination of unused name + side effect leads to invalid AST: // Certain combination of unused name + side effect leads to invalid AST:
// https://github.com/mishoo/UglifyJS2/issues/1830 // https://github.com/mishoo/UglifyJS/issues/1830
// We fix it at this stage by moving the label inwards, back to the `for`. // We fix it at this stage by moving the label inwards, back to the `for`.
descend(node, tt); descend(node, tt);
if (node.body instanceof AST_BlockStatement) { if (node.body instanceof AST_BlockStatement) {
@@ -4413,9 +4413,9 @@ merge(Compressor.prototype, {
}, function(node, in_list) { }, function(node, in_list) {
if (node instanceof AST_For) { if (node instanceof AST_For) {
// Certain combination of unused name + side effect leads to invalid AST: // Certain combination of unused name + side effect leads to invalid AST:
// https://github.com/mishoo/UglifyJS2/issues/44 // https://github.com/mishoo/UglifyJS/issues/44
// https://github.com/mishoo/UglifyJS2/issues/1838 // https://github.com/mishoo/UglifyJS/issues/1838
// https://github.com/mishoo/UglifyJS2/issues/3371 // https://github.com/mishoo/UglifyJS/issues/3371
// We fix it at this stage by moving the `var` outside the `for`. // We fix it at this stage by moving the `var` outside the `for`.
var block; var block;
if (node.init instanceof AST_BlockStatement) { if (node.init instanceof AST_BlockStatement) {
@@ -5468,7 +5468,7 @@ merge(Compressor.prototype, {
&& self.condition instanceof AST_Binary && self.condition.operator == "||") { && self.condition instanceof AST_Binary && self.condition.operator == "||") {
// although the code length of self.condition and negated are the same, // although the code length of self.condition and negated are the same,
// negated does not require additional surrounding parentheses. // negated does not require additional surrounding parentheses.
// see https://github.com/mishoo/UglifyJS2/issues/979 // see https://github.com/mishoo/UglifyJS/issues/979
negated_is_best = true; negated_is_best = true;
} }
body.push(make_node(AST_SimpleStatement, self, { body.push(make_node(AST_SimpleStatement, self, {
@@ -6087,7 +6087,7 @@ merge(Compressor.prototype, {
return x instanceof AST_String; return x instanceof AST_String;
})) { })) {
// quite a corner-case, but we can handle it: // quite a corner-case, but we can handle it:
// https://github.com/mishoo/UglifyJS2/issues/203 // https://github.com/mishoo/UglifyJS/issues/203
// if the code argument is a constant, then we can minify it. // if the code argument is a constant, then we can minify it.
try { try {
var code = "n(function(" + self.args.slice(0, -1).map(function(arg) { var code = "n(function(" + self.args.slice(0, -1).map(function(arg) {

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------
@@ -783,8 +783,8 @@ function OutputStream(options) {
var p = output.parent(); var p = output.parent();
if (p instanceof AST_PropAccess && p.expression === this) { if (p instanceof AST_PropAccess && p.expression === this) {
var value = this.value; var value = this.value;
// https://github.com/mishoo/UglifyJS2/issues/115 // https://github.com/mishoo/UglifyJS/issues/115
// https://github.com/mishoo/UglifyJS2/pull/1009 // https://github.com/mishoo/UglifyJS/pull/1009
if (value < 0 || /^0/.test(make_num(value))) { if (value < 0 || /^0/.test(make_num(value))) {
return true; return true;
} }
@@ -1149,7 +1149,7 @@ function OutputStream(options) {
function parenthesize_for_noin(node, output, noin) { function parenthesize_for_noin(node, output, noin) {
var parens = false; var parens = false;
// need to take some precautions here: // need to take some precautions here:
// https://github.com/mishoo/UglifyJS2/issues/60 // https://github.com/mishoo/UglifyJS/issues/60
if (noin) node.walk(new TreeWalker(function(node) { if (noin) node.walk(new TreeWalker(function(node) {
if (parens || node instanceof AST_Scope) return true; if (parens || node instanceof AST_Scope) return true;
if (node instanceof AST_Binary && node.operator == "in") { if (node instanceof AST_Binary && node.operator == "in") {

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------
@@ -948,7 +948,7 @@ function parse($TEXT, options) {
if (!(stat instanceof AST_IterationStatement)) { if (!(stat instanceof AST_IterationStatement)) {
// check for `continue` that refers to this label. // check for `continue` that refers to this label.
// those should be reported as syntax errors. // those should be reported as syntax errors.
// https://github.com/mishoo/UglifyJS2/issues/287 // https://github.com/mishoo/UglifyJS/issues/287
label.references.forEach(function(ref) { label.references.forEach(function(ref) {
if (ref instanceof AST_Continue) { if (ref instanceof AST_Continue) {
ref = ref.label.start; ref = ref.label.start;

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -1,7 +1,7 @@
/*********************************************************************** /***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor. A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2 https://github.com/mishoo/UglifyJS
-------------------------------- (C) --------------------------------- -------------------------------- (C) ---------------------------------

View File

@@ -11,7 +11,7 @@
"Alex Lam <alexlamsl@gmail.com>", "Alex Lam <alexlamsl@gmail.com>",
"Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)" "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)"
], ],
"repository": "mishoo/UglifyJS2", "repository": "mishoo/UglifyJS",
"main": "tools/node.js", "main": "tools/node.js",
"bin": { "bin": {
"uglifyjs": "bin/uglifyjs" "uglifyjs": "bin/uglifyjs"

View File

@@ -63,7 +63,7 @@ function make_code(ast, options) {
function parse_test(file) { function parse_test(file) {
var script = fs.readFileSync(file, "utf8"); var script = fs.readFileSync(file, "utf8");
// TODO try/catch can be removed after fixing https://github.com/mishoo/UglifyJS2/issues/348 // TODO try/catch can be removed after fixing https://github.com/mishoo/UglifyJS/issues/348
try { try {
var ast = U.parse(script, { var ast = U.parse(script, {
filename: file filename: file