Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not guess relative execution status for exported fns (#10417)
- Loading branch information
1 parent
8027dca
commit 610d6bd
Showing
5 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
packages/babel-plugin-transform-block-scoping/test/fixtures/tdz/exported-fn/input.mjs
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,14 @@ | ||
import { foo } from "somewhere"; | ||
|
||
// foo might call "bar" | ||
foo(); | ||
|
||
a; | ||
|
||
let a; | ||
|
||
a; | ||
|
||
export function bar() { | ||
return a; | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/babel-plugin-transform-block-scoping/test/fixtures/tdz/exported-fn/output.mjs
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 @@ | ||
var a = babelHelpers.temporalUndefined; | ||
import { foo } from "somewhere"; // foo might call "bar" | ||
|
||
foo(); | ||
babelHelpers.tdz("a"); | ||
a = void 0; | ||
a; | ||
export function bar() { | ||
return babelHelpers.temporalRef(a, "a"); | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/babel-plugin-transform-spread/test/fixtures/regression/10416/input.mjs
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,6 @@ | ||
const E_ARR = []; | ||
|
||
export default function () { | ||
const someVar = E_ARR; | ||
return [...someVar]; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/babel-plugin-transform-spread/test/fixtures/regression/10416/output.mjs
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,5 @@ | ||
const E_ARR = []; | ||
export default function () { | ||
const someVar = E_ARR; | ||
return babelHelpers.toConsumableArray(someVar); | ||
} |
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