12614 Commits

Author SHA1 Message Date
Even Alander
eb3767d58b Add a builder definition including name for tsTypeParameter (#10319) 2019-08-15 19:59:08 +02:00
Nicolò Ribaudo
f0c2364d01
Do not delete "fake" source map comments from strings (#9960)
Instead of using `convert-source-map`'s `removeComments` method before
parsing the file, we can first parse the file with `@babel/parser` and then
analyze the comments.
This is needed because it is not possible to reliabily detect comments in
JavaScript without fully parsing the file:
https://github.com/thlorenz/convert-source-map/issues/63
2019-08-14 17:05:55 +02:00
Huáng Jùnliàng
ee344c3e4c Revert "chore: remove FORCE_COLOR workaround" (#10336)
This reverts commit 347ee036becdca3c9e158311d44a48ed89df9a94.
2019-08-14 16:58:01 +02:00
Ziad El Khoury Hanna
64041e1669 Fix flow comments plugin issues (#10329)
* Fix issues in flow-comments to preserve comments and there order (fixes #10324)

* Add support in flow-comments for extends in class declarations (fixes #10323, #10321)

* Refactoring and cleanup of flow-comments plugin

* Fix comments preservation logic of flow-comments

* Fix flow-comments where comments are class identifier and extends keyword
2019-08-14 15:46:26 +02:00
Nicolò Ribaudo
469a5a71cd
Allow testing logs with @babel/helper-transform-fixture-test-runner (#10326)
* Add support for logs to transform-fixture-test-runner

* Test some warnings

* Use stderr/stdout, and add a validateLogs test option

* Normalize CWD in logs and rename vars

* Silence preset-env tests

* Restore old methods
2019-08-14 08:03:03 +02:00
Huáng Jùnliàng
75090f10e5 fix: assign comment to ObjectProperty only when inside an ObjectExpression (#10292)
Fixes #10230
2019-08-13 13:49:16 -05:00
Huáng Jùnliàng
22df2ae244 Commit generated code (#10331)
* update prettier generated artifacts

* chore: sync babel-helpers to artifacts
2019-08-13 16:31:28 +02:00
Nicolò Ribaudo
051965052c
Update @lerna/collect-updates git hash 2019-08-13 12:03:34 +02:00
Thiago Arrais
ee397ff107 Adds note about two approval policy to PR template (#10313)
* Adds note about two approval policy to PR template

* Adds qualifier to approval policy

Because, although two approvals is the general case, some PRs maybe merged with more or fewer approvals

[skip ci]
2019-08-12 17:32:31 +02:00
Huáng Jùnliàng
15535cf52c Update preset-env text fixtures (#10318)
* chore: update preset-env text fixtures

* chore: remove FORCE_COLOR workaround
2019-08-12 00:55:27 +02:00
README Bot
682d9f9f09 Add CodeTriage badge to babel/babel (#10088) [skip ci]
Adds a badge showing the number of people helping this repo on CodeTriage.

[![Open Source Helpers](https://www.codetriage.com/babel/babel/badges/users.svg)](https://www.codetriage.com/babel/babel)

## What is CodeTriage?

CodeTriage is an Open Source app that is designed to make contributing to Open Source projects easier. It works by sending subscribers a few open issues in their inbox. If subscribers get busy, there is an algorithm that backs off issue load so they do not get overwhelmed

[Read more about the CodeTriage project](https://www.codetriage.com/what).

## Why am I getting this PR?

Your project was picked by the human, @schneems. They selected it from the projects submitted to https://www.codetriage.com and hand edited the PR. How did your project get added to [CodeTriage](https://www.codetriage.com/what)? Roughly over 3 years ago, [iamsolankiamit](https://github.com/iamsolankiamit) added this project to CodeTriage in order to start contributing. Since then, 94 people have subscribed to help this repo.

## What does adding a badge accomplish?

Adding a badge invites people to help contribute to your project. It also lets developers know that others are invested in the longterm success and maintainability of the project.

You can see an example of a CodeTriage badge on these popular OSS READMEs:

- [![Email clients like GMAIL do not render SVG images](https://www.codetriage.com/rails/rails/badges/users.svg)](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [![Email clients like GMAIL do not render SVG images](https://www.codetriage.com/crystal-lang/crystal/badges/users.svg)](https://www.codetriage.com/crystal-lang/crystal) https://github.com/crystal-lang/crystal

## Have a question or comment?

While I am a bot, this PR was manually reviewed and monitored by a human - @schneems. My job is writing commit messages and handling PR logistics.

If you have any questions, you can reply back to this PR and they will be answered by @schneems. If you do not want a badge right now, no worries, close the PR, you will not hear from me again.

Thanks for making your project Open Source! Any feedback is greatly appreciated.
2019-08-09 19:18:18 +02:00
Serge Havas
a112be2fa0 [fix] jsx helper calls order (#10307)
imitate properly react createElement calls order
2019-08-08 22:43:57 +02:00
ifsnow
9ec26a7d3e Improves the logic to import objects in helpers (#10161)
* Improves the logic to import objects in helpers

* Modified to work with more cases.

* Modified by considering exception cases

* Fixed not using bundler's polyfill

Co-Authored-By: Jordan Harband <ljharb@gmail.com>

* Updated test output files

* Changes to cache logic

* Modified to use if statement
2019-08-08 11:11:50 +02:00
Thiago Arrais
ba2c0f7adf fix: register inserted class declaration (#10302)
* Decorators legacy: register inserted declaration

For compatibility with the Typescript plugin

Fixes #10264

* Register declaration but also keep replaceWithMultiple
2019-08-08 07:14:23 +02:00
Huáng Jùnliàng
5fb4d84a33 perf: always return void 0 as undefined node (#10243) 2019-08-01 09:53:40 +02:00
Tan Li Hau
3e4a9d588b Do expressions transform for switch statements (#10070)
* lint fix

* switch inside do expression

* review comments

* review comments

* make min diff

* adding more test

* review changes

* review changes

* handle block statement and added more test cases

* fix implementation and add more test cases

* fix last swtich case

* disable block fallthrough case

* fix nitpick reviews
2019-08-01 09:36:35 +02:00
Tan Li Hau
be2cbde560 remove finally from completion record in trystatement (#10277) 2019-08-01 09:24:08 +02:00
Ashwin Ramaswami
66727632e8 fix: replace es.string.reverse with es.array.reverse (#10284) 2019-08-01 09:20:52 +02:00
Brian Donovan
ba28f462bc Fix typo "to" → "so". (#10288) 2019-07-31 16:04:53 -04:00
Huáng Jùnliàng
f08062b1de chore: fix ESLint errors (#10278) 2019-07-29 10:14:11 -05:00
Daniel Tschinder
4f0840ab88
Update dev dependencies and fix linting errors (#10228)
* chore: Uppate dev dependencies

* chore: Fix lint errors

* chore: Format options.json files

* chore: Fix stupid flow errors

* Update test262 whitelist

Seems test262-stream was updated and now these tests work.
2019-07-27 15:09:30 +02:00
Tan Li Hau
6a9d2538e0 fix capturing group for matchAll (#10136)
* fix capturing group for matchAll

* update test case

* add core-js/features/string/match-all to test
2019-07-26 18:53:22 -04:00
Letladi Sebesho
f160522ab0 updated ParsePlugin type definition (#10259)
* added 'placeholders', 'logicalAssignment', 'partialApplication' to the ParserPlugin type. closes #10186

* put the ParserPlugin names in alphabetical order
2019-07-26 10:22:23 +02:00
Serhii Muryhin
4d30379d36 Add ";" token to the end of TS construct & call signature declaration (#10258)
* Add ";" token to the end of TS construct signature declaration

* Add ";" token to the end of TS call signature declaration. Update construct signature test fixtures
2019-07-25 10:14:35 +02:00
Letladi Sebesho
4d12c8971b added flow to babel cli (#10244)
* added flow to babel cli

* added 'SourceMapGenerator' as a argument to 'fromObject'
2019-07-25 09:59:41 +02:00
Yuri Karadzhov
4506590557 Add static parameter to class property builder (#10248) 2019-07-25 09:55:03 +02:00
Brian Donovan
1e7ed5c461 Add allowUndeclaredExports option to typings. (#10263)
This should have been included in https://github.com/babel/babel/pull/9864 but was not.
2019-07-25 09:53:56 +02:00
Nicolò Ribaudo
fced5cea43
Fix tdz checks in transform-block-scoping plugin (#9498)
* Better tdz tests

- Use jest's expect.toThrow/expect.not.toThrow
- Add input/output tests

* Fix basic tdz (a = 2; let a)

Fixes #6848

* Make _guessExecutionStatusRelativeTo more robust

* Add tests

* Return less "unkown" execution status

* "function" execution status does not exist

* Fix recursive functions

* Update helper version

* "finally" blocks are always executed

* Typo
2019-07-21 06:34:43 +02:00
Nicolò Ribaudo
9bc9571381
Extract release actions to babel/actions 2019-07-20 16:43:22 +02:00
Nicolò Ribaudo
fb910e063c
[gh action] Release on tag push 2019-07-20 16:39:10 +02:00
Daniel Tschinder
3b4a86aea4
Separate workflows as otherwise they interfere with eachother 2019-07-20 15:26:52 +02:00
Daniel Tschinder
94b678c949
Fix workflow 2019-07-20 15:22:21 +02:00
Daniel Tschinder
c84a4c8bfa
Use latest version of filter action 2019-07-20 15:14:07 +02:00
Daniel Tschinder
dfd59c183e
Add 'Needs Info' workflow 2019-07-20 15:13:29 +02:00
Nicolò Ribaudo
718017d896
Use "release" event instead of "push" 2019-07-20 14:30:33 +02:00
Daniel Tschinder
a0cb7b1ab1
Rename github action 2019-07-19 15:46:51 +02:00
Daniel Tschinder
0b886418c8
Use github actions for welcome comment 2019-07-19 14:44:40 +02:00
Babel Bot
0371979a3e Add v7.5.5 to CHANGELOG.md [skip ci] 2019-07-17 21:29:47 +00:00
Nicolò Ribaudo
0407f034f0
v7.5.5 v7.5.5 2019-07-17 23:08:08 +02:00
Nicolò Ribaudo
d919ecd254
Move lerna fork to the babel org 2019-07-17 00:02:41 +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
Tan Li Hau
eb3230f9db fix code-frame marker with highlighting (#10211) 2019-07-15 21:16:18 +02:00
Nicolò Ribaudo
7dc5fdb390
Workaround #10179 in proposal-object-rest-spread (#10200) 2019-07-15 19:01:29 +02:00
Tan Li Hau
ee68d6d1b0 add assertShape to validate templateElement (#10198)
* add assertShape to validate templateElement

* Update packages/babel-types/src/definitions/utils.js

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* templateElement optional cooked
2019-07-15 01:03:50 +02:00
Tan Li Hau
d3fe22f0e1 destructuring private fields with array pattern / object patte… (#10017)
* destructuring private fields with array pattern / object pattern

* wip: new test cases

* destrucuring and rest for private properties

* test case for loose private-loose

* add transform-desturcturing for exec

* update test case

* remove getPrototypeOf imports from get and set

* wip: destructure super assignment

* throw "Destructuring to a super field is not supported yet."

* fix tests and fix assignment pattern

* remove CallExpression from AssignmentPattern
2019-07-15 01:00:20 +02:00
James DiGioia
7f47cb65d0 Add Pipeline nodes to ast.spec [skip ci] (#10214) 2019-07-13 19:11:51 +02:00
Tan Li Hau
8b9af1be2f fix transform-flow-comments for import types (#9901)
* fix transform-flow-comments for import types

* update: dependencies
2019-07-13 16:06:42 +02:00
Tan Li Hau
f5ca0587d1 always throw when add missing helpers (#10208) 2019-07-12 12:53:55 -05:00
Sagiv ben giat
a9660cf559 resolve #10205 (#10207) 2019-07-12 11:00:25 -05:00
dependabot[bot]
8107a6faa2 Bump lodash.template from 4.4.0 to 4.5.0 (#10204)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-12 10:29:48 +02:00