renovate[bot]
ecae53a98e
chore(deps): update dependency typescript to ~4.5.0 ( #14018 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-12-02 16:59:11 +01:00
Bogdan Savluk
0058b7fef4
Migrate Babel from Flow to TypeScript (except Babel parser) ( #11578 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-25 23:09:13 +01:00
Emily Marigold Klassen
fca5c9a501
Don't transform declare class in proposal-class-properties ( #13854 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-10-21 00:30:05 +02:00
Huáng Jùnliàng
c2f747c9b9
Improve transform-react-jsx typings ( #13820 )
...
* improve transform-react-jsx typings
* rename test fixtures
* remove unreachable sourceSelf check
* update test fixtures
* Update packages/babel-core/src/index.ts
* Update packages/babel-plugin-transform-react-jsx/src/create-plugin.ts
Co-authored-by: Henry Zhu <hi@henryzoo.com>
* Update packages/babel-plugin-transform-react-jsx/src/create-plugin.ts
Co-authored-by: Henry Zhu <hi@henryzoo.com>
2021-10-07 14:01:50 -04:00
Patrick Eriksson
7acc68a86b
Improve debug logging for IgnoreList ( #13814 )
2021-10-06 14:53:28 +02:00
Federico Ciardi
66cadea103
Revert "fix: non breaking align options naming" ( #13732 )
...
This reverts commit 51a0caa8a2dac2651856035760413d76fb422d77.
2021-09-04 09:34:41 +02:00
Federico Ciardi
51a0caa8a2
fix: set parserOpts.sourceFilename from root sourceFileName ( #13532 )
...
* Partial #13518
* Update tests
2021-08-19 15:54:53 -04:00
Huáng Jùnliàng
614b486780
Use named imports for babel types ( #13685 )
...
* migrate to named babel types imports
* perf: transform babel types import to destructuring
* fix merge errors
* apply plugin to itself
2021-08-18 10:28:40 -04:00
王清雨
b00bd94ad8
convert @babel/helpers to typescript ( #13679 )
...
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
2021-08-16 22:39:30 +02:00
Federico Ciardi
7e50ee2d82
feat: add noIncompleteNsImportDetection assumption to plugin-transform-modules-commonjs ( #13290 )
2021-08-03 23:55:09 +02:00
Jaeseok Kang
6df0b7c25f
Fix config validation message typo ( #13515 )
...
* Fix config validation message typo
* Fix `checkNoUnwrappedItemOptionPairs` type param
2021-06-29 08:54:47 +02:00
Sosuke Suzuki
ad693cc0a0
Update prettier to 2.3.1 ( #13460 )
2021-06-14 17:33:58 +02:00
Nicolò Ribaudo
f85c6437c5
Pass assumptions set in presets to plugins ( #13321 )
2021-05-17 22:00:01 +02:00
Nicolò Ribaudo
9d620c2d42
[babel 8] Move ESLint parsing to a Worker ( #13199 )
2021-05-17 17:04:10 +02:00
Sosuke Suzuki
b2d9156cc6
Update to Prettier 2.3 ( #13288 )
2021-05-10 15:34:13 +02:00
Huáng Jùnliàng
28d7442aae
Parse async do expressions ( #13043 )
...
* parse async do expressions
* add test cases
* update test fixtures
* chore: add syntax-async-do-expressions
* generater support
* fix: do not transform async do expressions
* chore: add asyncDoExpressions to missing plugin helpers
* update ast types
* add more test cases
* throw when asyncDoExpressions is enabled but not doExpressions
* avoid add parentheses for async do expressions
* address review comments
* chore: update parser typings
2021-04-28 18:26:01 +02:00
Chris West
d0fcbfccdd
perf(core): check files before interacting with them ( #13090 )
...
* perf(core): check files before interacting with them
* refactor: inline fs.exists.sync -> nodeFs.existsSync
2021-04-28 00:41:18 +02:00
Huáng Jùnliàng
88da2e80ed
perf: avoid loadFullConfig when creating block hoist plugin ( #13223 )
...
* perf: avoid loadFullConfig when creating block hoist plugin
* address code review comments
2021-04-27 14:39:18 -04:00
Micha Reiser
adb5adac0c
fix: Don't load browserslist in block-hoist-plugin ( #13182 )
...
* fix: Don't load browserslist in block-hoist-plugin
* Remove test case
* Remove added new line
2021-04-21 09:20:17 -04:00
Bogdan Savluk
a647b9ea6b
Convert @babel/core to TypeScript ( #12929 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-03-30 19:51:35 +02:00
Bogdan Savluk
c8a91d9eef
Rename @babel/core files to .ts ( #12929 )
2021-03-30 19:51:35 +02:00
Nicolò Ribaudo
06eb3b73cb
Only resolve package.json when relative configs are enabled ( #13063 )
2021-03-28 12:04:42 +02:00
Nicolò Ribaudo
8e8954b470
[babel 8] Remove module-specific options from @babel/core ( #12724 )
2021-03-28 01:27:37 +01:00
Henry Zhu
6b39bafab6
Remove lodash deps ( #13057 )
...
* inline escapeRegExp instead of using any dep
* inline camelCase
* replace merge with object spread
* copy if array instead of using clone
* inline isRegExp
* review fixes!
* remove escape-string-regexp from package.json and in test
* add error for field defaults that are not primitives or empty arrays
* replace merge with object spread
* yarn
2021-03-27 17:59:34 +01:00
Nicolò Ribaudo
e68f2ce195
Correctly handle relative browserslistConfigFile paths ( #13031 )
...
* Correctly handle relative `browserslistConfigFile`
* Fix flow
2021-03-26 15:07:28 -04:00
Nicolò Ribaudo
b0d83daceb
Resolve .browserslistrc as a project-wide file ( #13028 )
2021-03-25 21:37:42 +01:00
Justin Ridgewell
327b4cec49
Remove lodash sortBy use ( #13021 )
2021-03-25 18:56:18 +01:00
Justin Ridgewell
73dcd06293
Remove some lodash/cloneDeep calls ( #13032 )
2021-03-25 18:01:19 +01:00
Nicolò Ribaudo
564ca6638f
Set rootMode: "root" in loadPartialConfig ( #13040 )
2021-03-23 20:11:10 +01:00
Huáng Jùnliàng
b784c81aeb
Do not bail on SHOW_CONFIG_FOR matches ( #12954 )
...
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-03-23 20:02:07 +01:00
Nicolò Ribaudo
d04842a700
Avoid using CJS globals in internal source files ( #12963 )
...
* Lint against CJS globals in modules
* Use `import.meta.url` instead of `__filename` in `src` files
* Prepare fixtures runner for `import.meta.url`
* Use `import.meta.url` instead of `__filename` in `test/index` files
* Remove `__dirname` from remaining test files
dirname
* Avoid using `module` in `src` files
* Avoid using `require` in `src` files
* Avoid using `require` in `test` files
* Update `@types/node`
* Compile dynamic import in `@babel/node`
* Fix windows
* Use `@babel/plugin-proposal-dynamic-import` from npm
2021-03-05 19:55:36 +01:00
Nicolò Ribaudo
b17231e1af
[internal] Keep the .cjs extension when compiling source files ( #12820 )
...
* [internal] Keep the .cjs extension when compiling
* yarn
2021-02-25 18:03:05 +01:00
Nicolò Ribaudo
5861704361
Export function versions of createConfigItem ( #12852 )
2021-02-23 02:01:39 +01:00
Julian Grinblat
d1d6ee6dc2
Add cjs as a default extension ( #11498 )
2021-02-21 17:56:15 +01:00
Nicolò Ribaudo
6ef7b51a11
Implement assumptions defined in the babel/rfcs#5 RFC
...
- `mutableTemplateObject` and `ignoreToPrimitiveHint` (#12408 )
- `setClassMethods` (#12407 )
- `setComputedProperties` (#12490 )
- `ignoreFunctionLength` (#12491 )
- `noDocumentAll` (#12481 )
- `iterableIsArray` and `arrayLikeIsIterable` (#12489 )
- `pureGetters` (#12504 )
- `skipForOfIteratorClosing` (#12496 )
- `objectRestNoSymbols`, `setSpreadProperties` and `pureGetters` (#12505 )
- `noNewArrows` (#12613 , #12793 )
- `setPublicClassFields` and `privateFieldsAsProperties` (#12497 )
- `constantReexports` and `enumerableModuleMeta` (#12618 )
- `constantSuper`, `superIsCallableConstructor` and `noClassCalls` (#12726 )
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
Co-authored-by: Huáng Jùnliàng <JLHwung@users.noreply.github.com>
2021-02-21 17:09:45 +01:00
Nicolò Ribaudo
7965c15557
Add @babel/core support for the new assumptions option ( #12219 )
...
- Disallow setting assumptions to `false` in presets (#12498 )
2021-02-21 17:09:45 +01:00
Nicolò Ribaudo
cb404e4776
Add targets and browserslist* options to @babel/core ( #12189 )
2021-02-21 17:09:43 +01:00
Nicolò Ribaudo
31ca15ef58
Support .mjs plugins/presets and async factories ( #12266 )
2021-02-21 17:08:30 +01:00
Devon Govett
35c41148dd
Do not cache non-existent JS config files forever ( #12211 )
...
Missed a spot in #11906 . Currently if you don't have a JS config file and then add one to your project, it will not be picked up without restarting the process. Changing from caching forever to never caching when files don't exist fixes the issue.
2021-02-18 12:18:02 +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
4f2d47500f
Don't use require() in ESM files ( #12728 )
...
* Update `yarn-plugin-conditions`
* Don't use `require()` in ESM files
2021-02-01 17:09:02 +01:00
Henry Zhu
464a02ffe1
[babel 8] Replace lodash/escapeRegExp with escape-string-regexp ( #12677 )
...
Co-authored-by: James Addison <jay@jp-hosting.net>
2021-01-23 22:21:34 +01:00
Nicolò Ribaudo
208acb1d6c
Use require.resolve instead of the resolve package ( #12439 )
2020-12-04 08:57:09 +01:00
Jason Miller
ddd868f838
Account for ConfigItem being generated by another copy of Babel ( #11734 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-11-10 15:02:46 +01:00
Nicolò Ribaudo
31396b286d
Make loadPartialConfig's options optional ( #12200 )
2020-10-16 15:46:49 +02:00
Sven Sauleau
af8e0facc1
Parse import-assertions ( #12139 )
...
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-10-14 21:18:16 +02:00
Huáng Jùnliàng
f697e7995d
Transform class static block ( #12143 )
...
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:16:24 +02:00
Huáng Jùnliàng
21d7ee2610
String import/export specifier ( #12091 )
...
* feat: parse moduleExportName
* feat: add validators
* Support string specifier name in commonjs transform
* Support string specifier name in export-ns-from
* test: add loose testcases
* test: add testcases for amd and umd
* feat: support systemjs
* test: update fixtures fixed in #12110
* add plugin name typings
* test: rename test layout
* feat: implement under moduleStringNames flag
* chore: add plugin syntax module string names
* feat: support ModuleExportName as ModuleExportName
* test: update test fixtures
* fix flow errors
* docs: update AST spec
* feat: support { "some imports" as "some exports" }
* feat: support { "some imports" as "some exports" } in systemjs
* test: add test on `import { "foo" }`
* Address review comments
* add moduleStringNames to missing plugin helpers
* Apply suggestions from code review
* update test fixtures
* Update packages/babel-parser/src/parser/error-message.js
* update test fixtures
Co-Authored-By: Kai Cataldo <kai@kaicataldo.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 20:01:37 +02:00
Nicolò Ribaudo
1b90d90fcc
Instantiate presets before plugins ( #11689 )
2020-10-14 19:59:02 +02:00
Devon Govett
ce7b170ab7
Return a list of files that were read from loadPartialConfig ( #11907 )
2020-10-14 19:59:02 +02:00