swc/crates/swc_ecma_minifier/tests/terser/compress/drop_unused
Donny/강동윤 6a97c7bef8
fix(es/utils): Fix wrong apis (#4604)
# API Changes

## `swc_ecma_utils`

### Renames

 - `find_ids` => `find_pat_ids`
 - `prepend` => `prepend_stmt`
 - `as_bool` => `cast_to_bool`
 - `as_number` => `as_pure_number`
 - `as_string` => `cast_to_string`
 - (`as_pure_bool`, `cast_to_number` is not renamed)
 - `UsageFinder` => `IdentUsageFinder`.
 - `IdentFinder` => `IdentRefFinder`.

## Changes

 - Re-export of `HANDLER` from `swc_common::errors` is removed. Use `swc_common::error::HANDLER` instead.
 - Re-export of `Id` from `swc_ecma_ast` is removed. Use `swc_ecma_ast::Id` instead.
 - `ExprCtx` is used for apis related to `Expr`.
 - `preserve_effects` is now a method of `ExprCtx`. It was a top-level function.
 - `extract_side_effects_to` is now a method of `ExprCtx`. It was a top-level function.
 - `IdentUsageFinder` (previously `UsageFinder`) now takes `Id` instead of `Ident`.
 - `IdentRefFinder` (previously `IdentFinder`) now takes `Id` instead of `Ident`.
 - `ExprExt::is_ident_ref_to` is removed.
 - `Expr::is_global_ref_to` is added.
 - `:🆔:id` is removed. Use `Ident::to_id()` instead.
2022-05-11 04:36:22 +00:00
..
assign_binding test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
assign_chain feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
cascade_drop_assign feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
chained_3 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
const_assign test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
defun_lambda_same_name feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
delete_assign_1 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
delete_assign_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
double_assign_1 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
double_assign_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
double_assign_3 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_assign test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
drop_fargs test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
drop_fnames test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
drop_toplevel_all feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_all_retain feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_funcs feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_funcs_retain feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_keep_assign feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_retain feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_retain_array feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_retain_regex feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_vars feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_vars_fargs feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_toplevel_vars_retain feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
drop_value test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
drop_var feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
function_argument_modified_by_function_statement feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
global_var feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
iife fix(es/utils): Fix wrong apis (#4604) 2022-05-11 04:36:22 +00:00
issue_805_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_805_2 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1539 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1583 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1656 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1709 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1715_1 fix(es/resolver): Fix more try catch issues (#4582) 2022-05-09 17:50:30 +09:00
issue_1715_2 fix(es/resolver): Fix more try catch issues (#4582) 2022-05-09 17:50:30 +09:00
issue_1715_3 fix(es/resolver): Fix more try catch issues (#4582) 2022-05-09 17:50:30 +09:00
issue_1715_4 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_1830_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1830_2 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_1838 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_1968 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2063 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2105_1 fix(es/minifier): Fix analysis of update expressions (#4428) 2022-04-25 12:07:27 +00:00
issue_2105_2 fix(es/minifier): Fix analysis of update expressions (#4428) 2022-04-25 12:07:27 +00:00
issue_2136_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2136_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2136_3 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2163 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2226_1 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2226_2 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2226_3 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2288 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2418_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2418_2 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2418_3 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2418_4 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_2418_5 feat(es/minifier): Drop vars using sequential inliner (#4547) 2022-05-07 08:19:56 +00:00
issue_2516_1 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2516_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2660_1 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2660_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2665 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2768 feat(es/minifier): Drop vars using sequential inliner (#4547) 2022-05-07 08:19:56 +00:00
issue_2846 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_2995 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_3146_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_3146_2 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_3146_3 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_3146_4 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_3192 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_t161_top_retain_1 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_3 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_4 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_5 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_t161_top_retain_6 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
issue_t161_top_retain_7 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_8 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_9 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_10 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_11 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_12 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_13 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_14 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t161_top_retain_15 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
issue_t183 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
keep_assign test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
keep_fnames test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
reassign_const feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_block_decls feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_block_decls_in_catch test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_circular_references_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_circular_references_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_circular_references_3 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_class_which_extends_might_throw feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_class_which_might_throw feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_class_which_might_throw_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_class_which_might_throw_3 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_class_which_might_throw_4 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_class_with_static_props_side_effects feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_class_with_static_props_side_effects_2 feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_funarg_1 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_funarg_2 test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_keep_harmony_destructuring test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_keep_setter_arg test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_nested_function feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_null_conditional_chain test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
unused_seq_elements feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
unused_var_in_catch test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
used_block_decls_in_catch feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
used_var_in_catch test(es/minifier): Use _ instead of - for terser tests (#4411) 2022-04-23 18:34:00 +00:00
var_catch_toplevel fix(es/resolver): Fix handling of a complex try catch (#4574) 2022-05-08 10:12:50 +00:00
vardef_value feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
variable_refs_outside_unused_class feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00