Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump flow-parser from 0.195.2 to 0.202.0 #933

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 17, 2023

Bumps flow-parser from 0.195.2 to 0.202.0.

Release notes

Sourced from flow-parser's releases.

v0.202.0

Likely to cause new Flow errors:

  • Don't error for tuple element type incompatibility if we have already errored for invalid tuple arity.
  • Fix a bug that causes certain errors in annotations to be hidden. As a result, more legitimate errors might appear. Example here.

New Features:

  • Add support for optional tuple elements, e.g. ['s'] and ['s', 1] are both valid values for [foo: string, bar?: number].
  • Add autocomplete for keywords to the LSP.
  • Add a code action that inserts jsdoc on a function.
  • exact_by_default=true is now the default value if the option is omitted from the .flowconfig. Read this blog post for more details.

Notable bug fixes:

  • Fix LSP rename command to consider aliased named exports.
  • If a contextually typed parameter has a default, we will filter out null and void from the inferred type of the parameter. This removes spurious errors like this.
  • Some spurious prop-missing errors might be removed. Example here
  • Remove some spurious internal errors of Flow. Example here

Misc:

  • Add option for module.system.haste.module_ref_prefix_LEGACY_INTEROP in the config to allow migration from the automatic_require_default flag and to ES module syntax.

Parser:

  • Include InterpreterDirective in the AST.
  • Fix loc/range of postfix arrays that start with a parenthesis, like (A | B)[].
  • Fix missing error when arrow functions have duplicate params.

v0.201.0

Local Type Inference:

  • Local Type Inference is a rewrite of Flow’s type inference algorithm. This change makes Flow’s inference behavior more reliable and predictable. It replaces a global inference scheme that Flow has relied on since its inception and that has often been the culprit of confusing action-at-a-distance behavior, in exchange for modestly increased type annotations. It is now enabled by default! See this blog post for more details on the new system and steps to upgrade your project.

Likely to cause new Flow errors:

  • When a variable is initialized at declaration, subsequent assignment in a conditional branch will no longer cause later reads to get a union type. This is already the case if the variable is annotated. As a result of this change, you might get new type errors. Example
  • When a variable is uninitialized or initialized to null, we use all the assignments to the variables as its initial type. We now no longer consider assignments from a child generic function. As a result, you might get new invalid-declaration errors. Example
  • Fix object value rest. It will now error if attempting to read a write-only or setter-only property (it reads while copying the properties). Additionally, the resulting rest object will no longer preserve read-only variance (as it is a copy).
  • The type utility $Partial will now preserve the variance of the input object type's properties. For example, if the the input was a read-only object, now that output will also be a read-only object (with optional properties).
  • string and symbol are no longer subtypes of an interface
  • Error on with statements in non-strict mode. It was already a syntax error in strict mode.

