14305 Commits

Author SHA1 Message Date
Nicolò Ribaudo
bfb51362c7
Fix annex B block function hoisting semantics (#12512) 2020-12-16 18:42:00 +01:00
Babel Bot
70fa1b3d49 Add v7.12.11 to CHANGELOG.md [skip ci] 2020-12-16 00:01:15 +00:00
Nicolò Ribaudo
a1acfba387 v7.12.11 2020-12-16 00:55:11 +01:00
Bogdan Savluk
e29742717d
convert @babel/helper-split-export-declaration to TypeScript (#12485)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-16 00:05:48 +01:00
Bogdan Savluk
2f6de2f0c5
Improve AST node definitions in @babel/types (#12510) 2020-12-15 23:48:58 +01:00
Bogdan Savluk
4f1df9a713
convert @babel/helper-function-name to TypeScript (#12486)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-12-15 23:19:58 +01:00
Nicolò Ribaudo
0ea065014b
Mark optional AST fields in generated type definitions (#12511) 2020-12-15 23:19:19 +01:00
vitorveiga
90fb8d275e
fix: handle block-level function declaration (#11801) 2020-12-15 18:22:15 +01:00
Huáng Jùnliàng
ecbbd9da48
chore: always check yarn lock and dedupe during update (#12508)
* chore: always check yarn lock and dedupe during update

* update yarn.lock
2020-12-15 10:18:51 -05:00
Nicolò Ribaudo
28d2cbcbf3
Lazily inject imports to the JSX runtime (#12493) 2020-12-15 12:55:17 +01:00
Huáng Jùnliàng
a0c1a9a9e4
Disallow non octal decimal escape before use strict (#12366) 2020-12-15 12:24:32 +01:00
Huáng Jùnliàng
73f30329a6
refactor: move @babel/helper-validator-option to ts (#12410) 2020-12-15 11:56:14 +01:00
Mateusz Burzyński
581aeb9a23
Reorganize some JSX-related tests (#12502) 2020-12-15 00:02:23 +01:00
Nicolò Ribaudo
1bba1b6da3
Actually run BABEL_8_BREAKING tests (#12492) 2020-12-14 16:08:51 +01:00
Mateusz Burzyński
01ab1e3e7b
Fixed issue with skipping over self & source generated by another instance (#12495) 2020-12-12 17:39:25 +01:00
Huáng Jùnliàng
fc82169b4e
refactor: move @babel/helper-validator-identifier to ts (#12409)
* refactor: rename helper-validator-identifier to ts

* fix flow errors
2020-12-11 17:41:56 -05:00
Bogdan Savluk
a46cd643ab
convert @babel/code-frame to typescript (#12433) 2020-12-10 23:03:47 +01:00
Bogdan Savluk
1290d215f1 Convert @babel/types to TS (#12431)
* babel-types flowts convert
* babel-types code generation updates
* babel-types add more generated types to src (copy logic from scripts/typescript)
* babel-types update generateBuilders to specify exact argument types
* babel-types fix deprecated types generation
* babel-types fixes
* babel-types fix potential bug
* babel-types update generateBuilders, to include proper return types
* babel-types backport types from generated index.d.ts to be included in sources
* babel-types fixes
* babel-types avoid export of builders starting with upper case in ts sources
* babel-types
* babel-types todo updates, small fixes
* babel-types generate helpers
* babel-types remove typescript definitions generation
* babel-types generate files
* babel-types copy d.ts file for deprecated ast node creators into lib folder
* babel-types use t as alias for ast node types namespace
* babel-types update generateBuilders script to use "t" as alias instead of "types"
* babel-types update deprecated builders generation to have more compact file
* babel-types publish the .d.ts file for `@babel/types`
* Publish the .d.ts file for `@babel/types`
* Fix flowcheck
* Prettier
* No need to lint generated .d.ts files (now they are generated by tsc)
* Run prepublish-prepare-dts from prepublish-build
* Fix Babel 8 tests
* Update codecov config
* babel-types more improvements
  - better type for gatherSequenceExpressions
  - mark createUnionTypeAnnotation as deprecated
  - fix createTSUnionType
  - babel-types better type for builder
  - other improvements from PR comments
* babel-types lint fix
* babel-types fix createTSUnionType
* Don't commit .d.ts file in lib, and rename "deprecated"->"uppercase" for builders
* Add back types for TS 3.7
* Update packages/babel-types/package.json
* Cleanup converters types

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-10 21:22:10 +01:00
Bogdan Savluk
c0a8cbd989 Convert @babel/types to TS: rename files (#12431) 2020-12-10 21:22:10 +01:00
Huáng Jùnliàng
1382437ad6
Add js extension to preset-env generated polyfill imports (#10862) 2020-12-10 20:16:46 +01:00
Huáng Jùnliàng
b929a493da
Avoid force trailing comma on test files (#12480)
[skip ci]
2020-12-10 20:16:24 +01:00
Nicolò Ribaudo
211104b09a
Run e2e tests also with BABEL_8_BREAKING (#12462) 2020-12-10 20:11:04 +01:00
Nicolò Ribaudo
bf417186bf
Setup JSX runtime even if the file doesn't contain JSX (#12479) 2020-12-10 19:27:22 +01:00
Huáng Jùnliàng
e5b2680756
Move some build steps to gulp (#12127)
* chore: move generate-standalone to gulp tasks

* move build-flow-typings to gulp tasks

* chore: move build-typescript-typings to gulp tasks

* move generate-type-helpers to gulp tasks

* chore: include build-typings and generate-type-helpers in gulp build

* update generate-standalone comments

* address review comments

* chore: revert build-typings refactor

* fix: run build-typings in build-no-bundle
2020-12-10 12:25:16 -05:00
Mateusz Burzyński
1ef9e196d3
Allow multiple __self/__source props with classic JSX runtime (#12475) 2020-12-10 18:17:20 +01:00
Nicolò Ribaudo
e8176de528
[babel 8] Remove the jsonCompatibleStrings option (#12477)
Co-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>
2020-12-10 18:14:13 +01:00
Babel Bot
4f3fcf1110 Add v7.12.10 to CHANGELOG.md [skip ci] 2020-12-09 22:50:09 +00:00
Nicolò Ribaudo
e901454096 v7.12.10 2020-12-09 23:44:59 +01:00
Nicolò Ribaudo
0e271055c4
Use new CircleCI images (#12450)
* Use new CircleCI images

* Update .circleci/config.yml

* Update .circleci/config.yml
2020-12-09 19:24:24 +01:00
Bogdan Savluk
5067edfdd9
Updates for tsconfig generation (#12420)
* improve makefile to not remove tsconfigs already in git

* update tsconfig generation script to include packages in eslint and codemods folders

* use git clean
2020-12-09 10:27:55 -05:00
Nicolò Ribaudo
a17e4715c9
[babel 8] Enable allowDeclareFields option by default w/ Flow (#12457)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Ajaykumar <pajay2507@gmail.com>
2020-12-09 00:16:10 +01:00
Nicolò Ribaudo
98aa72ca74
Use native Node.js functions when available (#12458) 2020-12-09 00:03:47 +01:00
Mateusz Burzyński
c2fcd69e94
Stop using old JSX transform (#12253) 2020-12-08 22:41:13 +01:00
Nicolò Ribaudo
aca5edb339
Use Yarn 2.4.0 (#12453)
* Use Yarn 2.4.0

* Update the release plugin

* Check yarn bug on CI

* Patch yarn bug

* Update lockfile
2020-12-08 16:21:27 -05:00
Huáng Jùnliàng
6165bc60d1
chore: fix broken REPL link in issue template (#12459) [ci-skip]
* chore: fix broken REPL link in issue template

* Update .github/ISSUE_TEMPLATE/Bug_report.md
2020-12-08 16:17:07 -05:00
Nicolò Ribaudo
b422c7f0ef
[babel 8] Disallow sequence expressions in JSX expression containers (#12447)
* jsx: fix sequence expression at JSXAttributeValue (#8787)

* jsx: fix sequence expression at JSXAttributeValue

* Change logic for detecting unparenthesized expressions

* use parseMaybeAssign instead of custom error handling

Co-authored-by: Daniel Tschinder <daniel@tschinder.de>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* I'm not good at booleans

* Format

* Throw a recoverable error

Co-authored-by: Bruno Macabeus <macabeus@users.noreply.github.com>
Co-authored-by: Daniel Tschinder <daniel@tschinder.de>
2020-12-08 10:15:03 +01:00
Sosuke Suzuki
2ba9265198
Add missing semicolon in AST spec (#12454)
[skip ci]
2020-12-07 19:32:35 +01:00
Nicolò Ribaudo
b5b95f81dc
Add @babel/traverse tests for re-exported bindings (#12429) 2020-12-06 19:33:21 +01:00
Sosuke Suzuki
285402d82f
Add StaticBlock to Table of Contents in AST spec (#12449) 2020-12-05 14:12:42 +01:00
Nicolò Ribaudo
c139d1602b
Prepare codebase for inline Babel 8 breaking changes (#12440) 2020-12-04 21:30:40 +01:00
Huáng Jùnliàng
3bd6a3d781
Make sure estree test should not throw if babel parser does not throw (#12443)
* test: run estree on tests that does not expect an errors

* fix: record the directive expression value to extra AST properties
2020-12-04 13:58:01 -05:00
Nicolò Ribaudo
208acb1d6c
Use require.resolve instead of the resolve package (#12439) 2020-12-04 08:57:09 +01:00
Huáng Jùnliàng
8478027d1a
Make sure babel parser throws exactly same recoverable errors when estree plugin is enabled (#12375)
* refactor: introduce isPrivateName and getPrivateNameSV

* feat: check recoverable errors on estree-throw

* fix: pass through all params of parseBlockBody

* fix: set bigInt to null when invalid bigInt value is parsed

e.g. 0.1n

* fix: use string literal value in error message

When estree plugin is enabled, stringLiteral#extra.raw is not accessible. Use StringLiteral#value instead.

* refactor: introduce hasPropertyAsPrivateName

* fix: adapt to ChainExpression

* fix: port checkLVal early return for method in object pattern

* fix: throw new a?.() on estree

* fix: early return for __proto__ in accessors

* fix: test record element via isObjectProperty

* fix: pass through isLHS in toAssignable

* refactor: introduce isObjectMethod methods
2020-12-03 08:36:54 +00:00
Huáng Jùnliàng
c6aea4e85d
chore: remove travis-ci badge (#12430) 2020-12-01 12:06:44 -05:00
Huáng Jùnliàng
7000ae04a5
refactor: move @babel/helper-annotate-as-pure to ts (#12415)
* refactor: move @babel/helper-annotate-as-pure to ts

* chore: add flow types
2020-12-01 11:23:23 -05:00
Huáng Jùnliàng
5e4b85ab1c
refactor: move @babel/helper-get-function-arity to ts (#12414)
* refactor: move @babel/helper-get-function-arity to ts

* Review comments

* chore: add flow interface
2020-12-01 10:45:05 -05:00
Huáng Jùnliàng
3266d2679a
move @babel/helper-optimise-call-expression to ts (#12411)
* move @babel/helper-optimise-call-expression to ts

* chore: add flow interface
2020-12-01 10:31:39 -05:00
Andrew Smith
71f87874ce
Clarify warning source about underspecified corejs option in preset-env. (#12402)
* Clarify these warnings are for babel-preset-env.

* Fix lint.

* Fix specs.

* Fix merge conflict.

* PR feedback.
2020-12-01 08:58:06 +00:00
Nicolò Ribaudo
4b79ab4a90
Migrate from Travis to GH actions (#12412)
* Migrate linting to GH actions

* Migrate windows tests

* Migrate parser tests

* Update .github/workflows/ci.yml

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>

* Run parser tests in a single job

* Use a single yarn cache

* Remove unused commands from Makefile

* Update .github/workflows/ci.yml

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-12-01 08:55:51 +00:00
Brian Ng
7018ed6e46
Fix printing BigIntLiterals/DecimalLiterals with compact option (#12424) 2020-11-30 20:18:57 -06:00