14179 Commits

Author SHA1 Message Date
Bogdan Savluk
584518d04c
Improve types in @babel/helper-function-name (#12550) 2021-01-06 14:12:45 +01:00
Daniel Arthur Gallagher
e8b08523f4
docs: add package-specific documentation links (#12531)
[skip ci]
2021-01-06 14:11:53 +01:00
Nicolò Ribaudo
fb12afc289
Declare template objects inline (#12588) 2021-01-05 23:25:15 +01:00
Martin Packman
ed90f17978
Optimize jsx spreads of object expressions (#12557) 2021-01-05 23:04:26 +01:00
Babel Bot
0d6063f1b9
chore: update test262 to 9ca13b12728b7e0089c7eb03fa2bd17f8abe297f (#12579) 2021-01-03 23:59:04 +01:00
Niklas Mischkulnig
fdb5829a60
Use isIdentifierChar instead of regex for toIdentifier (#12575)
* Use isIdentifierChar instead of regex for toIdentifier

* Apply suggestions from code review

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

* Undo dep

* Update packages/babel-types/test/converters.js

* Add testcase starting with a number

* Add test for non-ascii starting character

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-12-31 11:22:46 -05:00
Simen Bekkhus
2d35f5a8f7
fix(code-frame): do not pad gutter of empty lines (#12567)
* fix(code-frame): do not pad gutter of empty lines

* Add workaround for expected Jest e2e test failure

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-29 15:26:13 +01:00
Nicolò Ribaudo
fbef603c43
Report a SyntaxError for } and > in JSX text (#12451)
cherry-pick  #11046

Co-Authored-By: Kai Cataldo <kai@kaicataldo.com>
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
2020-12-28 19:04:54 +01:00
Zach Panzarino
0dbc3dd4a0
Add errorRecovery option to type definitions in babel-parser (#12564)
* Fix options types for babel-parser

* I love editing files on gh.com
2020-12-27 13:25:48 +01:00
Babel Bot
0d55896483 Add v7.12.12 to CHANGELOG.md [skip ci] 2020-12-23 14:06:07 +00:00
Nicolò Ribaudo
d88c60cea9 v7.12.12 2020-12-23 14:55:59 +01:00
Nicolò Ribaudo
5b5b548036
Publish to npm from GitHub actions (#12526)
* Publish to npm from GitHub actions

* Remove publish-ci from Makefile

This was meant to be used _now_, but I didn't end up using it

* Test

* Revert "Test"

This reverts commit 04095c17db8352710c12849a5b1fa53e853bd6f5.
2020-12-23 00:18:03 +01:00
Nicolò Ribaudo
d9dfd29ce8
Archive @babel/polyfill (#12541)
babel/babel-archive@701775cd9f
2020-12-22 16:52:40 +01:00
Babel Bot
60138bea0d
chore: update test262 to b2e9dff2816cceb5ee84c0c226c50a31d01a7297 (#12539) 2020-12-22 10:39:39 -05:00
Nicolò Ribaudo
17d62c3743
refactor: Move react-jsx-development implementation into react-jsx (#12524)
* Move react-jsx-development implementation into react-jsx

* Move helper-builder-jsx-experimental into transform-react-jsx

* Move JSX validation

* Move Program visitor

* introduce get/set utils

* pre -> getTag

* Dedupe code

* post -> getState

* Simplify logic

* Move final pieces

* Other simplifications

* Update lockfile

* Fix standalone bundling
2020-12-22 11:53:14 +01:00
Zen
e08f68bf61
Skip discriminant when renaming starting from SwitchStatement (#12530) 2020-12-22 03:10:43 +01:00
Huáng Jùnliàng
814212f0be
Remove babel polyfill from fixture test runner (#12130)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-22 02:42:39 +01:00
Huáng Jùnliàng
14534e6f78
polish: create ascii-only labels [skip ci] (#12540) 2020-12-22 01:52:12 +01:00
Huáng Jùnliàng
1805d50bb8
fix parser tests updater again (#12538) 2020-12-21 18:09:07 -05:00
Huáng Jùnliàng
bb2343aba4
fix: updater does not work on main branch (#12537)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-21 17:06:15 -05:00
Huáng Jùnliàng
0f866ed9d2
Add a workflow to update test262 tests weekly (#12523)
* chore: draft update parser tests workflow

* Build babel parser

* chore: use Babel bot as git user name

* use babel-bot token

* refactor: use actions/github-script

* rename
2020-12-21 10:04:57 -05:00
Nicolò Ribaudo
56c7024d5d
Update release-tool and define implicit deps for runtime (#12527) 2020-12-19 01:13:01 +01:00
Huáng Jùnliàng
d28c1e52d0
Enable PnP linker on CI build job (#12011)
* chore: use pnp when building babel artifacts

* chore: refine ci config

* fix: match any n_m as unambiguous

The pnp module path starts from global cache path, which does not
match **/n_m

* fix: remove dedupe option and abort rollup on unexpected warning messages

* chore: suppress Circular_Dependency warning

* fix build error

* replace make bootstrap-only by yarn install
2020-12-18 19:00:43 -05:00
Nicolò Ribaudo
b9deeb458b
Restore @babel/types support for old TS versions (#12521) 2020-12-17 18:34:23 +01:00
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