-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/compat): Make
block-scoping
pass rename exports correctly (#…
- Loading branch information
Showing
10 changed files
with
120 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"jsc": { | ||
"parser": { | ||
"syntax": "ecmascript", | ||
"jsx": false | ||
}, | ||
"target": "es5", | ||
"loose": false, | ||
"minify": { | ||
"compress": false, | ||
"mangle": false | ||
} | ||
}, | ||
"module": { | ||
"type": "es6" | ||
}, | ||
"minify": false, | ||
"isModule": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function _toBeMocked() { | ||
return "I am the original function"; | ||
} | ||
|
||
export let toBeMocked = _toBeMocked | ||
|
||
export const mock = { | ||
get toBeMocked() { return toBeMocked; }, | ||
set toBeMocked(mock) { toBeMocked = mock; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function _toBeMocked() { | ||
return "I am the original function"; | ||
} | ||
export var toBeMocked = _toBeMocked; | ||
var _$mock = { | ||
get toBeMocked () { | ||
return toBeMocked; | ||
}, | ||
set toBeMocked (mock){ | ||
toBeMocked = mock; | ||
} | ||
}; | ||
export { _$mock as mock }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ use swc_ecma_visit::{ | |
}; | ||
use swc_trace_macro::swc_trace; | ||
|
||
mod operator; | ||
mod vars; | ||
|
||
/// | ||
|
94 changes: 0 additions & 94 deletions
94
crates/swc_ecma_compat_es2015/src/block_scoping/operator.rs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
crates/swc_ecma_transforms_compat/tests/block-scoping/issue-8148/1/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
function _toBeMocked() { | ||
return "I am the original function"; | ||
} | ||
|
||
export let toBeMocked = _toBeMocked | ||
|
||
export const mock = { | ||
get toBeMocked() { return toBeMocked; }, | ||
set toBeMocked(mock) { toBeMocked = mock; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters