41 Commits

Author SHA1 Message Date
Huáng Jùnliàng
4f92f8c11c
fix: use semver gte comparison on polyfill version tester (#12783) 2021-02-10 22:54:50 -05: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
2811b535d6
Add yarn-plugin-conditions to update Babel 8 dependencies (#12659)
* Add `yarn-plugin-conditions` to update Babel 8 dependencies

https://github.com/nicolo-ribaudo/yarn-plugin-conditions

* Update .gitattributes
2021-01-22 10:45:03 +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
98aa72ca74
Use native Node.js functions when available (#12458) 2020-12-09 00:03:47 +01: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
Nicolò Ribaudo
c139d1602b
Prepare codebase for inline Babel 8 breaking changes (#12440) 2020-12-04 21:30:40 +01:00
Nicolò Ribaudo
208acb1d6c
Use require.resolve instead of the resolve package (#12439) 2020-12-04 08:57:09 +01:00
Nicolò Ribaudo
6a0e909c13
Don't compile import() in development (#12288) 2020-11-18 16:02:02 +01:00
Nicolò Ribaudo
f80478c06d Prepare repository for gradual flow->ts migration (#12317)
Co-authored-by: Bogdan Savluk <savluk.bogdan@gmail.com>
2020-11-09 23:17:24 +01:00
Huáng Jùnliàng
ea2892fefc
add declare to class properties type annotations (#12257)
* add declare to class properties type annotations

* chore: use preset-flow
2020-10-27 10:05:01 -04:00
Huáng Jùnliàng
f2da186714
refactor: add @babel/helper-validator-option (#12006)
* refactor: add @babel/helper-validator-option

* refactor: simplify validateTopLevelOptions

* perf: the recursive version is not practically fast

* Update packages/babel-helper-validator-option/README.md

Co-authored-by: Brian Ng <bng412@gmail.com>

* Update packages/babel-helper-validator-option/src/validator.js

* fix: incorrect type annotation

* refactor: use babel/helper-option-validator in babel/compat-data

* chore: fix flow types error

* Address review comments

* address review comments

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-09-24 16:23:35 -04:00
Huáng Jùnliàng
028a051c2b
Move legacy node version tests to GitHub actions (#11952)
* chore: run node 6 and 8 test on GitHub actions

* fix: apply dynamicImportUrlToPath polyfill on publish

* Apply hacks unconditionally

* try fix highlight issues

* address review comments

* chore: add test-legacy build env

* Update .travis.yml [skip ci]

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-08-14 14:20:06 -04:00
Huáng Jùnliàng
ad60153a98
Update @babel/* deps (#11899)
* chore: remove extra install step for eslint packages

* chore: update babel deps
2020-07-31 20:35:19 -04:00
Bogdan Savluk
32e7bb4027
fix build config to work the same when running on windows (#11688) 2020-07-30 14:11:58 -04:00
Huáng Jùnliàng
6373eb5d82
chore: use modules: "auto" (#11879)
* chore: use modules: “auto”

* address review comments
2020-07-28 09:41:35 -04: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
0aa5a47196
chore: remove included proposal plugins (#11433) 2020-04-16 21:14:46 +02:00
Huáng Jùnliàng
e39b508030
Add @babel/helper-validator-identifier (#11289)
* refactor: replace esutils.keywords.isIdentifierNameES6 by helper-validator-identifier

* refactor: replace esutils isReservedWordES6 by isKeyword || isReservedWord

* address review comments

* chore: specify both “main” and “exports”

* build helper-validator-identifier before babel-types
2020-03-20 12:23:14 +01:00
Nicolò Ribaudo
114f6726a7
Pass URLs to import() rather than paths (#11193)
* Pass URLs to import() rather than paths

* Make tests pass

* (╯°□°)╯︵ ┻━┻

* (╯°□°)╯︵ ┻━┻           (╯°□°)╯︵ ┻━┻             (╯°□°)╯︵ ┻━┻
2020-03-03 19:54:01 +01:00
Huáng Jùnliàng
0b3dea8f54
Turn on no-fallthrough rule (#11093)
* chore: turn on no-fallthrough

* chore: fix no-fallthrough errors
2020-02-07 22:05:19 +01:00
Nicolò Ribaudo
755ec192e2
Archive @babel/preset-env-standalone (#10993)
* Move @babel/preset-env-standalone to babel-archive

babel/babel-archive@a1fadd2d77

* Move tests to @babel/standalone

* Remove references in build scripts

* Update lockfile

* Delete duplicated test file.

It's already in babel-standalone/test/babel.js
2020-02-06 01:03:36 +01:00
Nicolò Ribaudo
ae06baf22f
Add support for babel.config.mjs and .babelrc.mjs (#10903)
* Add support for babel.config.mjs and .babelrc.mjs

* Use path.extname
2020-01-10 23:14:29 +01:00
Nicolò Ribaudo
282f81bd67
Prepare @babel/core for asynchronicity (#10507)
* Prepare @babel/core for asynchronicity

* Include regenerator-runtime in standalone build

* Fix rollup build
2020-01-10 22:44:13 +01:00
Nicolò Ribaudo
04354d1556
Extract targets parser and compat data from preset-env (#10899)
* Extract targets parser and compat data from preset-env

* Review by Jùnliàng

* isItemRequired -> targetsSupported

* Export isRequired
2020-01-10 03:15:20 +01:00
Huáng Jùnliàng
a0bed42aec
Bundle standalone using rollup (#10779)
* chore: bundle babel-standalone via rollup

Co-authored-by: Daniel Tschinder <daniel.tschinder@researchgate.net>

* chore: build babel-preset-env-standalone via Rollup

# Conflicts:
#	yarn.lock

* chore: add babelEnvName

* chore: farewell webpack

* chore: add terser minification

* chore: dedupe some popular dependencies

* chore: remove unused devDependencies

* chore: move plugin-babel-source to scripts/

* make prettier happy

* fix: rewrite available-plugins into esm

* chore: add extra unambiguous sources when env is rollup/standalone
2019-12-04 23:09:52 -05:00
Huáng Jùnliàng
683adcbb70 Reduce standalone build size (#10668)
* infra: build standalone against src

* infra: add absoluteRuntime

# Conflicts:
#	babel.config.js

* chore: remove `process.env` replace

* add $ to signify exact match

credits to Nicolò
2019-11-21 14:31:38 +01:00
Kai Cataldo
a6d134804a Unify build step for ESLint packages (#10723) 2019-11-16 10:15:15 +01:00
Huáng Jùnliàng
5bb4ee73da chore: use loose mode of transform (#10718) 2019-11-15 10:48:37 -06:00
Huáng Jùnliàng
ce070ce422 bump @babel/* dev dependencies (#10648)
* bump @babel/* dev dependencies

* chore: align version to @babel/runtime

* chore: bump to 7.7.1

* chore: bump to 7.7.2
2019-11-13 00:05:38 +01:00
Huáng Jùnliàng
5f1970433d
chore: only apply lazy cjs module transform on cli and core (#10443) 2019-09-27 16:53:27 -04:00
Nicolò Ribaudo
eaa1474541
Enable optional chaining and nullish coalescing plugins (#10494)
* Add optional chaining plugin

* Nullish coalescing
2019-09-24 23:11:56 +02:00
Brian Ng
58cf1a7d48
Bump deps (#10007) 2019-05-21 15:10:29 -05:00
Nicolò Ribaudo
e4072752bc
Transpile babel-polyfill to es5, instead of targeting node 6 (#9812)
* Transpile babel-polyfill to es5, instead of targeting node 6

* Update babel.config.js
2019-04-15 20:01:16 +02:00
Brian Ng
c259ec5408
Bump Babel deps (#9718) 2019-03-20 11:00:58 -05:00
Brian Ng
f1ab6120d2
Bump Babel deps (#9590) 2019-02-26 11:21:00 -06:00
Daniel Tschinder
10555c719e Build the parser also for node 6.9 and up 2019-01-17 16:16:27 -08:00
Logan Smyth
02760d0f70
Run transform-runtime on the standalone bundle so it stays ES5-compatible. (#8024) 2018-07-29 16:52:11 -07:00
Chaitanya Kumar Kamatham
daf0ca8680 Rename "babylon" to "@babel/parser" (#7937) 🎉 2018-05-19 00:03:05 -04:00
Logan Smyth
a192f8beb4 Limit node version to current LTS. 2018-05-14 21:54:16 -07:00
Logan Smyth
acf509bab5
Upgrade Babel to self-host with beta.46 (#7784) 2018-04-27 15:04:37 -07:00