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.
Added quick fix in the IDE for missing "this." on class member access.
To use the extract to expression/type alias IDE refactors, you no longer need to do exact selections to trigger it. Any selections that include extra whitespaces will be OK too.
Notable bug fixes:
Fix go-to-definition in IDE for constructors (e.g., new Foo()).
When considering a function as a callable object type, we now also check the statics of the function against the object. This may cause new errors. For example, the code in this try-Flow will now error.
We now error more consistently when nested union types are being spread. Before, a bug was causing legitimate errors to not be surfaced. Example with [cannot-spread-inexact] errors: try-Flow. Example with type incompatibility: try-Flow.
Some spurious underconstrained-implicit-instantiation errors might be removed. Previously, some classes that extend any might have caused this issue.
Fix over-eager IDE autocompletion of keywords after typing a space.
Library Definitions:
Added NodeJS process.hrtime.bigint().
Many built-in react components and intrinsics props are now readonly.
v0.204.1
Notable bug fixes:
Fix a crash that could happen when canceling a recheck during module resolution
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:
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.
Added quick fix in the IDE for missing "this." on class member access.
To use the extract to expression/type alias IDE refactors, you no longer need to do exact selections to trigger it. Any selections that include extra whitespaces will be OK too.
Notable bug fixes:
Fix go-to-definition in IDE for constructors (e.g., new Foo()).
When considering a function as a callable object type, we now also check the statics of the function against the object. This may cause new errors. For example, the code in this try-Flow will now error.
We now error more consistently when nested union types are being spread. Before, a bug was causing legitimate errors to not be surfaced. Example with [cannot-spread-inexact] errors: try-Flow. Example with type incompatibility: try-Flow.
Some spurious underconstrained-implicit-instantiation errors might be removed. Previously, some classes that extend any might have caused this issue.
Fix over-eager IDE autocompletion of keywords after typing a space.
Library Definitions:
Added NodeJS process.hrtime.bigint().
Many built-in react components and intrinsics props are now readonly.
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 from 0.195.0 to 0.206.0.
Release notes
Sourced from flow-parser's releases.
... (truncated)
Changelog
Sourced from flow-parser's changelog.
... (truncated)
Commits
fc230eb
v0.206.06005936
short circuit get-def on template literalsab206d2
short circuit get-def on literals8ea2d48
[errors] Use RMixed as the reason description of tparam default bound973da39
[tuples] Add option to gate tuple enhancements8a2cf21
Allow opaque types with string supertypes to be extracted with as keys using ...291abd0
Move type at post tests for opaque types to use queries_in_filebcbcdcc
v0.205.11cc2ade
fix: make write_computed_obj_prop a use_t432d644
accept any expression as predicate function calleeDependabot 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)