735 Commits

Author SHA1 Message Date
Nicolò Ribaudo
2f755ef052 v7.12.17 2021-02-18 15:58:43 +01:00
Babel Bot
b1921d2d9b v7.12.15 2021-02-04 21:27:03 +00:00
Nicolò Ribaudo
77d46bcb1a
Respect the jsescOption.minimal generator option (#12755) 2021-02-04 16:45:02 +01:00
Nicolò Ribaudo
d291edbdf1 v7.12.13 2021-02-03 01:59:31 +01:00
Bogdan Savluk
9ac36b136a
convert @babel/generator to TypeScript (#12487)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-27 19:21:07 +01:00
Huáng Jùnliàng
446c70c6c3
fix: avoid line breaks between class members head and key (#12653) 2021-01-24 02:06:01 +01:00
Huáng Jùnliàng
cd090e9842
[babel 8] Output minimal strings by default (#12675)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
Co-authored-by: Justin Ridgewell <jridgewell@google.com>
2021-01-23 22:50:07 +01:00
Armano
6783308875
fix: allow to execute util scripts (#12670)
[skip ci]
2021-01-22 00:31:09 +01:00
Huáng Jùnliàng
62290aa1ba
[babel 8] Don't create TSParenthesizedType nodes by default (#12608)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Sergey Melyukov <s.melukov@gmail.com>
2021-01-13 01:13:09 +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
a1acfba387 v7.12.11 2020-12-16 00:55:11 +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
Nicolò Ribaudo
e901454096 v7.12.10 2020-12-09 23:44:59 +01:00
Brian Ng
7018ed6e46
Fix printing BigIntLiterals/DecimalLiterals with compact option (#12424) 2020-11-30 20:18:57 -06:00
Nicolò Ribaudo
a41da05ce9 v7.12.5 2020-11-03 23:30:17 +01:00
Álvaro Mondéjar
b649f8d192
Fix packages documentation README links. (#12289) 2020-10-30 21:19:21 +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
Ian Craig
87a30524f6
Correctly indent multiline comments when retainLines: true (#12260) 2020-10-27 12:46:25 +01:00
Sosuke Suzuki
faaebfe91f
Support Import Assertions for re-export statement (#12249) 2020-10-26 15:18:45 +01:00
Nicolò Ribaudo
ed498a772b
Use workspace:* for devDependencies (again) (#12217)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-10-19 18:32:06 +02:00
Nicolò Ribaudo
7f4b83833f v7.12.1 2020-10-16 00:36:30 +02:00
Huáng Jùnliàng
eec01fe078
chore: use workspace:* for dev deps (#12186) 2020-10-15 14:03:50 -04:00
Nicolò Ribaudo
726154c78e v7.12.0 2020-10-14 21:48:45 +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
3ccca88178 Parse class static block (#12079)
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-14 21:16:24 +02:00
Brian Ng
6830c90ac9
Support TypeScript mapped type 'as' clauses (#12129) 2020-10-14 20:16:22 +02:00
Nicolò Ribaudo
9f40d6fcd0
[ts] Add support for the "intrinsic" keyword (#12147) 2020-10-14 20:15:17 +02:00
Brian Ng
3ba1ece0ce
Fix printing TSTypeOperator (#12114) 2020-09-28 11:01:13 -05:00
overlookmotel
1a074ee7e6
Ensure expressions wrapped in parens (#12082) 2020-09-25 15:58:04 -05:00
Ananda Umamil
af612db8c3
Fix @babel/generator does not print decorators of private properties (#12081) 2020-09-25 08:16:28 -05:00
Justin Ridgewell
f49234aa69
Add sourcemap markings for each line of a string (#12086)
* Add sourcemap markings for each line of a string

Fixes https://github.com/babel/babel/issues/12083

* Fix for multiple newlines

* Optimize with indexOf

* Comment explaining newline search
2020-09-22 21:36:21 -04:00
Huáng Jùnliàng
e51139d7fd v7.11.6 2020-09-03 11:11:11 -04:00
Huáng Jùnliàng
a91fdeb1f6
Revert #12014 (#12027)
* Revert "chore: bump source-map to 0.6.1 (#12014)"

This reverts commit d5bcc08bf7134db165af91a88a61c8c6bfe39144.

* test: add regression tests for #12025
2020-09-01 15:42:01 -04:00
Huáng Jùnliàng
af64ccb2b0 v7.11.5 2020-08-31 15:54:06 -04:00
Huáng Jùnliàng
d5bcc08bf7
chore: bump source-map to 0.6.1 (#12014) 2020-08-27 17:17:49 -04:00
Huáng Jùnliàng
3fad7eab9b
Use Yarn 2 (#11962)
* chore: use yarn 2

* chore: remove redundant yarn locks

* chore: remove publishEslintPkg

* chore: remove redundant make bootstrap

* Update .yarnrc.yml

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

* chore: use workspace protocol for eslint packages in the root

Co-Authored-By: merceyz <merceyz@users.noreply.github.com>

* chore: pin caniuse-lite versions

Testcases in packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie
depends on specific caniuse-lite versions. We pinned the version here
so we don't have to deal with fixture different in e2e-tests
where all deps will be updated and tested.

* chore: resolve yarn install warnings

* chore: update yarn cache path on circle/travis

* chore: add yarn deduplicate plugin

* chore: deduplicate lock files

* chore: move devDependencies to leaf packages

* chore: remove @yarnpkg/plugin-constraints

* chore: remove unused dedupe options

* test: fix unwanted self reference

* chore: remove output-file-sync dependency

* chore: update browserify to 16.5.2

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-08-25 14:37:30 -04:00
Huáng Jùnliàng
90b1989569 v7.11.4 2020-08-20 14:51:38 -04:00
Huáng Jùnliàng
3bff1ce35a
fix: disallow line break between async and property (#11947) 2020-08-10 17:33:14 -05:00
Huáng Jùnliàng
45fdb87747 v7.11.0 2020-07-30 17:12:07 -04:00
Nicolò Ribaudo
eba4c3b6ed TypeScript 4.0: Support labeled tuple elements (#11754)
* TypeScript 4.0: Support labeled tuple elements

* More tests

* Disallow mixing labeled and unlabeled elements

* Update AST shape

* Enable test after rebase

* Allow labeled spread types

* Fix flow

* Add types and generator suport

* Update packages/babel-parser/src/plugins/typescript/index.js

* Prettier
2020-07-29 16:51:48 -04:00
Huáng Jùnliàng
9e6663f125 Follow-up on initial TS4 catch param support (#11767)
* refactor: align with AST shape convention

* feat: print catch param type annotations

* test: add test case on transform
2020-07-29 16:51:48 -04:00
Huáng Jùnliàng
059e9124ff
Add decimal parsing support (#11640)
* docs: add DecimalLiteral to AST spec

* add decimal support

* fix: throw invalid decimal on start

* add DecimalLiteral type definitions

* update parser typings

* add generator support

* add syntax-decimal plugin

* Add syntax-decimal to babel-standalone

* add syntax-decimal to missing plugin helpers

* fix incorrect test macro
2020-07-29 16:43:15 -04:00
Joshua Ohlman
e12caf4f69
Always retain lines for async arrow (#11836) 2020-07-15 22:48:08 +02:00
Huáng Jùnliàng
f7964a9ac5 v7.10.5 2020-07-14 14:10:36 -04:00
Bogdan Savluk
b1a8e72e16
Refactor generated builder names in @babel/types (#11582)
* ensure only builders starting with lowercase are used

* update generate builders to have function name starting flow lowercase

* fix bug in deprecated builders

* remove comment about not yet discussed change in next major version
2020-07-07 09:53:00 +02:00
James Addison
3e55270135
Reduce dependency on lodash functions: includes, uniq, repeat, isinteger (#11790)
* Replace lodash 'includes' usage with Array.prototype.includes

* Replace lodash 'values' usage with Object.values

* Replace lodash 'uniq' usage with Array.from(new Set(...))

* Property safety: ensure that ignoreSuites/ignoreTasks are populated prior to access

* Property safety: ensure that blacklistTypes is populated prior to access

* Revert "Replace lodash 'values' usage with Object.values"

This reverts commit 9fd3679d6db03066daee09fad0050e5292a32aa1.

* Replace lodash 'repeat' usage with String.prototype.repeat

* Replace lodash 'isinteger' usage with Number.isInteger

* Remove explicit lodash dependency from babel-generator package

* Update packages/babel-helper-transform-fixture-test-runner/src/index.js

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

* Rely on optional chaining operator as sole boolean check

* Handle additional optional chaining operator simplification

* Update type signature

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-07-06 09:27:41 +02:00
Huáng Jùnliàng
7fd40d86a0 v7.10.4 2020-06-30 09:04:22 -04:00
Huáng Jùnliàng
2787ee2f96 v7.10.3 2020-06-19 16:42:41 -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
Nicolò Ribaudo
b0350e5b1e v7.10.2 2020-05-30 19:16:08 +00:00