Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add private-property-in-object support (#11372)
https://github.com/tc39/proposal-private-fields-in-in Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-Authored-By: Huáng Jùnliàng <jlhwung@gmail.com>
- Loading branch information
1 parent
2f31ecf
commit 4379f5c
Showing
90 changed files
with
1,949 additions
and
83 deletions.
There are no files selected for viewing
8 changes: 1 addition & 7 deletions
8
packages/babel-cli/test/fixtures/babel/--copy-files with ignore in babelignore/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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
{ | ||
"args": [ | ||
"src", | ||
"--out-dir", | ||
"lib", | ||
"--copy-files", | ||
"--verbose" | ||
] | ||
"args": ["src", "--out-dir", "lib", "--copy-files", "--verbose"] | ||
} |
8 changes: 1 addition & 7 deletions
8
packages/babel-cli/test/fixtures/babel/--copy-files with ignore in babelrc/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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
{ | ||
"args": [ | ||
"src", | ||
"--out-dir", | ||
"lib", | ||
"--copy-files", | ||
"--verbose" | ||
] | ||
"args": ["src", "--out-dir", "lib", "--copy-files", "--verbose"] | ||
} |
8 changes: 7 additions & 1 deletion
8
packages/babel-cli/test/fixtures/babel/--minified/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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"args": ["--out-file", "script2.js", "--no-comments", "--minified", "script.js"] | ||
"args": [ | ||
"--out-file", | ||
"script2.js", | ||
"--no-comments", | ||
"--minified", | ||
"script.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
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: 2 additions & 4 deletions
6
...ures-plugin/test/fixtures/plugin-proposal-decorators/ignore-abstract-methods/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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
{ | ||
"presets": [ | ||
["typescript"] | ||
], | ||
"presets": [["typescript"]], | ||
"plugins": [ | ||
["proposal-decorators", { "decoratorsBeforeExport": true }], | ||
["proposal-class-properties"] | ||
] | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ures/es2016/simple-parameter-list/async-arrow-function-after-binary-operator/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "Unexpected token, expected \";\" (1:12)" | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
.../babel-parser/test/fixtures/es2020/nullish-coalescing-operator/with-pipeline/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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
{ | ||
"plugins": [ | ||
["pipelineOperator", { "proposal": "minimal" }] | ||
] | ||
"plugins": [["pipelineOperator", { "proposal": "minimal" }]] | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-parser/test/fixtures/experimental/_no-plugin/private-in/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,7 @@ | ||
class Point { | ||
#x = 1; | ||
#y = 2; | ||
static isPoint(obj) { | ||
return #x in obj && #y in obj; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/babel-parser/test/fixtures/experimental/_no-plugin/private-in/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 @@ | ||
{ | ||
"plugins": [ | ||
"classPrivateProperties" | ||
], | ||
"throws": "This experimental syntax requires enabling the parser plugin: 'privateIn' (5:14)" | ||
} |
7 changes: 5 additions & 2 deletions
7
...arser/test/fixtures/experimental/class-private-methods/asi-failure-generator/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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"throws": "Unexpected token (3:3)", | ||
"plugins": ["classProperties", "classPrivateMethods"] | ||
} | ||
"plugins": [ | ||
"classProperties", | ||
"classPrivateMethods" | ||
] | ||
} |
4 changes: 3 additions & 1 deletion
4
...parser/test/fixtures/experimental/class-private-properties/failure-shorthand/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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"throws": "Unexpected token (4:11)", | ||
"plugins": ["classPrivateProperties"] | ||
"plugins": [ | ||
"classPrivateProperties" | ||
] | ||
} |
11 changes: 9 additions & 2 deletions
11
...s/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/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 |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"plugins": [["pipelineOperator", { "proposal": "smart" }]], | ||
"plugins": [ | ||
[ | ||
"pipelineOperator", | ||
{ | ||
"proposal": "smart" | ||
} | ||
] | ||
], | ||
"throws": "Unexpected token (1:4)" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...abel-parser/test/fixtures/experimental/private-in/private-binary-expression-left/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,6 @@ | ||
class Foo { | ||
#x = 1; | ||
test() { | ||
#x + 1; | ||
} | ||
} |
Oops, something went wrong.