Huáng Jùnliàng
9e6663f125
Follow-up on initial TS4 catch param support ( #11767 )
...
* refactor: align with AST shape convention
* feat: print catch param type annotations
* test: add test case on transform
2020-07-29 16:51:48 -04:00
Brian Ng
8a1d7e41f2
Allow unknown/any in TS catch clause param ( #11755 )
2020-07-29 16:51:48 -04:00
Nicolò Ribaudo
5b4b3a3e4a
TypeScript 4.0: Allow spread in the middle of tuples ( #11753 )
2020-07-29 16:51:48 -04:00
Huáng Jùnliàng
d7347fb8bd
eslint-parser: ES2020 features ( #11815 )
...
* chore: update espree test on nullish coalescing
* feat: add optional chaining support
* fix: adapt to estree AST shape
* chore: update lockfile
* add estree optional-chaining test fixtures
* address review comments
* chore: simplify smoke test
* export * support
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-07-29 16:46:29 -04:00
Huáng Jùnliàng
059e9124ff
Add decimal parsing support ( #11640 )
...
* docs: add DecimalLiteral to AST spec
* add decimal support
* fix: throw invalid decimal on start
* add DecimalLiteral type definitions
* update parser typings
* add generator support
* add syntax-decimal plugin
* Add syntax-decimal to babel-standalone
* add syntax-decimal to missing plugin helpers
* fix incorrect test macro
2020-07-29 16:43:15 -04:00
Huáng Jùnliàng
2bf38fb914
fix: disallow \8, \9 in strict mode string ( #11852 )
2020-07-21 09:44:56 -04:00
Huáng Jùnliàng
3680f019d7
fix: allow 09.1_1 and 09e1_1 in sloppy mode ( #11854 )
...
* fix: allow 09.1_1 and 09e1_1 in sloppy mode
* polish: avoid extra input source scanning
* chore: move comment [skip ci]
2020-07-21 09:44:28 -04:00
Huáng Jùnliàng
f4eeff947d
fix: correctly set innerEndPos in CoverParenthesizedExpressionAndArrowParameterList ( #11847 )
2020-07-16 17:11:06 -05:00
Huáng Jùnliàng
8f191ead92
chore: fix typo in codebase ( #11846 )
2020-07-16 16:01:20 -05:00
Huáng Jùnliàng
f7964a9ac5
v7.10.5
2020-07-14 14:10:36 -04:00
Huáng Jùnliàng
02c8fd92bd
fix: add optional: false to chained optional call expression ( #11814 )
2020-07-09 20:33:50 -04:00
Huáng Jùnliàng
d67629b114
fix: throw expect jsx plugin error when an idStart or > is seen ( #11774 )
...
* fix: throw expect jsx plugin error when an idStart or > is seen
* fix: avoid throwing undefined
* add test case
2020-07-01 15:17:05 -04:00
Huáng Jùnliàng
b1b21e5c03
docs: add AST spec on optional chain [skip ci] ( #11729 )
2020-07-01 14:20:17 -04:00
Huáng Jùnliàng
7fd40d86a0
v7.10.4
2020-06-30 09:04:22 -04:00
Kai Cataldo
75c2300c28
Add @babel/eslint-plugin-development-internal ( #11376 )
...
* Add @babel/eslint-plugin-internal
* Add dry-error-messages rule
* Address feedback
* Enable new rule
* fix author field
* Fix errors
* Add readme
* Add example configuration
* Handle directories
* run make bootstrap
* More updates!
* Fix errors
* Update tests
* Fix CI race condition
2020-06-22 19:43:29 -04:00
Jorge Henriquez
beca7e2d8e
Add better parser error when using jsx ( #11722 )
...
* Add "<" parser tests
* No {jsx,flow,typescript} plugin
* Type parameter
* Valid JS Code
* Add: better parser error when using jsx
Address #11499
* Add: babel parser test
Test parser with no plugins and when jsx is given with a js expression
* Add: no flow but with typescript test
* Add: type paramter test with no plugins (no flow)
* Add: unclosed jsx element test
2020-06-22 18:12:52 -04:00
Huáng Jùnliàng
30835f14db
fix: implement early errors for record and tuple ( #11652 )
2020-06-20 02:35:27 +02:00
Huáng Jùnliàng
2787ee2f96
v7.10.3
2020-06-19 16:42:41 -04:00
Nicolò Ribaudo
eea156b2cb
Migrate from "master" branch to "main" ( #11715 )
...
* Remove dead link
* Use consistent "homepage" url in package.json
* Update md links
* Update comment link in parser d.ts
* Add comment in gitpod config
* Update circleci config
* Update PULL_REQUEST_TEMPLATE
* Update badges
* Trigger CI
* Update 404 link
2020-06-18 21:52:29 -04:00
骗你是小猫咪
e15a5c7509
Fix innercomments ( #11697 )
2020-06-12 20:22:47 -05:00
Huáng Jùnliàng
b27abd39a8
fix: add optional: false to MemberExpression ( #11709 )
2020-06-12 00:26:26 +02:00
Bogdan Savluk
4108524856
Update prettier to v2 ( #11579 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-07 22:21:33 +02:00
Huáng Jùnliàng
71d3527ef5
Properly parse export default from when exportDefaultFrom is not enabled ( #11676 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-05 09:08:21 -05:00
Nicolò Ribaudo
b0350e5b1e
v7.10.2
2020-05-30 19:16:08 +00:00
Huáng Jùnliàng
b5c4a46a69
refactor: split locationParser into ParserErrors and error message ( #11653 )
2020-05-30 15:05:42 -04:00
Nicolò Ribaudo
88f57a7ea6
v7.10.1
2020-05-27 21:56:37 +00:00
Saulo Santiago
242d9e0b20
Use repository.directory field in package.json files ( #11625 )
...
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-05-27 16:32:25 +02:00
Nicolò Ribaudo
5da2440adf
v7.10.0
2020-05-26 21:20:43 +00:00
Justin Ridgewell
bda759ac3d
Handle private access chained on an optional chain ( #11248 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-05-26 22:18:17 +02:00
Justin Ridgewell
7459038db8
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>
2020-05-26 22:18:17 +02:00
Vivek Nayyar
66b86e088c
added basic support for module attributes and tests updated ( #10962 )
...
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-05-25 01:26:28 +02:00
Kiko Estrada
5dd7f438c9
Enable import.meta by default in @babel/parser ( #11406 )
2020-05-24 22:57:34 +02:00
lazytype
62e686af91
Fix comments for smartPipeline topic-forbidding contexts ( #11597 )
...
[skip ci]
2020-05-23 22:59:46 +02:00
Huáng Jùnliàng
2f31ecf85d
fix: allow bigInt in method name and TSLiteralType ( #11547 )
...
* refactor: add isLiteralPropertyName to parser utils
* address review comments [skip-ci]
* refactor: keyword is valid identifierName
* fix: allow bigint in TSLiteralType
* update typescript test whitelist
2020-05-14 18:40:52 -04:00
Nicolò Ribaudo
31b361b736
Use ?. where it represents the intended semantics ( #11512 )
2020-05-09 23:31:50 +02:00
Nicolò Ribaudo
90a9103e55
Update Flow to 0.123.0 ( #11500 )
2020-04-30 15:26:03 +02:00
Nicolò Ribaudo
9c2846bcac
v7.9.6
2020-04-29 20:33:47 +02:00
Huáng Jùnliàng
fa98a0a5b3
docs: update AST spec ( #11492 )
...
Co-Authored-By: Brian Ng <bng412@gmail.com>
2020-04-28 12:30:01 -04:00
Huáng Jùnliàng
2e4f18ac92
Add some parser missing plugins errors ( #11478 )
...
* fix: do not throw invalid hash in tokenizer
* refactor: bigint has been enabled by default
* polish: add numeric separator missing plugin error
* fix: forward expectPlugin declaration
2020-04-25 10:26:39 +02:00
Brian Ng
40c517ed84
Set exprAllowed to false for star token ( #11449 )
2020-04-21 14:22:40 -05:00
Huáng Jùnliàng
fba64d439d
fix: disallow expression after binding identifier of ( #11355 )
2020-04-21 15:12:23 -04:00
Huáng Jùnliàng
a466f9c310
fix: report missing plugins on type exports ( #11417 )
...
* fix: report missing plugins on type exports
* nit refactors
* Update packages/babel-parser/src/parser/statement.js [skip ci]
2020-04-14 15:23:54 +02:00
Huáng Jùnliàng
8b976b0670
fix: do not push new token context when function is following dot/questionDot ( #11388 )
...
* fix: do not push new token context when function is following dot/questionDot
* more cautiously poping context
2020-04-08 10:10:36 -04:00
Nicolò Ribaudo
d3cf5fb5f4
v7.9.4
2020-03-24 09:26:12 +01:00
Kai Cataldo
4e6c9c52ef
fix: token after strict mode block is evaluated in strict mode ( #11186 )
2020-03-24 08:38:02 +01:00
Huáng Jùnliàng
dc7c5640e9
Compact parser fixture loc info ( #11322 )
...
* chore: compact loc information in parser fixtures
* chore: update test fixtures
2020-03-23 20:10:29 -04:00
Nicolò Ribaudo
1ae85560a7
v7.9.3
2020-03-22 11:57:58 +01:00
Vedant Roy
0e5c1da659
fix: async arrow functions should not be allowed after binary… ( #11284 )
...
* Forbid async arrow functions after binary operator.
This commit makes Babel throw an error when parsing
code like "3 + async() => 2".
* Make atPossibleAsync more accurate
* Change atPossibleAsync to atPossibleAsyncArrow
Add an extra test to atPossibleAsync and refactor it to
atPossibleAsyncArrow. This also fixes a bug in the Typescript plugin,
so a new test has been added.
* Add test for async arrow after unary operator
2020-03-21 19:38:36 +01:00
Nicolò Ribaudo
2399e0df23
v7.9.2
2020-03-21 14:57:31 +01:00
Kai Cataldo
7ca814489a
fix: parse value imports named type as values ( #11296 )
...
* fix: parse value imports named type as values
* Address feedback
* Add plugin tests
* Add isContextual() check
* Remove importKind: value from extraneous nodes
* Ensure importKind is correct for more nodes
* Add additional test
* Address feedback
* Revert formatting
* Fix tests
2020-03-21 01:38:07 +01:00