-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
376555f
commit 1f5f6f2
Showing
21 changed files
with
102 additions
and
100 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
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
8 changes: 4 additions & 4 deletions
8
...ugin-proposal-explicit-resource-management/test/fixtures/transform-await/mixed/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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const a = _usingCtx.using(1); | ||
const b = _usingCtx.using(2, true); | ||
const c = _usingCtx.using(3); | ||
const a = _usingCtx.u(1); | ||
const b = _usingCtx.u(2, true); | ||
const c = _usingCtx.u(3); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
await _usingCtx.dispose(); | ||
await _usingCtx.d(); | ||
} |
8 changes: 4 additions & 4 deletions
8
...al-explicit-resource-management/test/fixtures/transform-await/only-using-await/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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(obj, true); | ||
const x = _usingCtx.u(obj, true); | ||
stmt; | ||
const y = _usingCtx.using(obj, true), | ||
z = _usingCtx.using(obj, true); | ||
const y = _usingCtx.u(obj, true), | ||
z = _usingCtx.u(obj, true); | ||
doSomethingWith(x, y); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
await _usingCtx.dispose(); | ||
await _usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...n-proposal-explicit-resource-management/test/fixtures/transform-sync/bare-block/output.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(obj); | ||
const x = _usingCtx.u(obj); | ||
doSomethingWith(x); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...posal-explicit-resource-management/test/fixtures/transform-sync/for-await-head/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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
for await (const _x of y) try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(_x); | ||
const x = _usingCtx.u(_x); | ||
doSomethingWith(x); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...gin-proposal-explicit-resource-management/test/fixtures/transform-sync/for-head/output.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
for (const _x of y) try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(_x); | ||
const x = _usingCtx.u(_x); | ||
doSomethingWith(x); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...roposal-explicit-resource-management/test/fixtures/transform-sync/function-body/output.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
function fn() { | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(obj); | ||
const x = _usingCtx.u(obj); | ||
return doSomethingWith(x); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...ugin-proposal-explicit-resource-management/test/fixtures/transform-sync/if-body/output.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
if (test) try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(obj); | ||
const x = _usingCtx.u(obj); | ||
doSomethingWith(x); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
12 changes: 6 additions & 6 deletions
12
...posal-explicit-resource-management/test/fixtures/transform-sync/multiple-nested/output.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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
const x = _usingCtx.using(obj); | ||
const x = _usingCtx.u(obj); | ||
try { | ||
var _usingCtx2 = babelHelpers.usingCtx(); | ||
const y = _usingCtx2.using(call(() => { | ||
const y = _usingCtx2.u(call(() => { | ||
try { | ||
var _usingCtx3 = babelHelpers.usingCtx(); | ||
const z = _usingCtx3.using(obj); | ||
const z = _usingCtx3.u(obj); | ||
return z; | ||
} catch (_) { | ||
_usingCtx3.e = _; | ||
} finally { | ||
_usingCtx3.dispose(); | ||
_usingCtx3.d(); | ||
} | ||
})); | ||
stmt; | ||
} catch (_) { | ||
_usingCtx2.e = _; | ||
} finally { | ||
_usingCtx2.dispose(); | ||
_usingCtx2.d(); | ||
} | ||
stmt; | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
10 changes: 5 additions & 5 deletions
10
...l-explicit-resource-management/test/fixtures/transform-sync/multiple-same-level/output.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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
stmt; | ||
const x = _usingCtx.using(obj); | ||
const x = _usingCtx.u(obj); | ||
stmt; | ||
const y = _usingCtx.using(obj), | ||
z = _usingCtx.using(obj); | ||
const y = _usingCtx.u(obj), | ||
z = _usingCtx.u(obj); | ||
stmt; | ||
const w = _usingCtx.using(obj); | ||
const w = _usingCtx.u(obj); | ||
doSomethingWith(x, z); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
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
6 changes: 3 additions & 3 deletions
6
...t-resource-management/test/fixtures/transform-top-level/await-or-not-preserved/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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export { x, y }; | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
var x = _usingCtx.using(A); | ||
var y = _usingCtx.using(B, true); | ||
var x = _usingCtx.u(A); | ||
var y = _usingCtx.u(B, true); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
await _usingCtx.dispose(); | ||
await _usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...source-management/test/fixtures/transform-top-level/hoisting-default-clas-anon/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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export { _default as default }; | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
var x = _usingCtx.using(null); | ||
var x = _usingCtx.u(null); | ||
var _default = class {}; | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...t-resource-management/test/fixtures/transform-top-level/hoisting-default-class/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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export { C as default }; | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
var x = _usingCtx.using(null); | ||
var x = _usingCtx.u(null); | ||
var C = class {}; | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...it-resource-management/test/fixtures/transform-top-level/hoisting-default-expr/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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export { _default as default }; | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
var x = _usingCtx.using(null); | ||
var x = _usingCtx.u(null); | ||
var _default = doSomething(); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
4 changes: 2 additions & 2 deletions
4
...resource-management/test/fixtures/transform-top-level/hoisting-default-fn-anon/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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export default function fn() {} | ||
try { | ||
var _usingCtx = babelHelpers.usingCtx(); | ||
var x = _usingCtx.using(null); | ||
var x = _usingCtx.u(null); | ||
} catch (_) { | ||
_usingCtx.e = _; | ||
} finally { | ||
_usingCtx.dispose(); | ||
_usingCtx.d(); | ||
} |
Oops, something went wrong.