swc/crates/swc_ecma_utils/src
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
..
function chore(*): Typo + fomatting (#4304) 2022-04-11 18:45:58 +00:00
constructor.rs refactor(common): Cleanup & rustfmt (#3495) 2022-02-09 06:33:32 +00:00
factory.rs feat(es/ast): Add raw to Num (#4245) 2022-04-05 12:46:35 +00:00
ident.rs fix(es/utils): Fix wrong apis (#4604) 2022-05-11 04:36:22 +00:00
lib.rs fix(es/utils): Fix wrong apis (#4604) 2022-05-11 04:36:22 +00:00
macros.rs feat(es/ast): Add raw to Str (#4071) 2022-03-22 07:54:08 +00:00
value.rs refactor(common): Cleanup & rustfmt (#3495) 2022-02-09 06:33:32 +00:00
var.rs refactor(common): Cleanup & rustfmt (#3495) 2022-02-09 06:33:32 +00:00