aboutsummaryrefslogtreecommitdiff
path: root/test/compress/properties.js
AgeCommit message (Collapse)Author
2020-08-23enhance `mangle.properties` (#4064)Alex Lam S.L
2020-06-13fix corner cases related to `AST_Hole` (#3994)Alex Lam S.L
2020-04-17fix corner cases in `join_vars` (#3787)Alex Lam S.L
fixes #3786 fixes #3788
2020-04-17enhance `join_vars` (#3783)Alex Lam S.L
2020-02-15enhance `properties` (#3721)Alex Lam S.L
2019-04-29fix corner case in `properties` (#3390)Alex Lam S.L
fixes #3389
2018-07-27fix corner case in `join_vars` (#3224)Alex Lam S.L
2018-06-19fix corner cases in `properties` (#3189)Alex Lam S.L
fixes #3188
2018-04-11extend `join_vars` on object assignments (#3072)Alex Lam S.L
2018-04-06mangle `Object.defineProperty()` (#3059)Alex Lam S.L
fixes #869
2018-02-09fix `join_vars` on property accessors (#2895)Alex Lam S.L
fixes #2893
2018-01-19avoid duplicate property names in object literals under "use strict" (#2818)Alex Lam S.L
fixes #2816
2018-01-18fix `join_vars` property assignment for negative array index (#2810)kzc
fixes #2790
2018-01-17suppress `unsafe_proto` for LHS expressions (#2804)Alex Lam S.L
2018-01-17extend `join_vars` & `sequences` (#2798)Alex Lam S.L
2018-01-14fix & extend `join_vars` for object assigments (#2781)Alex Lam S.L
2018-01-11fix corner case in #2763 (#2766)Alex Lam S.L
2018-01-11join object assignments (#2763)Alex Lam S.L
2018-01-06enhance `unsafe_proto` (#2733)Alex Lam S.L
2017-12-18drop property assignment to constants (#2612)Alex Lam S.L
2017-11-25fix argument/atom collision by `properties` (#2514)Alex Lam S.L
fixes #2513
2017-11-11implement compress option `reduce_funcs` (#2466)Alex Lam S.L
- inline single-use function declarations as expressions when permissible - depend on `reduce_vars` - enabled by default - disable for speed critical code fixes #2464
2017-10-30compress `new` `function` containing `this` (#2417)Alex Lam S.L
2017-10-29enhance `properties` (#2412)Alex Lam S.L
- trim array items only if `side_effects` - extend to non-identifier properties
2017-10-22safer `properties` transform (#2391)Alex Lam S.L
`{ a: x, b: y }.a` => `[ x, y ][0]` - `x` cannot be function containing `this` `[ x, y, z ][1]` => `(x, z, y)` - only if `z` is side-effect-free
2017-10-22fix `unsafe` expansion of object literals (#2390)Alex Lam S.L
2017-10-22fix `unsafe` evaluation of `AST_Sub` (#2389)Alex Lam S.L
2017-10-22fix `unsafe` evaluation of objects (#2388)Alex Lam S.L
2017-07-29improve `mangle.properties` (#2261)Alex Lam S.L
- include dead code when `keep_quoted` - unify `keep_quoted` & `reserved` - make `test/run-tests.js` consistent with `minify()` fixes #2256
2017-07-15ensure `ie8` works with mangled properties (#2238)Alex Lam S.L
fixes #2234
2017-07-06inline property access of object literal (#2209)Alex Lam S.L
- only if property value is side-effect-free - guard by `unsafe` fixes #2208
2017-06-23synchronise `mangle.properties` for `minify()` & `test/compress` (#2151)Alex Lam S.L
2017-06-03add tests for `AST_SymbolAccessor` (#2049)Alex Lam S.L
2017-06-01fix non-identifier getter/setter name (#2041)Alex Lam S.L
fixes #2040
2017-04-15unify CLI & API under `minify()` (#1811)Alex Lam S.L
- 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 #96 closes #102 closes #136 closes #166 closes #243 closes #254 closes #261 closes #311 closes #700 closes #748 closes #912 closes #1072 closes #1366 fixes #101 fixes #123 fixes #124 fixes #263 fixes #379 fixes #419 fixes #423 fixes #461 fixes #465 fixes #576 fixes #737 fixes #772 fixes #958 fixes #1036 fixes #1142 fixes #1175 fixes #1220 fixes #1223 fixes #1280 fixes #1359 fixes #1368
2017-04-01improve compression of undefined, NaN & Infinitiy (#1748)Alex Lam S.L
- migrate transformation logic from `OutputStream` to `Compressor` - always turn `undefined` into `void 0` (unless `unsafe`) - always keep `NaN` except when avoiding local variable redefinition - introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition supersedes #1723 fixes #1730
2017-03-29output optimal representations of NaN & Infinity (#1723)Alex Lam S.L
- move these optimisations out from `Compressor` to `OutputStream` - fixes behaviour inconsistency when running uglified code from global or module levels due to redefinition
2017-02-21introduce `unsafe_proto`alexlamsl
- `Array.prototype.slice` => `[].slice` closes #1491
2017-01-26augment evaluate to extract within objects (#1425)Alex Lam S.L
- gated by `unsafe` - replaces previous optimisation specific to String.length - "123"[0] => 1 - [1, 2, 3][0] => 1 - [1, 2, 3].length => 3 - does not apply to objects with overridden prototype functions
2016-11-29Add --mangle-props-debug and fix --mangle-props=unquoted collisionAshley (Scirra)
Patch by @AshleyScirra Based on: PR #1316 Renamed the CLI debug option to --mangle-props-debug Fixes: #1321 name collision in --mangle-props=unquoted
2016-08-14Fix --mangle-props and --mangle-props=unquotedkzc
Fixes: #1247 Fix --mangle-props and --name-cache inconsistency. AST_Dot and AST_Sub properties are now mangled by --mangle-props without regard to being used in an assignment statement. Note: if --mangle-props is used then *all* javascript files used must be uglified with the same mangle options. Fix the ignore_quoted=true mangle option, also known as `--mangle-props=unquoted`. If a given property is quoted anywhere it will not be mangled in any quoted or non-quoted context.
2016-08-14Additional object literal property testskzc
2016-06-30Enable --screw-ie8 by default.kzc
catch identifier is mangled correctly for ES5 standards-compliant JS engines by default. Unconditionally use the ie8 if/do-while workaround whether or not --screw-ie8 is enabled. To support non-standard ie8 javascript use: uglifyjs --support-ie8
2016-06-19Respect quote style in object literalsShrey Banga
The option added in fbbaa42ee55a7f753f7cab9b1a905ccf73cf26d5 wasn't being respected inside object literals, so quoted property names would still be stripped out with this option. This is mostly a corner-case, but useful when the output is passed to something like the Closure compiler, where quoted property names can be used to prevent mangling.
2014-07-01Evaluate "foo".length ==> 3Dan Wolff
2014-04-18Update tests.Mihai Bazon
2013-05-14Fix a["1_1"]Mihai Bazon
Close #204
2013-05-08add a test for zero-length string in is_identifier_string, which is used in ↵Trey Griffith
property compression. Also added a test exercising the change.
2013-05-06Added test scenario with unicode in properties name.Justin Lau
Signed-off-by: Justin Lau <justin@tclau.com>
2013-05-05Added scenario in test case where properties shouldn't be accessed withJustin Lau
dotted syntax even with screw_ie8 option. Signed-off-by: Justin Lau <justin@tclau.com>