swc/crates/swc_ecma_transforms
Levi 166b8581c2
feat(es/testing): Parse test code as a Program instead of a Module (#9264)
**Description:**

This PR addresses the issue described in #8713 

**BREAKING CHANGE:**

This will break existing unit tests that use `fold_module`/`visit_module`/`visit_mut_module` if the visitor is intended to work for both modules and scripts, instead of using `fold_program`/`visit_program`/`visit_mut_program`. This will also break existing unit tests if they're testing with input code that gets parsed as a script in `parse_program` if the visitor expects a module (they will need to update their `test!` calls to add `module` as the first argument, or use a function like `apply_module_transform`)

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/8713
2024-10-08 08:06:20 +09:00
..
scripts refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
src refactor(swc_core): Use namespace ecma (#5713) 2022-09-02 10:24:27 +09:00
tests feat(es/testing): Parse test code as a Program instead of a Module (#9264) 2024-10-08 08:06:20 +09:00
Cargo.toml refactor(es/typescript): Simplifying enum and namespace transforms (#9558) 2024-10-04 18:46:26 +09:00