Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 16, 2023

Bumps flow-parser from 0.195.2 to 0.197.0.

Release notes

Sourced from flow-parser's releases.

v0.197.0

Local Type Inference:

We are releasing a new inference mode called local type inference. You can enable this new mode in your codebase by adding inference_mode=lti to the [options] section in the flowconfig. We will describe more details on this inference mode in an upcoming blog post.

Likely to cause new Flow errors:

  • Unannotated class properties initialized with null will now errors.
  • We now require all generic functions to be fully annotated.
  • bool is a deprecated alias for boolean. Added a deprecated-type-bool lint and flow fix --error-codes deprecated-type codemod to help migrate to boolean. This lint is also included in the deprecated-type lint; if deprecated-type is enabled, you can opt out with deprecated-type-bool=off

New Features:

  • Tuple improvements:
    • $ReadOnly utility makes tuples read-only. E.g. $ReadOnly<[string, number]> is the same as [+a: string, +b: number].
    • Tuple elements can now have their variance annotated, when the element is labeled. E.g. type T = [+foo: number, +bar: string] creates a read-only tuple.
    • You can now label tuple elements (like TypeScript allows). The labels have no type-checking effect, they just help with self documentation (like indexer labels). When a function argument rest element is a tuple type, the labels work like parameter names in signature help.
    • We now parse tuple spread elements, but type checking of this feature is still unsupported.
    • These new features are now supported in Flow, but we have not upgraded related tools yet. For example, Prettier won't be able to format your code that uses variance annotations on tuples.
  • Allow mixed or any as an annotation to a catch parameter (but not anything else)
  • When typing in a class body, method signatures from super classes and interfaces will be suggested to make overriding/implementing these methods easier.

Notable bug fixes:

  • Improve the parser's error recovery when in the middle of adding type parameters.
  • Trigger autocomplete in JSX tags, JSX attribute values, and private class fields.
  • Improves performance of bigints in big union checks

Misc:

  • Inferred recursive types are shown as any (instead of V$n) in hover types.

Parser:

  • symbol is now a reserved type
  • for (async of []) is now a parse error

Library Definitions:

  • Updated AbortController and AbortSignal signatures
  • Actually expose ReactSetStateFunction type introduced in the last release.

v0.196.3

  • Fix a bug that could cause IDE commands to fail while a recheck is ongoing

v0.196.2

🎁 This is (hopefully) our last release of the year. Happy holidays! 🎁

  • Improve performance when unions flow to intersections
  • Fix a crash when using the experimental saved_state.allow_reinit option

v0.196.1

  • Fix some missing autocomplete results (regression in 0.196.0)

v0.196.0

Likely to cause new Flow errors:

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.197.0

Local Type Inference:

We are releasing a new inference mode called local type inference. You can enable this new mode in your codebase by adding inference_mode=lti to the [options] section in the flowconfig. We will describe more details on this inference mode in an upcoming blog post.

Likely to cause new Flow errors:

  • Unannotated class properties initialized with null will now errors.
  • We now require all generic functions to be fully annotated.
  • bool is a deprecated alias for boolean. Added a deprecated-type-bool lint and flow fix --error-codes deprecated-type codemod to help migrate to boolean. This lint is also included in the deprecated-type lint; if deprecated-type is enabled, you can opt out with deprecated-type-bool=off

New Features:

  • Tuple improvements:
    • $ReadOnly utility makes tuples read-only. E.g. $ReadOnly<[string, number]> is the same as [+a: string, +b: number].
    • Tuple elements can now have their variance annotated, when the element is labeled. E.g. type T = [+foo: number, +bar: string] creates a read-only tuple.
    • You can now label tuple elements (like TypeScript allows). The labels have no type-checking effect, they just help with self documentation (like indexer labels). When a function argument rest element is a tuple type, the labels work like parameter names in signature help.
    • We now parse tuple spread elements, but type checking of this feature is still unsupported.
    • These new features are now supported in Flow, but we have not upgraded related tools yet. For example, Prettier won't be able to format your code that uses variance annotations on tuples.
  • Allow mixed or any as an annotation to a catch parameter (but not anything else)
  • When typing in a class body, method signatures from super classes and interfaces will be suggested to make overriding/implementing these methods easier.

Notable bug fixes:

  • Improve the parser's error recovery when in the middle of adding type parameters.
  • Trigger autocomplete in JSX tags, JSX attribute values, and private class fields.
  • Improves performance of bigints in big union checks

Misc:

  • Inferred recursive types are shown as any (instead of V$n) in hover types.

Parser:

  • symbol is now a reserved type
  • for (async of []) is now a parse error

Library Definitions:

  • Updated AbortController and AbortSignal signatures
  • Actually expose ReactSetStateFunction type introduced in the last release.

0.196.3

  • Fix a bug that could cause IDE commands to fail while a recheck is ongoing

0.196.2

🎁 This is (hopefully) our lastsecond to last release of the year. Happy holidays! 🎁

  • Improve performance when unions flow to intersections
  • Fix a crash when using the experimental saved_state.allow_reinit option

0.196.1

... (truncated)

Commits
  • 641abab v0.197.0
  • 1429e0d [lti] Special case handling of polymorphic callables on ThisClassT statics
  • 376854f [lti] Run the empty array ~> hint subtyping under implicit instantiation mode
  • 519013b [lti] Do not make empty arrays silently Array\<any>
  • 7561acb Add support for multiple hint candidates
  • 5ad7945 Do not special case new Array(n) call type checking
  • 6ce7811 Add constructor type definition to Array
  • f6c40f2 improve error recovery of type params
  • 49eb629 remove recheck reason logging
  • ab2a8be cleanup in Jsonrpc
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [flow-parser](https://github.com/facebook/flow) from 0.195.2 to 0.197.0.
- [Release notes](https://github.com/facebook/flow/releases)
- [Changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
- [Commits](facebook/flow@v0.195.2...v0.197.0)

---
updated-dependencies:
- dependency-name: flow-parser
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 16, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 23, 2023

Superseded by #907.

@dependabot dependabot bot closed this Jan 23, 2023
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/flow-parser-0.197.0 branch January 23, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant