benjamn / recast

JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator
MIT License
4.95k stars 346 forks source link

Bump flow-parser from 0.195.0 to 0.209.0 #1322

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flow-parser from 0.195.0 to 0.209.0.

Release notes

Sourced from flow-parser's releases.

v0.209.0

Likely to cause new Flow errors:

  • We removed support for React PropTypes. All related Flow builtin types like React$PropType$Primitive are deleted. React has deprecated PropTypes since v15.5.
  • We will now catch errors related to generic indexed access types. Example
  • Fixed issues with indexed access on interfaces/instances. Access with string literals will now access named properties. example
  • We now require annotation for computed access of instances, when that access is directly exported.
  • The return annotation of a function can now reference a parameter name (e.g try-Flow). This may cause new errors if the return type used to reference a name that aliases a parameter name. This will now be captured by the parameter and cause a [value-as-type] error.
  • We now error when using the name of a variable in its own annotation (e.g. const x: typeof x = ...). An exception is when the name of the variable appears under an object type constructor. For example, the annotation const o: { f: typeof o } = ... is allowed.

Notable bug fixes:

  • Fix a bug in the previous version that makes declare let/const function scoped. We fixed it to be lexically scoped again.

Library Definitions:

v0.208.1

Notable bug fixes:

  • Fixed a crash when we are trying to produce a quick fix for missing imports. The autofix for missing imports broken in the previous release would be working again now.

v0.208.0

Likely to cause new Flow errors:

  • Flow will now error on unsupported statements in library definitions, instead of silently ignoring them.
  • Flow will error more consistently when variables of type any and empty are used as types (e.g. try-Flow)

IDE:

  • Get definition request will now consistently jump to the name of the definition for ES module exports.
  • In find local references, if a reference appears in a named import, it will no longer highlight the entire import as reference. Instead, it will only highlight the relevant name.

Notable bug fixes:

  • Parameter types can now refer to previous parameters in the same parameter list (e.g. function f(x: number, y: typeof x) {})
  • Report error when a function parameter is redeclared in its body in functions that have default params (e.g. try-Flow)
  • For all declared names (declare class/var/let/const), we will allow full forward reference. All reads of these values will be considered to be initialized.

Misc:

  • Changed React.Element to support a second type argument, as supported by React$Element

Library Definitions:

  • Updated dom libdefs to allow Trusted Type objects

v0.207.0

Likely to cause new Flow errors:

  • When you pass a generic component type to some React utility type like React.ElementConfig<typeof some_generic_component>, we will replace all the type parameters with their defaults or bounds. It can potentially cause downstream errors. (Example)

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.209.0

Likely to cause new Flow errors:

  • We removed support for React PropTypes. All related Flow builtin types like React$PropType$Primitive are deleted. React has deprecated PropTypes since v15.5.
  • We will now catch errors related to generic indexed access types. Example
  • Fixed issues with indexed access on interfaces/instances. Access with string literals will now access named properties. example
  • We now require annotation for computed access of instances, when that access is directly exported.
  • The return annotation of a function can now reference a parameter name (e.g try-Flow). This may cause new errors if the return type used to reference a name that aliases a parameter name. This will now be captured by the parameter and cause a [value-as-type] error.
  • We now error when using the name of a variable in its own annotation (e.g. const x: typeof x = ...). An exception is when the name of the variable appears under an object type constructor. For example, the annotation const o: { f: typeof o } = ... is allowed.

Notable bug fixes:

  • Fix a bug in the previous version that makes declare let/const function scoped. We fixed it to be lexically scoped again.

Library Definitions:

0.208.1

Notable bug fixes:

  • Fixed a crash when we are trying to produce a quick fix for missing imports. The autofix for missing imports broken in the previous release would be working again now.

0.208.0

Likely to cause new Flow errors:

  • Flow will now error on unsupported statements in library definitions, instead of silently ignoring them.
  • Flow will error more consistently when variables of type any and empty are used as types (e.g. try-Flow)

IDE:

  • Get definition request will now consistently jump to the name of the definition for ES module exports.
  • In find local references, if a reference appears in a named import, it will no longer highlight the entire import as reference. Instead, it will only highlight the relevant name.

Notable bug fixes:

  • Parameter types can now refer to previous parameters in the same parameter list (e.g. function f(x: number, y: typeof x) {})
  • Report error when a function parameter is redeclared in its body in functions that have default params (e.g. try-Flow)
  • For all declared names (declare class/var/let/const), we will allow full forward reference. All reads of these values will be considered to be initialized.

Misc:

  • Changed React.Element to support a second type argument, as supported by React$Element

Library Definitions:

  • Updated dom libdefs to allow Trusted Type objects

0.207.0

... (truncated)

Commits
  • 1c28421 v0.209.0
  • 4f697f4 Kill support for PropType
  • 748f3c1 Fully resolve EvalT results for index access related utility types
  • 52e0275 Introduce Type.normalized_property
  • 6c5f917 prevent VisitorsRuntime.StructuralMismatch exception in Ty
  • be249d4 fix override fail_ methods for new type variants in Ty_comparator
  • d8e9d70 make Lsp_fmt.parse_command_name not throw
  • 17b713f refactor CompletionItem parse/print
  • fa07a75 [DOCS] Update defining-enums.md (#9030)
  • 5fd0cf0 Better description for array spread reversal related error message
  • 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)
dependabot[bot] commented 1 year ago

Superseded by #1326.