benjamn / recast

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

Bump flow-parser from 0.195.0 to 0.207.0 #1306

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flow-parser from 0.195.0 to 0.207.0.

Release notes

Sourced from flow-parser's releases.

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)

New Features:

  • Add built-in (intrisic) element names like div to JSX autocomplete
  • Mapped types now support operating directly over keys, like TypeScript's Pick and Omit (Example). Mapped type support is still experimental; enable experimental.mapped_type=true to try them.

Notable bug fixes:

  • Don't check @noflow files in "all" mode
  • Fixed a source of spurious errors when using refined string keys as computed properties in objects (Example)
  • Improved Go to Definition on export statements

Library Definitions:

  • Added rel as an attribute to HTMLFormElement
  • Added WeakRef class definition
  • Added ariaHidden DOM property

v0.206.0

Likely to cause new Flow errors:

  • React.Element will now accept a second type argument that specifies the props type. JSX will populate this type argument with actual props passed to component, instead of deriving it from the signature. The change will reveal some broken code, e.g. try-Flow example.
  • $Shape is deprecated, use Partial instead. Read this blog post for more.
  • Add a (temporary) option tuple_enhancements to gate our tuple type enhancements (labeled tuple elements, which can be optional or have variance annotations), so we can show a Flow error rather than having users just get syntax errors from various other tooling (e.g. Prettier, ESLint), until all that tooling is updated.
  • experimental.abstract_locations is removed. Setting this config to true improves Flow's performance. The config defaults to true since 0.139.

New Features:

  • Allow opaque types with string supertypes to be used as keys in a dictionary, and have that opaque type be preserved when using Object.keys.
  • To help people familiar with TS, error on and supply a quickfix to the Flow equivalent for the TS types: Readonly, ReadonlyArray, ReadonlyMap, ReadonlySet, NonNullable.

Notable bug fixes:

  • Error more consistently with [invalid-computed-prop] errors. try-Flow.
  • Fixed cases where uses of Partial/Required caused errors to be positioned poorly.

Misc:

  • To improve clarity of error messages we will display mixed instead of a generic type if that generic type has a default bound of mixed. try-Flow.
  • Object property type incompatibility errors will now contain additional explanations when the error only arises due to object property invariant subtyping.

v0.205.1

  • Fix over-eager IDE autocompletion of types after typing a space.

v0.205.0

Likely to cause new Flow errors:

  • Remove the flow get-imports CLI command.
  • Some duplicate errors with Arrays are invariantly typed explanations are now correctly removed.

New Features:

  • Added type-aware autocomplete in IDE for switch cases.
  • Added signature help to IDE for constructor calls.
  • Go-to-definition in the IDE can now provide multiple options if the target is defined in multiple locations (for example, in a union).
  • Add Required and Partial to list of utility types to autocomplete in the IDE.

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.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)

New Features:

  • Add built-in (intrisic) element names like div to JSX autocomplete
  • Mapped types now support operating directly over keys, like TypeScript's Pick and Omit (Example). Mapped type support is still experimental; enable experimental.mapped_type=true to try them.

Notable bug fixes:

  • Don't check @noflow files in "all" mode
  • Fixed a source of spurious errors when using refined string keys as computed properties in objects (Example)
  • Improved Go to Definition on export statements

Library Definitions:

  • Added rel as an attribute to HTMLFormElement
  • Added WeakRef class definition
  • Added ariaHidden DOM property

0.206.0

Likely to cause new Flow errors:

  • React.Element will now accept a second type argument that specifies the props type. JSX will populate this type argument with actual props passed to component, instead of deriving it from the signature. The change will reveal some broken code, e.g. try-Flow example.
  • $Shape is deprecated, use Partial instead. Read this blog post for more.
  • Add a (temporary) option tuple_enhancements to gate our tuple type enhancements (labeled tuple elements, which can be optional or have variance annotations), so we can show a Flow error rather than having users just get syntax errors from various other tooling (e.g. Prettier, ESLint), until all that tooling is updated.
  • experimental.abstract_locations is removed. Setting this config to true improves Flow's performance. The config defaults to true since 0.139.

New Features:

  • Allow opaque types with string supertypes to be used as keys in a dictionary, and have that opaque type be preserved when using Object.keys.
  • To help people familiar with TS, error on and supply a quickfix to the Flow equivalent for the TS types: Readonly, ReadonlyArray, ReadonlyMap, ReadonlySet, NonNullable.

Notable bug fixes:

  • Error more consistently with [invalid-computed-prop] errors. try-Flow.
  • Fixed cases where uses of Partial/Required caused errors to be positioned poorly.

Misc:

  • To improve clarity of error messages we will display mixed instead of a generic type if that generic type has a default bound of mixed. try-Flow.
  • Object property type incompatibility errors will now contain additional explanations when the error only arises due to object property invariant subtyping.

0.205.1

  • Fix over-eager IDE autocompletion of types after typing a space.

0.205.0

Likely to cause new Flow errors:

  • Remove the flow get-imports CLI command.
  • Some duplicate errors with Arrays are invariantly typed explanations are now correctly removed.

New Features:

... (truncated)

Commits
  • 64c4a12 v0.207.0
  • 697eaa3 Update dom.js to add the rel attribute to HTMLFormElement
  • 65c5a6a [libdef] Add WeakRef class definition
  • 0b318a6 [RFC] Monomorphizing PolyT for some React use_ts by default and bounds
  • 591844c fewer spurious errors when creating objects with computed props
  • 029fe93 Use an inline record for InstanceT
  • 6cc06b8 improve predicate function errors on pattern and rest params
  • a180092 Use an inline record for GetElemT
  • e1f9a57 Add prefix field to file_sig to preserve original require string
  • 360d95a [IDE] Boilerplate for RenameFileImports action
  • 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 #1318.