173 Commits

Author SHA1 Message Date
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
45fdb87747 v7.11.0 2020-07-30 17:12:07 -04:00
James C. Davis
aa82ab6358
Typescript: always strip declare from class fields (#11747)
* test: add failing test for decorated declare

* fix: always strip declare from class fields

* test: add decorated-declare-properties test
2020-07-30 14:06:45 -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
f7964a9ac5 v7.10.5 2020-07-14 14:10:36 -04:00
Huáng Jùnliàng
5dd64ecc4a
Disallow duplicated AST nodes (#11807) 2020-07-14 08:32:16 -05:00
Rafael Salguero Iturrios
f32d5debda
Typescript transform now removes generic arguments from optional calls (Fixes #11813) (#11816) 2020-07-09 17:32:05 -05: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
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
Sajad Torkamani
9d289c1457
Fix small typo (#11682) 2020-06-05 15:08:56 -04:00
Nicolò Ribaudo
88f57a7ea6 v7.10.1 2020-05-27 21:56:37 +00:00
Saulo Santiago
242d9e0b20
Use repository.directory field in package.json files (#11625)
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-05-27 16:32:25 +02:00
Nicolò Ribaudo
5da2440adf v7.10.0 2020-05-26 21:20:43 +00:00
Jason Quense
de8264c8a7
fix: don't elide jsx pragma import namespaces (#11523)
* fix: don't elide jsx pragma import namespaces

* use the correct pragma oops
2020-05-14 16:01:54 +02:00
Christoph Nakazawa
2bb2933dea
[helpers] Add a private function name within createSuper (#11514) 2020-05-04 23:30:53 +02:00
Nicolò Ribaudo
9c2846bcac v7.9.6 2020-04-29 20:33:47 +02:00
Kevin Lau
9b716518ed
Throw error on TypeScript declare const enum (#11410)
Throw error on `const enum` even if it has `declare`.

Resolves: #10785
2020-04-23 11:27:19 +02:00
Justin Ridgewell
070ec201bb
Speed up the createSuper helper (#11401) 2020-04-10 16:00:20 +02:00
Nicolò Ribaudo
67609a1232
Don't call createSuper in loose mode (it was unused) (#11358)
* Don't call `createSuper` in loose mode (it was unused)

* Update fixtures
2020-04-01 23:08:21 +02:00
Nicolò Ribaudo
d3cf5fb5f4 v7.9.4 2020-03-24 09:26:12 +01:00
Vlad Rindevich
2f549886e4
[preset-typescript] Fix private members type annotations (#11315) 2020-03-23 19:33:16 +01:00
Kai Cataldo
7ca814489a
fix: parse value imports named type as values (#11296)
* fix: parse value imports named type as values

* Address feedback

* Add plugin tests

* Add isContextual() check

* Remove importKind: value from extraneous nodes

* Ensure importKind is correct for more nodes

* Add additional test

* Address feedback

* Revert formatting

* Fix tests
2020-03-21 01:38:07 +01:00
Nicolò Ribaudo
8d5e422be2 v7.9.0 2020-03-20 16:32:55 +01:00
Nicolò Ribaudo
f6c7bf36ce
Allow extending untranspiled classes (#8656) 2020-03-16 23:59:15 +01:00
Nicolò Ribaudo
740260b236
Add import type and export type support to TypeScript (#11171)
* Add support for type only imports in TS (#11053)
* Implement "export type {}" (#11122)
* Add "exportKind: type" when needed with TS (#11157)
* Add `onlyRemoveTypeImports` option to `transform-typescript` (#11173)
* Add onlyRemoveTypeImports to preset-typescript (#11179)

Co-authored-by: Brian Ng <bng412@gmail.com>
Co-authored-by: Raja Sekar <rajasekarm.dev@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Henry Zhu <smiley.we@gmail.com>
Co-authored-by: Siddhant N Trivedi <sidntrivedi012@gmail.com>
2020-03-16 22:58:51 +01:00
Nicolò Ribaudo
595f65f33b v7.8.7 2020-03-05 02:52:13 +01:00
James C. Davis
a5f63299eb
TypeScript: Preserve decorated definite class properties (#11129)
* test: update fixture with decorated definite class property

* fix: don't remove decorated definite class properties
2020-02-27 21:31:23 +01:00
Nicolò Ribaudo
d21e2217d5
Skip newlines around inline #__PURE__ annotations (#11133)
* Skip newlines around #__PURE__ annotations

* Update tests
2020-02-13 19:16:33 +01:00
Nicolò Ribaudo
a7620bd266 v7.8.3 2020-01-13 22:36:19 +01:00
Nicolò Ribaudo
8fce431d88
Revert "chore: specify package type (#10849)" (#11003)
This reverts commit e8dac621de9dba27b47646169562c0a0c2e02c96.

Fixes installs when using npm <= 3.9.5 (Node.js <= 6.2.2)
2020-01-13 21:18:42 +01:00
Nicolò Ribaudo
2486615a74 v7.8.0 2020-01-12 01:09:29 +01:00
Huáng Jùnliàng
e8dac621de
chore: specify package type (#10849) 2020-01-09 21:40:15 -05:00
Nicolò Ribaudo
75767d87cb v7.7.4 2019-11-23 00:05:58 +01:00
Kai Cataldo
a6d134804a Unify build step for ESLint packages (#10723) 2019-11-16 10:15:15 +01:00
Nicolò Ribaudo
35f4d12763 v7.7.2 2019-11-07 02:20:52 +03:00
Huáng Jùnliàng
2640e5a27c fix: remove accessibility of constructor (#10658) 2019-11-05 13:52:57 -06:00
Nicolò Ribaudo
97faa83953 v7.7.0 2019-11-05 11:27:14 +01:00
Nicolò Ribaudo
e9c1bce50f
Add support for TS declare modifier on fields (#10545)
* [parser] Add support for TS declare modifier on fields (#10484)

* [parser] Add support for TS declare modifier on fields

* Use Object.create(null)

* Comment

* Add support for TS declare types to types and generator (#10544)

* Transform TypeScript "declare" fields (#10546)

* Transform TypeScript "declare" fields

* Remove multiple spaces

* declareFields -> allowDeclareFields

* Update after rebase
2019-11-05 10:56:57 +01:00
Nicolò Ribaudo
abce0ef49d [TS] Correctly transform computed strings and templates in enums (#10555)
* [TS] Correctly transform computed strings and templates in enums

* Typo [skip ci]
2019-11-04 13:22:49 -05:00
Chris Garrett
5c0d8a9de7 add legacy decorators support to strict class fields (#10616)
This PR allows legacy decorators to work with strict class fields, which
are now stage 3 and have shipped in a number of browsers. Allowing this will
allow users of the legacy transform (which is currently recommended by the
champions of the decorator proposal) to use the proper class field semantics
for non-decorated fields, which should help prevent breakage later on.

This change is not a breaking change, since users had to explicitly opt into
loose mode in class fields before. This just gives them the option to remove
that opt-in.
2019-11-04 13:05:42 -05:00
Nicolò Ribaudo
d329156ebc
v7.6.3 2019-10-08 21:31:40 +02:00
Huáng Jùnliàng
fa5057f9fb Flow: interface identifier should be declared in the scope (#10220)
* fix: typo

* declare name for flow interface

* add test case for export overload function, typescript

* test: add test

Fixes #10044

* test: update test

* test(flow): add multiple declarations regression test

* re-enable flow test case

# Conflicts:
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-declare-statements/input.js
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-interfaces-module-and-script/input.js
#	packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-iterator/input.js

* test: disable two flow dupl-decl test

* fix: do not declare name for declare function until we figure out a better way

* test: duplicate declare function and function would not throw
2019-10-02 07:32:42 +02:00
Nicolò Ribaudo
cbd5a26e57
v7.6.0 2019-09-06 19:25:16 +02:00
Nicolò Ribaudo
a2bf68981f Add TSBigIntKeyword to @babel/types (#10341) 2019-08-20 17:31:45 -05:00
Nicolò Ribaudo
0407f034f0
v7.5.5 2019-07-17 23:08:08 +02:00
Daniel Tschinder
d8da63c929 Use correct extension for typescript fixtures (#10014)
* Use correct extension for typescript fixtures

* Change transform fixtures

* Adjust editorconfig for ts files

* Rename new tests

Co-authored-by: Nicolò Ribaudo (nicolo.ribaudo@gmail.com)
2019-07-15 22:46:03 +02:00
Nicolò Ribaudo
0dbf99bedb
v7.5.2 2019-07-08 21:46:49 +02:00
Nicolò Ribaudo
f48b47c1f7
Do not trust Scope when removing TypeScript types (#10174)
* Do not trust Scope when removing TypeScript types

* Warn

* Update warning message

Co-Authored-By: Brian Ng <bng412@gmail.com>

* Add test

* Node 6
2019-07-08 21:44:26 +02:00
Nicolò Ribaudo
d0519fa907
v7.5.1 2019-07-06 10:07:59 +02:00