Releases: facebook/flow
Releases · facebook/flow
Release list
v0.324.0
New Features:
- .flowconfig's
[include]and[ignore]sections can now be configured using globs, in addition to the current regex based system. Right now, glob items must be specified withglob:prefix. Globs do not support<PROJECT_ROOT>, since they are assumed to start from the project root. - Class fields and methods whose computed key resolves to a literal string or number are now supported and type-checked as named members.
v0.323.0
v0.322.0
Notable bug fixes:
- Fixed #9448
- Fixed a crash in pattern matching. (example)
- Refining a union by
instanceofno longer leaksanyfrom members that cannot match the guard (e.g.Foo<string> | Bar<number>refined byinstanceof Foonow yieldsFoo<string>instead ofFoo<string> | Foo<any>). This may surface real errors that were previously masked.
v0.321.0
Parser:
flow-parseris now backed by the Rust port parser. It will have public API similar to that ofhermes-parser.
v0.320.0
Likely to cause new Flow errors:
- Object operations on class instance types now produce plain object types instead of preserving the class instance's nominal identity. This affects object type spreads and utilities such as
Partial,Required,Readonly,Pick, andOmit. Example
v0.319.0
Likely to cause new Flow errors:
- The config for
casting_syntaxis removed. Theascasting syntax is the only supported casting syntax. See Modernizing legacy syntax for migration guidance. - Flow will now error on
T: Bin favor ofT extends Bin type parameters, and error on+/-in favor ofreadonly/writeonly. See Modernizing legacy syntax for migration guidance.
New Features:
- Support the global
NaNas amatchpattern
Notable bug fixes:
- Fixed negative bigint literal patterns in
matchbeing treated as their positive counterpart ConstructorParametersandInstanceTypenow work onClass<C>, not justtypeof Cmatchinstance patterns whose constructor is a subclass of the scrutinee type are no longer incorrectly reported as unused.
v0.318.0
Likely to cause new Flow errors:
- Flow will now error on all deprecated utility types. See Modernizing legacy syntax for migration guidance.
v0.317.0
New Features:
- Allow
-?(optionality removal) in mapped types. - Adds support for utility types
ConstructorParametersandInstanceType
Misc:
- The
.flowconfigoptionscomponent_syntax,enums, andpattern_matchingnow default totrue. To keep the previous behavior, set the corresponding option to=falsein your.flowconfig.
v0.316.0
Likely to cause new Flow errors:
deprecated-typeanddeprecated-type-boolerrors are now always on (the lints were on by default already). Update any references of the typebooltoboolean, and delete references to the lints in your.flowconfigandflowlintcomments — the setting is a no-op for this release and will be removed in a future release.
[flow] v0.315.0
- Variance keywords (
readonly,writeonly,in,out) on type parameters and object/class properties are now enabled by default. Theexperimental.allow_variance_keywordsis no longer needed to opt in. - The deprecated variance sigils error message now suggests the contextually correct keyword (
readonly/writeonlyfor property positions,out/infor type parameter positions) instead of listing both alternatives.