Flow maybe types state;
> Maybe types accept the provided type as well as null or undefined. So ?number would mean number, null, or undefined.
So in this case, explicitly allow the type, null, or undefined in the
typescript definition.
Fixes#10403
* feat: v8intrinsic syntax plugin
Implement V8 Intrinsic Syntax Extension. Here we check the execution branch inside the parseSubscript to make sure the V8IntrinsicIdentifier is immediately followed by a call expression.
* feat: disable combining placeholders and v8intrisic
per https://github.com/babel/babel/issues/10104#issuecomment-506950969
* test: add more error cases
* refactor: parse v8 intrinsic in parseExprAtom
This approach is identical to V8’s implementation. Move the test cases as the behaviour changes.
* fix: plugin-name typo
* test: add yield-expression test case
* feat: require startsExpr on modulo for v8intrinsic
* perf: skip eof and braceR check as they must return false
* Print V8IntrinsicIdentifier
* feat: add v8intrinsic to parser typings
* Add generated type helpers
* fix: incorrect type definition
* fix: allow V8IntrinsicIdentifier to be callee
* ♻️ added condition to check for left and right of nullish coalescing operator and if any is a logical expression without a paren then throw an error
* 🐛 bugs fixed and test cases updated for babel parser
* ♻️ code comments added
* 🐛 spell error rectified
* ♻️ failing test updated
* 🐛 push tests after make build
* Skip nullish-coalescing flow precedence tests
They're now incorrect
* ♻️ error message updated, binop priority of other logical operators +1 from ?? and
* ♻️ increaed the binOp for in and instanceOf, added logic to print the brackets in an ?? && || expression, test cases added
* 🐛 failing test fixed and comments updated
* ♻️ new lines added between tests
* ♻️ basic tests for checking the binOp of instanceOf, in and relational operators to be equal added
* ♻️ new lines added in between tests
* 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.