* fix: transform name capturing regex once
* refactor: early return when pattern contains only lookbehind
* chore: simplify test regex
* chore: run test on >=8.0.0
* Refactor trailing comment adjustment
Following up from https://github.com/babel/babel/pull/10369
- Unify the logic for adjusting trailing comments into a separate
function
- Use it for all three cases, which fixes a bug for ObjectExpressions
and CallExpressions
- Update tests to check for the fixed bug
* Fix tests
- Only modify trailingComments if necessary
- Update snapshots of a couple of affected tests
* Drop the underscore in adjustCommentsAfterTrailingComma_
* Handle ArrayPattern
* Handle ObjectPattern
* Handle import and export declarations
These have to be handled a bit differently, because the node is visited after the and before the declaration. So we intercept when we are going from the last specifier to the source node.
* Remove unnecessary check
* Retain trailing comments in array expressions
This is a proposed fix for https://github.com/babel/babel/issues/10368
with a simple test.
* Move lastElement in the block where it's used
* Test trailing comment after array expression
* Don't move comments after the array expression
* Retain trailing comment after the array expression
Eg, `namespace:foo.bar` used to parse but is invalid in the [spec](https://facebook.github.io/jsx/).
Also, allow `JSXNamespacedName` in the `JSXOpeningElement`/`JSXClosingElement` builders.
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
* 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
* 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
* 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]
Adds a badge showing the number of people helping this repo on CodeTriage.
[](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:
- [](https://www.codetriage.com/rails/rails) https://github.com/rails/rails
- [](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.
* 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
* Decorators legacy: register inserted declaration
For compatibility with the Typescript plugin
Fixes#10264
* Register declaration but also keep replaceWithMultiple
* 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
* added 'placeholders', 'logicalAssignment', 'partialApplication' to the ParserPlugin type. closes#10186
* put the ParserPlugin names in alphabetical order
* 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
* 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