There was an implicit assumption that first character within surrogate header range implies the next character must form a surrogate pair, which is not necessarily true.
- `const` without value
- `delete` of expression
- redefining `arguments` or `eval`
extend `test/ufuzz.js`
- optionally generate "use strict"
- improve handling of test cases with syntax errors
- group IIFE generation
- generate bare anonymous functions
- workaround `console.log()` for `new function()`
- generate expressions with `this`
fixes#1810
- rename `screw_ie8` to `ie8`
- rename `mangle.except` to `mangle.reserved`
- rename `mangle.properties.ignore_quoted` to `mangle.properties.keep_quoted`
- compact `sourceMap` options
- more stringent verification on input `options`
- toplevel shorthands
- `ie8`
- `keep_fnames`
- `toplevel`
- `warnings`
- support arrays and unquoted string values on CLI
- drop `fromString` from `minify()`
- `minify()` no longer handles any `fs` operations
- unify order of operations for `mangle_properties()` on CLI & API
- `bin/uglifyjs` used to `mangle_properties()` before even `Compressor`
- `minify()` used to `mangle_properties()` after `Compressor` but before `mangle_names()`
- both will now do `Compressor`, `mangle_names()` then `mangle_properties()`
- `options.parse` / `--parse` for parser options beyond `bare_returns`
- add `mangle.properties.builtins` to disable built-in reserved list
- disable with `--mangle-props builtins` on CLI
- `warnings` now off by default
- add `--warn` and `--verbose` on CLI
- drop `--enclose`
- drop `--export-all`
- drop `--reserved-file`
- use `--mangle reserved` instead
- drop `--reserve-domprops`
- enabled by default, disable with `--mangle-props domprops`
- drop `--prefix`
- use `--source-map base` instead
- drop `--lint`
- remove `bin/extract-props.js`
- limit exposure of internal APIs
- update documentations
closes#96closes#102closes#136closes#166closes#243closes#254closes#261closes#311closes#700closes#748closes#912closes#1072closes#1366fixes#101fixes#123fixes#124fixes#263fixes#379fixes#419fixes#423fixes#461fixes#465fixes#576fixes#737fixes#772fixes#958fixes#1036fixes#1142fixes#1175fixes#1220fixes#1223fixes#1280fixes#1359fixes#1368
As patched on `harmony`, `statement()` is the only user of `embed_tokens()` with a missing error branch.
Updated test case and match up with `harmony` to facilitate future merging.
- Use AST_Destructuring for lhf assignment patterns
- Use AST_DefaultAssign for default assignments
- Add more checks for lhs expressions
- Add lots of testing
- Cleanup ast (e.g. remove default property)
- Fix#1402 based on a patch from @kzc
- Refine spread allowance in array destructring pattern
- Add destructuring AST tree checker
Don't use 2 characters for surrogates in identifiers because there is
support for the \u{} syntax when escaped identifiers were introduced.
Also catch eof errors while reading identifier names
Introduce ascii_identifiers:
By setting ascii_identifiers to undefined (default value),
ascii_identifiers will print identifiers using the same setting as
ascii_only within the limits of the ecmascript 6 grammar.
ascii_identifiers accept true and false, allowing identifiers to be
printed under different settings than strings with the ascii_only setting.
* Implement getter/setter with computed value
* Fix parsing getter/setter after static or generator token
* Allow storing expressions for computed expression in AST_SymbolMethod
* Allow get and set in shorthand properties in object literals
Fixes#1094, #1146 and #1221
* Fixes#1147: template strings not obeying -b ascii_only true
* Allow evaluation of template expressions by adding optimizers and
walkers
* Make sure tagged templates are never changed
* Remove template tokenizer in parser, add template tokenizer in
tokenizer. It is using a brace counter to track brace position of
templates
* Add tokens `template_head` and `template_substitution` but parsing
tokens stays mostly the same
* Do not output strings anymore in AST_TemplateString, instead use
AST_TemplateSegment
* Fix parsing tagged templates, allowing multiple templates behind
as spec allows this
These changes don't influence tagged templates because raw content
may influence code execution, however they are safe to do in normal
templates:
* Allow basic string concatenation of templates where possible
* Allow custom character escape style similar to strings, except in
tagged templates
Note that expressions are still compressed in tagged templates.
Optional things that may be improved later:
* Custom quote style for templates if it doesn't have expressions.
Making it obey the quote_style option if this is the case.