Nicolò Ribaudo
d24bd7ce5c
Remove remaining lodash dependencies ( #13139 )
2021-04-13 22:41:22 +02:00
Nathan Walters
30f93b36a2
Fix printing of single-param async arrow function with comments ( #13136 )
...
* Fix printing of async arrow function with a single param and comments
* Add OVERWRITE support to generator tests
2021-04-12 10:10:02 -04: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
Babel Bot
2c0e8d0008
v7.13.9
2021-03-01 21:33:11 +00:00
Michael サイトー 中村 Bashurov
d05fdbc3c7
Fix invalid print output when empty array is passed to t.tsInterfaceDeclaration ( #12921 )
...
If you pass an empty array as `extends` in `t.tsInterfaceDeclaration` you'll get an invalid code printed
```ts
t.tsInterfaceDeclaration(
t.identifier('x'),
undefined,
[],
t.tsInterfaceBody([])
)
```
You will get
```ts
interface A extends {}
```
Which is an invalid TS, this PR fixes that
2021-03-01 10:43:24 -05:00
Michael サイトー 中村 Bashurov
4c343ac853
Allow nullish extends in interfaceish ( #12920 )
...
* Allow nullish extends in interfaceish
Otherwise code such as
```ts
t.interfaceDeclaration(
t.identifier('id'),
undefined,
undefined,
t.objectTypeAnnotation([])
)
```
Will fail when priting with ` TypeError: unknown: Cannot read property 'length' of null`
Despite nullish values being allowed in `t.interfaceDeclaration` definitions
* Update packages/babel-generator/src/generators/flow.ts
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-03-01 10:42:40 -05:00
Nicolò Ribaudo
c827193d9c
v7.13.0
2021-02-22 23:35:18 +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
Sosuke Suzuki
9c567baa9b
Parse JS Module Blocks proposal ( #12469 )
2021-02-21 20:08:20 +01:00
Sosuke Suzuki
e4588bed22
Support TypeScript 4.2 abstract constructor signatures ( #12628 )
...
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-02-21 20:07:55 +01:00
George Zahariev
5b99b8f221
Flow Enums with unknown members support ( #12193 )
...
* Flow Enums with unknown members parsing
* Updates after rebase
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-02-21 18:42:23 +01:00
Daniel Sainati
16e9f1c8e5
Support Flow this parameter annotations ( #12234 )
2021-02-21 17:44:27 +01:00
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