swc/crates/swc_ecma_transforms_base/tests/resolver
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
..
babel/issue refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
basic refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
block/scope/class refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
class refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
deno refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
export/default refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
fn_expr/scope refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
for_of_hoisting refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
function refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
general refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
global fix(es/renamer): Allow globalThis to be shadowed (#8327) 2023-11-23 01:52:01 +00:00
hoisting refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
in_constructor refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
issue-4953 refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
issue-7248 fix(es/codegen): Remove extra spaces in AssignPatProp and KeyValuePatProp (#7488) 2023-06-07 05:08:35 +00:00
issue-7546 fix(es/resolver): Resolve the super class before registering a class name (#7550) 2023-06-20 05:03:01 +00:00
issues fix(es/resolver): Resolve top-level undefined, NaN, and Infinity correctly (#8471) 2024-01-04 04:24:14 +00:00
minifier fix(es/resolver): Resolve top-level undefined, NaN, and Infinity correctly (#8471) 2024-01-04 04:24:14 +00:00
module/001 refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
named-export chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
nested refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
next/react-fast-refresh/1 refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
pass refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
pr_1171 refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
regression refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
regression_of_454 refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
same-level refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
shorthand refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
ts/es5/for/of/27 fix(es/codegen): Remove extra spaces in AssignPatProp and KeyValuePatProp (#7488) 2023-06-07 05:08:35 +00:00
unresolved-mark refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
update refactor(es/resolver): Make syntax context for unresolved and top-level stable (#7096) 2023-03-20 11:01:19 +09:00
vercel/next/server/render fix(es/codegen): Remove extra spaces in AssignPatProp and KeyValuePatProp (#7488) 2023-06-07 05:08:35 +00:00