New Features:

  • A native Apple Silicon precompiled binary is now available via the GitHub Releases page. It is not yet available via flow-bin. Internally, we see about 2X faster performance than using Rosetta, and 4X faster performance than on actual Intel Macs.
  • Add local variable renaming capabilities to the LSP
  • Add "Find All References" functionality to the LSP for showing local references
  • JSDoc autocomplete will automatically trigger after typing /**
  • Add option for automatically closing JSX tags in the IDE
  • Hovering in the IDE now shows both the unevaluated and evaluated type of the target expression.
  • Add use_mixed_in_catch_variables config option that makes catch variables default to mixed instead of any
  • Rename $Partial utility type to Partial. $Partial will continue working as an alias for at least one more version - use that period of time to codemod it to Partial.
  • Add the Required utility type. It does the opposite of Partial: it makes optional properties required in object types.
  • Improve error when attempting to call Object.values on a Flow Enum, to point the user to using .members()
  • Improve error when using number and boolean primitives as a subtype of an interface

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.202.0

Likely to cause new Flow errors:

  • Don't error for tuple element type incompatibility if we have already errored for invalid tuple arity.
  • Fix a bug that causes certain errors in annotations to be hidden. As a result, more legitimate errors might appear. Example here.

New Features:

  • Add support for optional tuple elements, e.g. ['s'] and ['s', 1] are both valid values for [foo: string, bar?: number].
  • Add autocomplete for keywords to the LSP.
  • Add a code action that inserts jsdoc on a function.
  • exact_by_default=true is now the default value if the option is omitted from the .flowconfig. Read this blog post for more details.

Notable bug fixes:

  • Fix LSP rename command to consider aliased named exports.
  • If a contextually typed parameter has a default, we will filter out null and void from the inferred type of the parameter. This removes spurious errors like this.
  • Some spurious prop-missing errors might be removed. Example here
  • Remove some spurious internal errors of Flow. Example here

Misc:

  • Add option for module.system.haste.module_ref_prefix_LEGACY_INTEROP in the config to allow migration from the automatic_require_default flag and to ES module syntax.

Parser:

  • Include InterpreterDirective in the AST.
  • Fix loc/range of postfix arrays that start with a parenthesis, like (A | B)[].
  • Fix missing error when arrow functions have duplicate params.

0.201.0

Local Type Inference:

  • Local Type Inference is a rewrite of Flow’s type inference algorithm. This change makes Flow’s inference behavior more reliable and predictable. It replaces a global inference scheme that Flow has relied on since its inception and that has often been the culprit of confusing action-at-a-distance behavior, in exchange for modestly increased type annotations. It is now enabled by default! See this blog post for more details on the new system and steps to upgrade your project.

Likely to cause new Flow errors:

  • When a variable is initialized at declaration, subsequent assignment in a conditional branch will no longer cause later reads to get a union type. This is already the case if the variable is annotated. As a result of this change, you might get new type errors. Example
  • When a variable is uninitialized or initialized to null, we use all the assignments to the variables as its initial type. We now no longer consider assignments from a child generic function. As a result, you might get new invalid-declaration errors. Example
  • Fix object value rest. It will now error if attempting to read a write-only or setter-only property (it reads while copying the properties). Additionally, the resulting rest object will no longer preserve read-only variance (as it is a copy).
  • The type utility $Partial will now preserve the variance of the input object type's properties. For example, if the the input was a read-only object, now that output will also be a read-only object (with optional properties).
  • string and symbol are no longer subtypes of an interface
  • Error on with statements in non-strict mode. It was already a syntax error in strict mode.

New Features:

  • A native Apple Silicon precompiled binary is now available via the GitHub Releases page. It is not yet available via flow-bin. Internally, we see about 2X faster performance than using Rosetta, and 4X faster performance than on actual Intel Macs.
  • Add local variable renaming capabilities to the LSP
  • Add "Find All References" functionality to the LSP for showing local references
  • JSDoc autocomplete will automatically trigger after typing /**
  • Add option for automatically closing JSX tags in the IDE
  • Hovering in the IDE now shows both the unevaluated and evaluated type of the target expression.
  • Add use_mixed_in_catch_variables config option that makes catch variables default to mixed instead of any
  • Rename $Partial utility type to Partial. $Partial will continue working as an alias for at least one more version - use that period of time to codemod it to Partial.
  • Add the Required utility type. It does the opposite of Partial: it makes optional properties required in object types.

... (truncated)

Commits
  • f84a678 v0.202.0
  • 468454f use sockets to communicate with workers
  • bc7e7f6 [conditional-type] Parse infer type
  • 30fae6f tweak exit message when config changes
  • 6da569b add extra logging around failed saved state loading
  • 6602fc3 [tests] Re-record tests under LTI
  • 3ebeac4 [tests] Remove constrain_writes string from tests
  • ab76046 [lti] Always declare dependency on hints for expression writes
  • 9824953 [conditional-type] Add infer type AST
  • 0a87f74 [lti] Do not add to post inference test_prop_miss during hint eval
  • 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.202.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.202.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 17, 2023
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.

0 participants