meskill
cb3ebde8ce
fix: pass browserslistEnv to resolveTargets ( #13697 )
2021-08-30 12:35:19 +02:00
王清雨
313ecb579d
fix: fix static private field shadowed by local variable ( #13656 )
...
* fix: fix static private field shadowed by local variable
currently throw an error, maybe we could generate correct code
fix #12960
* feat: rename local variable and add test cases
* feat: add unshadow to privateIn visitor
also add test cases
* test: add reference to shadowed variable
* refactor: apply suggested changes
simplify logic and add comments
2021-08-30 12:03:47 +02:00
Sosuke Suzuki
a54f041440
test(parser): add no_plugin tests for module blocks ( #13714 )
2021-08-30 09:09:05 +02:00
Nicolò Ribaudo
1355d0078c
[ts] Fix transform for nested namespaces shorthand syntax ( #13664 )
2021-08-29 18:27:08 +02:00
Sosuke Suzuki
64d116bd6a
fix(parser): [Babel8] Align error codes between Flow and TypeScript ( #13294 )
...
* Align error codes between Flow and TypeScript
* Implement compat fallback in makeErrorTemplates
* Add tests
2021-08-28 22:41:54 +09:00
Sosuke Suzuki
b141c85b17
fix(babel-parser): delete static property from class static block for TS ( #13680 )
...
* Delete static modifier from static blocks node
* Update tests
* Address review
* Address review
* Add tests from review
* Add tests
2021-08-25 14:19:04 -04:00
Dijun Liu
1d4bd31950
add missing ExportNamespaceSpecifier in spec.md ( #13691 )
...
* add missing ExportNamespaceSpecifier in spec.md
* add constrain note in ExportNamedDeclaration
Co-authored-by: 刘地军 <dijun.ldj@antgroup.com>
2021-08-20 11:43:16 -04:00
Huáng Jùnliàng
976bfbbf69
fix: assure left bracket is not consumed after dot ( #13695 )
...
* fix: assure left bracket is not consumed after dot
* address review comments
2021-08-20 11:29:44 +02:00
Mickey Rose
e0c3969a24
convert @babel/helper-skip-transparent-expression-wrappers to typescript ( #13686 )
2021-08-20 11:08:05 +02:00
Federico Ciardi
51a0caa8a2
fix: set parserOpts.sourceFilename from root sourceFileName ( #13532 )
...
* Partial #13518
* Update tests
2021-08-19 15:54:53 -04:00
Huáng Jùnliàng
614b486780
Use named imports for babel types ( #13685 )
...
* migrate to named babel types imports
* perf: transform babel types import to destructuring
* fix merge errors
* apply plugin to itself
2021-08-18 10:28:40 -04:00
王清雨
b00bd94ad8
convert @babel/helpers to typescript ( #13679 )
...
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
2021-08-16 22:39:30 +02:00
Federico Ciardi
10640b2aad
perf: partially replace .concat with .push ( #13609 )
2021-08-14 16:57:06 +02:00
Babel Bot
a5624ea457
v7.15.3
2021-08-11 07:11:36 +00:00
Nicolò Ribaudo
9286cdb072
Re-enable disabled flow parser test ( #13661 )
2021-08-10 20:57:27 +02:00
doing-art
1229336fea
Fix parse error when using named import "as" with flow parser ( #13659 )
2021-08-10 20:55:21 +02:00
Bogdan Savluk
d48a5cb55c
convert @babel/plugin-transform-block-scoping to typescript ( #13219 )
2021-08-10 20:53:18 +02:00
Nicolò Ribaudo
e721f61110
[flow] Fix parsing of arrows in conditional exprs in parens ( #13655 )
2021-08-10 20:46:38 +02:00
Nicolò Ribaudo
9d0aa1ec9d
Disallow <T>(a => b) when parsing Flow ( #13645 )
2021-08-10 19:09:23 +02:00
dhrubesh
23d4f8c563
Derived constructors should not be allowed to return primitives ( #13571 )
...
Closes gh-13571
2021-08-09 22:47:46 +02:00
Mickey Rose
da1d166ea6
perf: minor tokenizer tweaks ( #13652 )
2021-08-09 21:20:44 +02:00
Sosuke Suzuki
8a09993e39
fix(parser): add attachComment to ParserOptions type ( #13657 )
2021-08-09 10:05:19 +02:00
overlookmotel
39ba1ff300
Reduce stat calls in register ( #13654 )
2021-08-09 09:14:52 +02:00
Babel Bot
084870faad
v7.15.2
2021-08-08 16:05:27 +00:00
Sosuke Suzuki
e294beb3ac
Add .errors to the @babel/parser return type definitions ( #13653 )
2021-08-07 19:37:03 +02:00
Nicolò Ribaudo
f9dcc4e4bb
Fix array destructuring elision parsing in TS arrow functions ( #13641 )
2021-08-05 21:47:30 +02:00
Nicolò Ribaudo
546e3d958d
v7.15.1
2021-08-05 09:17:03 +02:00
Nicolò Ribaudo
da2168e110
Revert "Add display name after create context ( #13501 )" ( #13637 )
...
This reverts commit e9bc7c18c0de029e1cc0e0935c26f208a683e75b.
2021-08-05 09:04:57 +02:00
Nicolò Ribaudo
6912f968a6
v7.15.0
2021-08-04 23:00:40 +02:00
Yeonju Hwang
0671afcf87
[ts] support optional chain call with generic ( #13513 )
...
* support optional chain call with generic
* Add testcase handling new line
* allow only call if optional chain type parameter
* use exact error message
* add transform-typescript optional-chain call test
* use exact error message
* apply feedbacks
* Fix lint error
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-08-04 17:29:44 +02:00
Huáng Jùnliàng
d5b0d9e33d
Add attachComment parser option to disable comment attachment ( #13229 )
2021-08-04 17:04:22 +02:00
Nicolò Ribaudo
fc3b09e533
Minor updates after merging 7.15.0 PRs ( #13628 )
2021-08-04 09:38:10 -04:00
Tony Gorez
70c66b3799
Handle typescript function overloading in a default export ( #13605 )
...
* feat(ransform-typescript): add test case
* feat(transform-typescript): avoid calling registerGlobalType if node.id is not defined
2021-08-04 00:37:53 +02:00
Sosuke Suzuki
13af87cd3b
standalone: update preset-stage-* ( #13476 )
...
* Move classStaticBlock to stage-3
* Remove stage-4 proposals
* Move PrivatePropertyInObject
* Remove options from preset-stage-3
* Move RecordAndTuple to stage-2
* Move ModuleBlocks to stage-2
* Undo breaking change
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-08-04 00:36:38 +02:00
Nicolò Ribaudo
ddaf0d4296
Enable top-level await parsing by default ( #13387 )
2021-08-04 00:00:04 +02:00
Nicolò Ribaudo
b707842dd0
Support TypeScript const enums ( #13324 )
2021-08-03 23:57:09 +02:00
王清雨
0542f0d7da
feat(typescript): implement namespace alias ( #13528 )
...
support `import alias = Namespace`, reject `import alias = require('foo')`
fix #12345
2021-08-03 23:55:56 +02:00
Federico Ciardi
7e50ee2d82
feat: add noIncompleteNsImportDetection assumption to plugin-transform-modules-commonjs ( #13290 )
2021-08-03 23:55:09 +02:00
Federico Ciardi
c35637e247
feat(ts): raise error for abstract property with initializer ( #13523 )
...
* feat: raise error for abstract property with initializer
* Improve tests
* Address review
* JLHwung review
* Update packages/babel-parser/src/plugins/typescript/index.js
* update test fixtures
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-08-03 23:50:27 +02:00
Huáng Jùnliàng
e9bc7c18c0
Add display name after create context ( #13501 )
2021-08-03 23:32:54 +02:00
Huáng Jùnliàng
15f2f171ab
feat: support hack pipeline in @babel/standalone ( #13555 )
2021-08-03 23:30:16 +02:00
Nicolò Ribaudo
ff287ac5a5
Fix %== parsing in hack pipes ( #13536 )
...
* Fix `%==` parsing in hack pipes
* Use custom token type
* Update packages/babel-parser/src/parser/expression.js
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
* Apply suggestions from code review
Co-authored-by: J. S. Choi <jschoi@jschoi.org>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: J. S. Choi <jschoi@jschoi.org>
2021-08-03 23:30:16 +02:00
J. S. Choi
35e4e1f067
Hack-pipe proposal with % topic token ( #13416 )
...
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
2021-08-03 23:30:16 +02:00
J. S. Choi
cd4b3fbffe
parser: Fix Hack/smart-pipe error positions ( #13426 )
2021-08-03 23:30:16 +02:00
J. S. Choi
6276853eb9
Add support for the "Hack" pipeline proposal ( #13191 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-08-03 23:30:16 +02:00
Nicolò Ribaudo
885e1e02f5
Expose @babel/eslint-parser/experimental-worker ( #13398 )
...
* Expose `@babel/eslint-parser/experimental-worker`
* Fix `@babel/runtime` build on Windows
2021-08-03 23:23:32 +02:00
Samuel Gaus
830b99dc83
Add support for rhino as a compilation target ( #13448 )
...
* Add support for rhino as a compilation target
* Add tests for target: rhino
* Fix test failing due to whitespace
* Keep consistent names for rhino tests in babel 7 and 8
* Bump core-js-compat to 3.15.0
* Change references to rhino to include patch version
* Update compat table data import
* Split transpilation of arrow function features more finely
* Rename rhino fixtures to include the patch number and update to include syntax that is and isn't supported for better testing
* Only use the relevant features for transform-new-target and transform-classes
2021-08-03 23:03:16 +02:00
Nicolò Ribaudo
a254ea38a4
Enable ergonomic brand checks (#priv in) by default ( #13554 )
...
* Enable ergonomic brand checks by default in `@babel/parser`
* Enable ergonomic brand checks by default in `preset-env`
* Fix error position
* Update Babel 8 tests
2021-08-03 23:02:17 +02:00
王清雨
1960f23c22
Add typings to create-class-features-plugin helper ( #13570 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-08-02 21:22:37 +02:00
Oleksandr T
b3ab4769d0
fix(ts): raise error for export default interface {} ( #13622 )
2021-08-02 18:16:01 +02:00