Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transform support for optional chaining assignment
- Loading branch information
1 parent
5933ab1
commit 67a2c5e
Showing
56 changed files
with
514 additions
and
15 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
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-proposal-optional-chaining-assign/.npmignore
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,3 @@ | ||
src | ||
test | ||
*.log |
19 changes: 19 additions & 0 deletions
19
packages/babel-plugin-proposal-optional-chaining-assign/README.md
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 @@ | ||
# @babel/plugin-transform-optional-chaining | ||
|
||
> Transform optional chaining operators into a series of nil checks | ||
See our website [@babel/plugin-transform-optional-chaining](https://babeljs.io/docs/babel-plugin-transform-optional-chaining) for more information. | ||
|
||
## Install | ||
|
||
Using npm: | ||
|
||
```sh | ||
npm install --save-dev @babel/plugin-transform-optional-chaining | ||
``` | ||
|
||
or using yarn: | ||
|
||
```sh | ||
yarn add @babel/plugin-transform-optional-chaining --dev | ||
``` |
55 changes: 55 additions & 0 deletions
55
packages/babel-plugin-proposal-optional-chaining-assign/package.json
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,55 @@ | ||
{ | ||
"name": "@babel/plugin-proposal-optional-chaining-assign", | ||
"version": "7.22.5", | ||
"description": "Transform optional chaining on the left-hand side of assignment expressions", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/babel/babel.git", | ||
"directory": "packages/babel-plugin-proposal-optional-chaining-assign" | ||
}, | ||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-optional-chaining-assign", | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "./lib/index.js", | ||
"keywords": [ | ||
"babel-plugin" | ||
], | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "workspace:^", | ||
"@babel/helper-skip-transparent-expression-wrappers": "workspace:^", | ||
"@babel/plugin-syntax-optional-chaining-assign": "workspace:^", | ||
"@babel/plugin-transform-optional-chaining": "workspace:^" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.22.5" | ||
}, | ||
"devDependencies": { | ||
"@babel/helper-plugin-test-runner": "workspace:^" | ||
}, | ||
"engines": { | ||
"node": ">=6.9.0" | ||
}, | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
"conditions": { | ||
"BABEL_8_BREAKING": [ | ||
{ | ||
"engines": { | ||
"node": "^16.20.0 || ^18.16.0 || >=20.0.0" | ||
} | ||
} | ||
], | ||
"USE_ESM": [ | ||
{ | ||
"type": "module" | ||
}, | ||
null | ||
] | ||
}, | ||
"exports": { | ||
".": "./lib/index.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"type": "commonjs" | ||
} |
53 changes: 53 additions & 0 deletions
53
packages/babel-plugin-proposal-optional-chaining-assign/src/index.ts
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,53 @@ | ||
import { declare } from "@babel/helper-plugin-utils"; | ||
import syntaxOptionalChainingAssign from "@babel/plugin-syntax-optional-chaining-assign"; | ||
import type { NodePath } from "@babel/traverse"; | ||
import type * as t from "@babel/types"; | ||
import { skipTransparentExprWrappers } from "@babel/helper-skip-transparent-expression-wrappers"; | ||
import { transformOptionalChain } from "@babel/plugin-transform-optional-chaining"; | ||
|
||
export default declare(api => { | ||
api.assertVersion("^7.22.5"); | ||
|
||
const assumptions = { | ||
noDocumentAll: api.assumption("noDocumentAll") ?? false, | ||
pureGetters: api.assumption("pureGetters") ?? false, | ||
}; | ||
|
||
const { types: t } = api; | ||
|
||
return { | ||
name: "transform-optional-chaining-assign", | ||
inherits: syntaxOptionalChainingAssign, | ||
|
||
visitor: { | ||
AssignmentExpression(path, state) { | ||
let lhs = path.get("left"); | ||
if (!lhs.isExpression()) return; | ||
const isParenthesized = | ||
lhs.node.extra?.parenthesized || | ||
t.isParenthesizedExpression(lhs.node); | ||
|
||
lhs = skipTransparentExprWrappers(lhs) as NodePath< | ||
t.LVal & t.Expression | ||
>; | ||
if (!lhs.isOptionalMemberExpression()) return; | ||
|
||
let ifNullish: t.Expression = path.scope.buildUndefinedNode(); | ||
if (isParenthesized) { | ||
ifNullish = t.callExpression( | ||
state.addHelper("nullishReceiverError"), | ||
[], | ||
); | ||
if (path.node.operator === "=") { | ||
ifNullish = t.sequenceExpression([ | ||
t.cloneNode(path.node.right), | ||
ifNullish, | ||
]); | ||
} | ||
} | ||
|
||
transformOptionalChain(lhs, assumptions, path, ifNullish); | ||
}, | ||
}, | ||
}; | ||
}); |
1 change: 1 addition & 0 deletions
1
...n-proposal-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/basic/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 @@ | ||
a.b?.c.d?.e.f = g; |
2 changes: 2 additions & 0 deletions
2
...-proposal-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/basic/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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var _a$b; | ||
(_a$b = a.b) == null || (_a$b = _a$b.c.d) == null ? void 0 : _a$b.e.f = g; |
1 change: 1 addition & 0 deletions
1
...in-proposal-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/call/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 @@ | ||
a.b?.c.d?.().e.f = g; |
2 changes: 2 additions & 0 deletions
2
...n-proposal-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/call/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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var _a$b, _a$b$c$d, _a$b$c; | ||
(_a$b = a.b) == null || (_a$b$c$d = (_a$b$c = _a$b.c).d) == null ? void 0 : _a$b$c$d.call(_a$b$c).e.f = g; |
6 changes: 6 additions & 0 deletions
6
...gin-proposal-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/options.json
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 @@ | ||
{ | ||
"assumptions": { | ||
"noDocumentAll": true | ||
}, | ||
"plugins": ["proposal-optional-chaining-assign"] | ||
} |
13 changes: 13 additions & 0 deletions
13
...sal-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/parenthesized/exec.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,13 @@ | ||
let a = null; | ||
|
||
let evaluated = false; | ||
expect(() => { | ||
(a?.b) = (evaluated = true); | ||
}).toThrow(TypeError); | ||
//expect(evaluated).toBe(true); | ||
|
||
evaluated = false; | ||
expect(() => { | ||
(a?.b) += (evaluated = true); | ||
}).toThrow(TypeError); | ||
expect(evaluated).toBe(false); |
2 changes: 2 additions & 0 deletions
2
...al-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/parenthesized/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,2 @@ | ||
(a?.b) = c; | ||
(a?.b) += c; |
3 changes: 3 additions & 0 deletions
3
...l-optional-chaining-assign/test/fixtures/assumption-noDocumentAll/parenthesized/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var _a, _a2; | ||
(_a = a) == null ? (c, babelHelpers.nullishReceiverError()) : _a.b = c; | ||
(_a2 = a) == null ? babelHelpers.nullishReceiverError() : _a2.b += c; |
1 change: 1 addition & 0 deletions
1
...ugin-proposal-optional-chaining-assign/test/fixtures/assumption-pureGetters/call/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 @@ | ||
a.b?.c.d?.().e.f = g; |
2 changes: 2 additions & 0 deletions
2
...gin-proposal-optional-chaining-assign/test/fixtures/assumption-pureGetters/call/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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var _a$b; | ||
(_a$b = a.b) === null || _a$b === void 0 || _a$b.c.d === null || _a$b.c.d === void 0 ? void 0 : _a$b.c.d().e.f = g; |
6 changes: 6 additions & 0 deletions
6
...lugin-proposal-optional-chaining-assign/test/fixtures/assumption-pureGetters/options.json
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 @@ | ||
{ | ||
"assumptions": { | ||
"pureGetters": true | ||
}, | ||
"plugins": ["proposal-optional-chaining-assign"] | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/basic/exec.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,38 @@ | ||
let a = null; | ||
|
||
function never(i) { | ||
throw new Error("This should not be evaluated " + i); | ||
} | ||
|
||
expect(() => { | ||
a.b?.c.d?.e.f = never(1); | ||
}).toThrow(TypeError); | ||
|
||
a = { b: null }; | ||
expect(() => { | ||
a.b?.c.d?.e.f = never(2); | ||
}).not.toThrow(); | ||
|
||
a = { b: { c: null } }; | ||
expect(() => { | ||
a.b?.c.d?.e.f = never(3); | ||
}).toThrow(TypeError); | ||
|
||
a = { b: { c: { d: null } } }; | ||
expect(() => { | ||
a.b?.c.d?.e.f = never(4); | ||
}).not.toThrow(); | ||
|
||
a = { b: { c: { d: { e: null } } } }; | ||
let evaluated = false; | ||
expect(() => { | ||
a.b?.c.d?.e.f = (evaluated = true); | ||
}).toThrow(TypeError); | ||
expect(evaluated).toBe(true); | ||
|
||
a = { b: { c: { d: { e: {} } } } }; | ||
let g = {}; | ||
expect(() => { | ||
a.b?.c.d?.e.f = g; | ||
}).not.toThrow(); | ||
expect(a.b.c.d.e.f).toBe(g); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/basic/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 @@ | ||
a.b?.c.d?.e.f = g; |
2 changes: 2 additions & 0 deletions
2
...ages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/basic/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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var _a$b; | ||
(_a$b = a.b) === null || _a$b === void 0 || (_a$b = _a$b.c.d) === null || _a$b === void 0 ? void 0 : _a$b.e.f = g; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/call/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 @@ | ||
a.b?.c.d?.().e.f = g; |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/call/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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var _a$b, _a$b$c$d, _a$b$c; | ||
(_a$b = a.b) === null || _a$b === void 0 || (_a$b$c$d = (_a$b$c = _a$b.c).d) === null || _a$b$c$d === void 0 ? void 0 : _a$b$c$d.call(_a$b$c).e.f = g; |
13 changes: 13 additions & 0 deletions
13
...abel-plugin-proposal-optional-chaining-assign/test/fixtures/general/parenthesized/exec.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,13 @@ | ||
let a = null; | ||
|
||
let evaluated = false; | ||
expect(() => { | ||
(a?.b) = (evaluated = true); | ||
}).toThrow(TypeError); | ||
//expect(evaluated).toBe(true); | ||
|
||
evaluated = false; | ||
expect(() => { | ||
(a?.b) += (evaluated = true); | ||
}).toThrow(TypeError); | ||
expect(evaluated).toBe(false); |
2 changes: 2 additions & 0 deletions
2
...bel-plugin-proposal-optional-chaining-assign/test/fixtures/general/parenthesized/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,2 @@ | ||
(a?.b) = c; | ||
(a?.b) += c; |
3 changes: 3 additions & 0 deletions
3
...el-plugin-proposal-optional-chaining-assign/test/fixtures/general/parenthesized/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var _a, _a2; | ||
(_a = a) === null || _a === void 0 ? (c, babelHelpers.nullishReceiverError()) : _a.b = c; | ||
(_a2 = a) === null || _a2 === void 0 ? babelHelpers.nullishReceiverError() : _a2.b += c; |
6 changes: 6 additions & 0 deletions
6
...ages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/plus-eq/exec.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,6 @@ | ||
let obj = null; | ||
expect(obj?.x += 3).toBe(undefined); | ||
|
||
obj = { x: 1 }; | ||
expect(obj?.x += 3).toBe(4); | ||
expect(obj.x).toBe(4); |
1 change: 1 addition & 0 deletions
1
...ges/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/plus-eq/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 @@ | ||
a?.b.c?.d.e += 3; |
2 changes: 2 additions & 0 deletions
2
...es/babel-plugin-proposal-optional-chaining-assign/test/fixtures/general/plus-eq/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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var _a; | ||
(_a = a) === null || _a === void 0 || (_a = _a.b.c) === null || _a === void 0 ? void 0 : _a.d.e += 3; |
1 change: 1 addition & 0 deletions
1
...plugin-proposal-optional-chaining-assign/test/fixtures/invalid/optional-call-lhs/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 @@ | ||
a?.() = b; |
3 changes: 3 additions & 0 deletions
3
...in-proposal-optional-chaining-assign/test/fixtures/invalid/optional-call-lhs/options.json
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,3 @@ | ||
{ | ||
"throws": "a" | ||
} |
1 change: 1 addition & 0 deletions
1
...plugin-proposal-optional-chaining-assign/test/fixtures/invalid/unary-inc-postfix/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 @@ | ||
++a?.b; |
3 changes: 3 additions & 0 deletions
3
...in-proposal-optional-chaining-assign/test/fixtures/invalid/unary-inc-postfix/options.json
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,3 @@ | ||
{ | ||
"throws": "a" | ||
} |
1 change: 1 addition & 0 deletions
1
...-plugin-proposal-optional-chaining-assign/test/fixtures/invalid/unary-inc-prefix/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 @@ | ||
++a?.b; |
3 changes: 3 additions & 0 deletions
3
...gin-proposal-optional-chaining-assign/test/fixtures/invalid/unary-inc-prefix/options.json
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,3 @@ | ||
{ | ||
"throws": "a" | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-proposal-optional-chaining-assign/test/fixtures/options.json
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,3 @@ | ||
{ | ||
"plugins": ["proposal-optional-chaining-assign"] | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-proposal-optional-chaining-assign/test/index.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,3 @@ | ||
import runner from "@babel/helper-plugin-test-runner"; | ||
|
||
runner(import.meta.url); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-proposal-optional-chaining-assign/test/package.json
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 @@ | ||
{ "type": "module" } |
Oops, something went wrong.