swc/crates/swc_ecma_transforms_base/tests
Austaras 82bd8070cb
fix(es/resolver): Resolve top-level undefined, NaN, and Infinity correctly (#8471)
**Description:**

For following code
```js
var NaN = 1
console.log(NaN)
```
Result would be

|Envirnoment|Result|
|-|-|
|Non strict script(browser, nodejs repl)|NaN|
|Non strict script(nodejs script)|1|
|Strict script(browser, nodejs repl)|runtime error|
|Strict script(nodejs script)|1|
|ESM|1|

So SWC choose to behave like browser in script mode and confirm to esm
standard.


**Related issue:**

 - Closes #8465
2024-01-04 04:24:14 +00:00
..
resolver fix(es/resolver): Resolve top-level undefined, NaN, and Infinity correctly (#8471) 2024-01-04 04:24:14 +00:00
ts-resolver fix(es/codegen): Emit abstract keyword (#8479) 2024-01-03 04:43:45 +00:00
fixer_test262.rs feat(es/codegen): Add an option to print assert for import attributes (#7914) 2023-09-05 21:24:25 +09:00
fixture.rs feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00
par_explode.rs refactor: Flatten ecmascript (#2708) 2021-11-10 19:00:54 +09:00
par.rs perf(es/transforms): Make transforms parallel (#4939) 2022-06-11 07:42:43 +00:00
ts_resolver.rs feat(es/resolver): Use different syntax context for unresolved refs (#4436) 2022-04-26 07:38:50 +00:00