330 Commits

Author SHA1 Message Date
Nicolò Ribaudo
5b29557af9
Fix "e2e-babel" Babel 8 test (#13909) 2021-11-01 21:49:50 +01:00
Sosuke Suzuki
ddc45a5a50
Enable class static blocks by default (#13713)
* Remove classStaticBlock plugin

* Update tests

* Remove class static blocks from proposalPlugins

* Update tests

* Remove classStaticBlock from mapping for test262

* chore: update babel-types

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-10-28 14:39:04 -04:00
Nicolò Ribaudo
ff922962a4
Fix create-react-app and vue-cli tests on Node.js 17 (#13879)
* Fix `create-react-app` and `vue-cli` tests on Node.js 17

* Only on Node 17

* Fix
2021-10-25 07:22:42 +02:00
renovate[bot]
ce2876e190
chore(deps): update third-party parser tests to 64a1628 (#13816)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-10-08 00:13:02 +02:00
Sosuke Suzuki
7bbdf096aa
Update parser plugins for ts tests (#13808) 2021-10-03 19:51:34 +09:00
Huáng Jùnliàng
ce31b76ac9
remove verifyPackageTree patch (#13805) 2021-10-01 15:15:15 -04:00
Nicolò Ribaudo
2ffb19828f
Update to Yarn 3 (#13140) 2021-09-16 22:23:46 +02:00
Nicolò Ribaudo
44388e6e81
Disallow #a in #b in c and similar expressions (#13727)
* Disallow `#a in #b in c` and similar expressions

* Update packages/babel-parser/src/parser/expression.js

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

* Add test for `await #x in`

* Flow

* Update flow allowlist

* Flow

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-09-04 10:05:09 +02:00
Nicolò Ribaudo
b335dcc67f
Don't manually update npm in CRA test on CircleCI (#13725) 2021-09-02 19:24:30 +02:00
Nicolò Ribaudo
fce0cffc30
Use npm@7 for CRA e2e test (#13724) 2021-09-02 08:16:20 -05:00
Nicolò Ribaudo
fc66d4dd05
Workaround for hanging e2e-breaking Babel test (#13623)
* Workaround for hanging e2e-breaking Babel test

* Maybe this

* Update scripts/integration-tests/e2e-babel.sh

* Update scripts/integration-tests/e2e-babel.sh
2021-08-17 20:37:34 +02:00
Nicolò Ribaudo
9188e9575c
Build the initial React Native project in e2e tests (#13642) 2021-08-10 21:40:10 +02:00
Babel Bot
5884adaa93
chore: update test262 to e6c21464f5f9d46679ad537dbc3e2be753fb5b5c (#13646) 2021-08-06 08:36:36 +02:00
Nicolò Ribaudo
ddaf0d4296
Enable top-level await parsing by default (#13387) 2021-08-04 00:00:04 +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
Huáng Jùnliàng
fa439d6a73
test: patch verifyPackageTree for test purposes (#13567) 2021-07-19 23:26:52 +02:00
Huáng Jùnliàng
6e57617138
Fix await binding error within static block (#13088)
* fix: allow await within SCOPE_FUNCTION under static block

* perf: scan scopeStack for once

* add new test case

* chore: update allowlist
2021-07-16 10:35:19 -04:00
Babel Bot
1c7da020e4
Update test262 (#13561) 2021-07-16 09:10:11 -05:00
Babel Bot
bfcf783834
Update test262 (#13544) 2021-07-10 17:49:41 +02:00
Terence Ng
9cbe283bb8
chore: fix comment typo (#13485)
* chore: fix comment typo

* chore: regenerate tsconfig file

Co-authored-by: terencekhwu <terencekhwu@tencent.com>
2021-06-19 13:16:54 +02:00
Huáng Jùnliàng
b8175ec060
Relax import assertion key-is-type constraint (#13409) 2021-06-02 07:51:56 -04:00
Babel Bot
82a2ca82ca
Update test262 (#13347)
* chore: update test262 to 5e0fc43c6641e6655632ca73479c79f1dcb86a17

* Enable `importAssertions` parser plugin

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-05-21 10:40:53 -04:00
Nicolò Ribaudo
cd7f40a564
[e2e-jest] Remove t.Noop from @types/babel__traverse (#13342) 2021-05-21 14:10:11 +02:00
Huáng Jùnliàng
3195883923
chore: add class-static-block test262 mapping (#13313) 2021-05-14 17:11:10 -04:00
Bogdan Savluk
b670c11070
convert @babel/standalone to typescript (#13212)
* babel-standalone flowts rename

* babel-standalone flowts convert

* babel-standalone - update rollup plugin to support ts files

* babel-standalone code generation update

* babel-standalone

* babel-standalone eslint fixes

* babel-standalone tsconfig.json

* babel-standalone

* babel-standalone tsconfig related fix

* make generate-tsconfig

* yarn install

* babel-standalone use fs.existsSync

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-05-14 09:54:09 -04:00
Nicolò Ribaudo
175a51f94e
Don't use "composite": true in tsc (until it supports cycles) (#13242)
* [ts] Don't use project references

* Commit `tsconfig.json` so it's ready-to-go

* Remove `clean-tsconfig` task

* Fix dts generation

* Add comment

* `yarn`

* Review

* Fix regexp
2021-05-03 20:47:53 +02:00
Babel Bot
b99c4f06d4
chore: update test262 to 70bc32edab22b44db9d671ce505db8842ae200b6 (#13233) 2021-04-29 21:50:43 -04:00
Nicolò Ribaudo
22b0eb038f [ts] Enforce order for the override modifier (#13209)
* [ts] Enforce order for the `override` modifier

* generator

* Add more checks

* Update TS tests
2021-04-28 18:21:31 +02:00
Huáng Jùnliàng
ceaab0bae7 Parse class fields and private methods by default (#13175)
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
2021-04-28 18:21:31 +02:00
Sosuke Suzuki
7484b51e56 Support TS 4.3 get/set type members (#13089)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-04-28 18:21:31 +02:00
Pig Fang
eac0259ce2 Support TS 4.3 static index signature in classes (#13096) 2021-04-28 18:21:31 +02:00
Babel Bot
fb908fd87e
Update test262 (#13196)
* chore: update test262 to eca69e2c95972a4c5780ef58fe1f1e53e871b9b1

* test262: add mapping for privateIn

* test262: ignored syntax-free features

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-04-23 10:40:54 +02:00
Nicolò Ribaudo
eaea9693ff
Install psmisc in vue-cli e2e tests on CircleCI (#13162) 2021-04-16 01:50:09 +02:00
Nicolò Ribaudo
8c445e60ba
Fix e2e vue-cli Babel 8 tests (#13050)
Co-authored-by: Henry Zhu <hi@henryzoo.com>
2021-03-25 19:23:18 +01:00
Bogdan Savluk
6e1e00388b
update tsconfig generation to reference dependencies used in source code (#12941)
* update tsconfig generation to reference dependencies used in source code

in some cases there are devDependecnies used for type-checking, this change adds references to them when generationg tsconfig

* use regexp to extract import sources instead of parsing the code

* try reverting globby to previously installed version

* Run `generate-tsconfig` after `bootstrap-only`

* Revert "try reverting globby to previously installed version"

This reverts commit 56489622137f6f56938c781ea3aec5c98528b033.

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-03-15 12:13:36 -04:00
Nicolò Ribaudo
05fa18e652
Run e2e tests on GH actions (#12517)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2021-03-12 22:33:40 +01:00
Nicolò Ribaudo
039eb2710d
Update all the @babel/* dependencies (#12897) 2021-02-25 02:46:56 +01:00
Siddhant N Trivedi
507ad63140
[babel 8] Remove the Noop node type (#12361)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-02-21 21:59:53 +01:00
Nicolò Ribaudo
e735266dee
Avoid importing .json files (#12759)
* Avoid importing `.json` files

* Use ESold in babel.config.json

* Use `import/extensions` eslint plugin
2021-02-05 23:34:36 +01:00
Nicolò Ribaudo
a0e3ef2117
Remove workaround for #12567 in e2e Jest tests (#12749) 2021-02-04 14:46:09 +01:00
Karan Sapolia
b63be942ce
Use native ESM for dev scripts (#12296)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-30 18:36:21 +01:00
Sosuke Suzuki
45fdde0ce2
(ts) Throw for abstract methods in a non-abstract class (#12686) 2021-01-27 18:56:55 +01:00
Zen
6c9a481e83
@babel/preset-typescript: fix tsx assigment issue (#12599) 2021-01-10 09:21:39 -06:00
Nicolò Ribaudo
50462eb5e4
[babel 8] Enable allowDeclareFields option by default with TS (#12461) 2021-01-08 01:28:20 +01: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
d9dfd29ce8
Archive @babel/polyfill (#12541)
babel/babel-archive@701775cd9f
2020-12-22 16:52:40 +01: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
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
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
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