NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3376 most downloaded on npm
JavaScript parser written in OCaml. Produces ESTree AST
Last release 5 days ago
19 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
433 releases · first in 2015
Likely to cause new Flow errors:
Likely to cause new Flow errors:
New Features:
void, instead of an error.Notable bug fixes:
declare function that comes after a function declaration of the same name (try-Flow).this-in-exported-function for functions with a this parameter.Misc:
--list-files flag to status and check commands. This will dump a list of files that contain errors instead of the error messages..dfind_log file alongside the .log and .monitor_log files.any. With this change, such type parameters are now considered to be uncovered. This results in Flow now computing a lower coverage percentage on modules where this pattern is present or that import types from other modules that use this pattern.One column per quarter.
Likely to cause new Flow errors:
Likely to cause new Flow errors:
instanceof checks and other refinements to more consistently detect when impossible or invalid refinements are made. This will result in new errors in such cases.New Features:
Notable bug fixes:
Misc:
Parser:
< (e.g., f<<T>()=>S>()) would be incorrectly parsed as the left shift operator.Library Definitions:
util.typesExact objects are treated as truthy in logical expressions
Bug Fixes:
$Values<> types in an export position (e.g. Try Flow)module.file_ext when resolving imports. Before, they were tried alphabetically.Misc:
signature-verification-failure from a lint to a normal error. It is no longer valid in the [lints] section of .flowconfig.Likely to cause new Flow errors:
Likely to cause new Flow errors:
experimental.new_merge option becomes true by default. This is an internal change in the way file signatures are computed, but may cause new [invalid-exported-annotation] errors when a file exports types that include certain kinds of complex operations, such as projections over complex utility types like $ObjMap. These errors can be fixed by replacing these complex types with simpler ones. In certain cases, the newly added $KeyMirror and $ObjMapConst types (that are exempt of this restriction) can be used instead.Notable bug fixes:
Parser:
export * as x from 'y' is now an ExportAllDeclaration with an exported key.esproposal_nullish_coalescing option.esproposal_optional_chaining option.esproposal_class_static_fields option.esproposal_class_instance_fields option.Library Definitions:
options parameters in node's fsPromises optional.Another light release due to the new year. Changes are mainly internal -- refactoring or progress towards future features.
Another light release due to the new year. Changes are mainly internal -- refactoring or progress towards future features.
Another light release due to the new year. Changes are mainly internal -- refactoring or progress towards future features.
Notable breaking changes:
This release is light on changes due to the holidays. Happy New Year!
This release is light on changes due to the holidays. Happy New Year!
Improve performance of IDE requests when using lazy mode and saved state
Notable bug fixes:
Fix crash when moving a module introduced in v0.167.0
Notable bug fixes:
Remove the --profile, --json and --pretty flags from flow force-recheck
Notable bug fixes:
@flow modesMisc:
--profile, --json and --pretty flags from flow force-recheckLibrary Definitions:
Fix a crash introduced in 0.166.0
Improve recheck performance on large projects
flow check-contents on non-Flow files by default; pass --all to force it.--weak CLI flag and weak=true flowconfig option have been removed.Improve performance of signature help
Notable bug fixes:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
declare var syntax be annotated with a type. declare var x; is now illegal.Notable bug fixes:
flow autocomplete on non-Flow files.export default class definitionsexports/module.exports can no longer be read from in a module (e.g. exports.foo) to eliminate this usage of unsealed objects - you can refactor your c
New Features:
exports/module.exports can no longer be read from in a module (e.g. exports.foo) to eliminate this usage of unsealed objects - you can refactor your code to directly reference foo instead, or just use ES modules (e.g. export const foo = ...)typeof type annotations.$ElementType and $PropertyType utilities.indexed_access option, it's always enabled now (was on by default before if the option was omitted).Notable bug fixes:
refactor code-action would hang on large inputs.import typeof Foo rather than import type {Foo}watchman on Windows.$ExactT<...> type annotations.this in a JSX title member.flow coverage now returns 0% for non-@flow files; pass --all to also check non-@flow files.flow get-def on non-Flow files.flow type-at-pos on non-Flow filesCompletionItemLabelDetailLibrary Definitions:
navigator.clipboard.write type and add ClipboardItem (thanks @Egrodo).fs.copyFile overload to support the case where the mode param is not specified (thanks @Brianzchen).Misc:
flow suggest command.flow find-refs command.--expand-type-aliases flag from all Flow commands, it has caused several performance and non-termination issues without providing much value.Parser:
typeof type annotations, where the argument to typeof is a not a variable or member expression, are now parse errors rather than type errors.The deprecated * type is now an alias to any. You can use flow codemod replace-existentials, which is available in previous versions of Flow, to upgra…
New Features:
* type is now an alias to any. You can use flow codemod replace-existentials, which is available in previous versions of Flow, to upgrade your codebase to not use *. This codemod command will not be available in the current or future versions of Flow.flow ast command.Notable bug fixes:
$KeyMirror so that it respects the optionality of its arguments.JSON as object rather than a class. This prevents code such as new JSON() which is a runtime error.Library Definitions:
InputEvent.dataTransferAggregateError class - fixes #8764 (thanks @lachlanhunt).UIEvent, InputEvent and KeyboardEvent types.Misc:
Parser:
# in private identifiers.Fix a bug where errors in node_modules were shown in lazy mode. It is now consistent with non-lazy mode.
node_modules were shown in lazy mode. It is now consistent with non-lazy mode.Likely to cause new Flow errors:
Likely to cause new Flow errors:
null (let x: null = null); if only undefined, then it can be annotated with void (let x: void;).New Features:
$Partial utility type. This utility converts all of an object's or interface's named fields to be optional, while maintaining all the object's other properties (exactness, sealedness, etc).Notable bug fixes:
strict_es6_import_export--autostopMisc:
import.meta as objectdeclare functionformat.single_quotes settingLikely to cause new Flow errors:
Likely to cause new Flow errors:
New Features:
string and number, as well as utility types like $Call and $Keys.Notable changes:
Notable bug fixes:
[lints] section are now ignored when passing --ignore-version.$ReadOnly types.flow-remove-types:
flow-remove-types/jestThe fix in 0.160.1 didn't fully fix the regression in 0.160.0. It, and the original "fix" from 0.160.0 are reverted.
Fix a regression in 0.160.0 that caused suppressions to be ignored upon editing files in some cases when using lazy mode.
The ide, fs and watchman lazy modes have been merged into a single mode. The new mode is now SCM-aware with or without Watchman; when the server start
New Features:
The ide, fs and watchman lazy modes have been merged into a single mode. The new mode is now SCM-aware with or without Watchman; when the server starts, it queries Git or Mercurial and checks all existing local changes (changes since the mergebase).
The file_watcher.watchman.mergebase_with config option has been renamed to file_watcher.mergebase_with; set this to the name of your default remote branch (e.g. origin/main).
Flowconfig setting migration:
lazy_mode=watchman -> lazy_mode=true, file_watcher=watchmanlazy_mode=fs -> lazy_mode=truelazy_mode=ide -> lazy_mode=truelazy_mode=none -> lazy_mode=falseAdded parser support for import.meta
Added type checking support for new.target and import.meta as mixed
Library Definitions:
queueMicrotaskNotable bug fixes:
Add support for git to watchman lazy mode. Git projects using file_watcher=watchman and lazy_mode=fs can now upgrade to lazy_mode=watchman.
New Features:
file_watcher=watchman and lazy_mode=fs can now upgrade to lazy_mode=watchman.$ObjMapi<T, <K>(K) => K> to $KeyMirror<T>. Run it via flow codemod key-mirror [OPTION]... [FILE].Library Definitions:
devicePixelRatio global (thanks @Brianzchen)The file_watcher.watchman.survive_restarts setting is now true by default. This setting is deprecated and will be removed in a future version.
New Features:
Notable changes:
#foo: () => 'foo' could not be called, leading to workarounds like this.#foo.call(this)$NonMaybeType<...>module.system.haste.module_ref_prefix=m#, "m#Foo" will jump to the Foo module)file_watcher.watchman.survive_restarts setting is now true by default. This setting is deprecated and will be removed in a future version.--retry-if-init CLI flag has been removed. Setting it to false previously caused the command to error if the server was already running but not yet ready. Instead, use --timeout to avoid waiting too long.Parser:
flow-remove-types:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
break and continue branches.New Features:
experimental.refactor=false to the .flowconfig.eslint-plugin-fb-flow, for eslint rules from the Flow team. The first rule is use-indexed-access-type to encourage the use of indexed access types (https://flow.org/en/docs/types/indexed-access/).update-suppressions to the flow tool (fixes #8384).Library Definitions:
Misc:
Cross-module autocompletion and code actions that fix missing import declarations are now enabled by default. This was experimental since 0.143.0. Can
New Features:
0.143.0. Can be disabled per project with the autoimports=false flowconfig option, or per user with the flow.suggest.autoImports LSP configuration.Library Definitions:
Fix bug in shared memory garbage collection which caused Flow to crash.
Fix bug in shared memory garbage collection which caused Flow to crash.
Likely to cause new Flow errors:
Likely to cause new Flow errors:
this inside of object methods (see https://medium.com/flow-type/sound-typing-for-this-in-flow-d62db2af969e).Notable bug fixes:
$ReadOnly utilityLibrary Definitions:
Added codemod to cleanup the use of soon to be deprecated existential type (e.g. *). It can be run via flow codemod replace-existentials --write ..
Likely to cause new Flow errors:
this parameters of functions (see https://medium.com/flow-type/sound-typing-for-this-in-flow-d62db2af969e).New Features:
*). It can be run via flow codemod replace-existentials --write ..Notable bug fixes:
Library Definitions:
Misc:
experimental.this_annot config option and permanently enable now that our core lib defs rely on this feature.new_check config option for the new check mode that uses significantly less RAM for large projects.Likely to cause new Flow errors:
Likely to cause new Flow errors:
this typing by banning the unbinding of class methods (see https://medium.com/flow-type/sound-typing-for-this-in-flow-d62db2af969e).New Features:
// flowlint-next-line require-explicit-enum-switch-cases:error.flow fix command to apply autofixes from the command line to a list of files.Notable bug fixes:
--ignore-version flag also prevents Flow from crashing when an invalid option is in the .flowconfig.Library Definitions:
options parameter for require.resolve. (thanks @skeggse)void from TypedArray sort function. (thanks @goodmind)DOMStringList instead of a string array from IDBDatabase.objectStoreNames. (thanks @bnelo12)Misc:
--binary to the flow version command to see the path to the current binary..flowconfig.method-unbinding error to replace the method with an arrow function.class-object-subtyping error to replace the object type with an interface.Likely to cause new Flow errors:
Likely to cause new Flow errors:
Notable bug fixes:
Library Definitions:
Symbol.asyncIterator (thanks @goodmind)HTMLTableSectionElement (thanks @vitoreiji)MediaRecorder constructor optionscrypto types (thanks @juodumas)cluster.worker type (thanks @magicmark)Add Smart Select IDE feature. This allows you to expand or shrink your selection based on the surrounding code. For example you might expand from an i
New Features:
getName(value: TEnum): string method. Given a value of the enum type, this returns the string representation of the name of the member. You will also need to update to the latest flow-enums-runtime package.Notable bug fixes:
annotate-exports codemod to add lowercase react instead of React (thanks @meandmax!).Misc:
README.md.cache_live_errors_artifacts and cache_signature_help_artifacts config options by default.super outside of class methods added in 0.148.0 has been removed.Library Definitions:
Map, WeakMap, Set and WeakSet constructors' iterable param to be optional as per the ECMAScript spec.PageTransitionEvent as per the HTML spec (thanks @bripkens!).stepUp and stepDown in HTMLInputElement declaration as per the HTML spec.Suggest string literals in autocomplete in positions where string literal unions are expected.
New Features:
Notable bug fixes:
package.json to have a valid Flow extension for the file to be considered..js extensions even when a module name looks like a resource file (e.g. ./a.svg will look to ./a.svg.js).this parameter with a generic.$NonMaybeType<empty> evaluate to empty.PointerCapture library definitions (thanks @malectro!).Misc:
observedBits param to React's useContext libdef.format.bracket_spacing option which affects code output (such as code actions).Suggest string literals in autocomplete in positions where string literal unions are expected.
New Features:
Notable bug fixes:
package.json to have a valid Flow extension for the file to be considered..js extensions even when a module name looks like a resource file (e.g. ./a.svg will look to ./a.svg.js).this parameter with a generic.$NonMaybeType<empty> evaluate to empty.PointerCapture library definitions (thanks @malectro!).Misc:
observedBits param to React's useContext libdef.format.bracket_spacing option which affects code output (such as code actions).…flowconfig options which have been deprecated since v0.135.
New Features:
Notable bug fixes:
obj[Symbol.iterator]. This is now correctly typed as the object type's @@iterator property.Misc:
esproposal.class_instance_fields, esproposal.class_static_fields, esproposal.decorators, esproposal.export_star_as, esproposal.nullish_coalescing and esproposal.optional_chaining flowconfig options which have been deprecated since v0.135.Likely to cause new Flow errors:
Likely to cause new Flow errors:
x instanceof null. This catches 'instanceof' is not an object runtime errors.super outside of class methods, e.g. in arrow and function properties, is now an error.Library Definitions:
static from to stream$Readable (thanks @agalatan).Notable bug fixes:
null from being a subtype of an empty interface e.g. (null: interface {}) // Error (thanks @mrtnzlml for the report).Misc:
flow refactor experimental command removed. Instead, use the LSP textDocument/rename request.experimental.new_signatures flowconfig option as well as the --old-signatures opt-out command line flag.Likely to cause new Flow errors:
Likely to cause new Flow errors:
?{c: number} did not properly error when used with utility types $PropertyType and $ElementType. null and undefined do not have properties nor elements.Object.prototype properties like toString and hasOwnProperty are no longer allowed to be accessed as global variables, which was previously allowed because window is an object.New Features:
flow-bin.Notable bug fixes:
null and undefinedflow lsp on symlinked root directoriesMisc:
@flow weak, which was a rarely-used mode in which missing annotations were treated as any. It is equivalent to suppressing any type errors that result from just using @flow. So to migrate, suppress the new errors and remove weak.flow.suggest.autoImports LSP setting to disable autoimport suggestions in autocomplete (currently requires autoimports=true to be enabled in .flowconfig)Library definitions:
assert strict mode (thanks @goodmind).webp resources (thanks @TomasBarry)tty.WriteStream (thanks @reyronald)process.exit to return emptyParser:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
interface {} is no longer a supertype of void and mixedNotable bug fixes:
. were sometimes being ignored by Flow, which has now been fixedLibrary Definitions:
PerformanceResourceTiming library definition (thanks @MIGreenberg)withFileTypes option to readdir and readdirSync (thanks @mrtnzlml)composedPath function to Event library definition (thanks @Brianzchen)Event library definition and made most properties read-onlyMisc:
gc.worker.custom_major_ratio, gc.worker.custom_minor_ratio, gc.worker.custom_minor_max_size, gc.worker.minor_heap_size, gc.worker.major_heap_increment, gc.worker.space_overhead, and gc.worker.window_size.Likely to cause new Flow errors:
Likely to cause new Flow errors:
function i({name = 1}: {| name?: string |}) {} was previously not an error.New Features:
flow_parser.js to support configuring comment output. comments enables comment attachment and all_comments enables the legacy list of all comments.Notable bug fixes:
node_modules for auto imports.Improved generic type checking launched in v0.140. The deprecated implementation and the temporary generate_tests=true flowconfig option have now been…
generate_tests=true flowconfig option have now been removed.&&, ||, ??) and union typeslet {foo, ...rest} = obj) now retain the indexer of the object being destructured. In this example, if obj is {[string]: string}, then rest is also {[string]: string}.autoimports=true flowconfig option.touch-ing the .flowconfig without changing itFixed crash on Windows and crash on Linux introduced in 0.143.0
Notable bug fixes:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
types_first and well_formed_exports flowconfig options are no longer recognized. See https://medium.com/flow-type/types-first-a-scalable-new-architecture-for-flow-3d8c7ba1d4eb/ for more about Types-First mode.New Features:
autoimports=true flowconfig option.--sharedmem-heap-size CLI flag and FLOW_SHAREDMEM_HEAP_SIZE environment variable, which can be used instead of the sharedmem.heap_size flowconfig option for setting the amount of shared memory available.Misc:
ErrorEvent library definition (thanks @kegluneq)Likely to cause new Flow errors:
Likely to cause new Flow errors:
Notable bug fixes:
No available version of ocaml-base-compiler satisfies the constraints error from make all-homebrew (thanks @bayandin).Improved inference of chained generic method calls, such as Array methods. For example, given [1, 2].map(a => a).forEach(b => b), Flow now infers that
Array methods. For example, given [1, 2].map(a => a).forEach(b => b), Flow now infers that b is a number rather than any | number._= in JSX attributes that already have oneLikely to cause new Flow errors:
Likely to cause new Flow errors:
generate_tests=true in a flowconfig if desired. See https://medium.com/flow-type/flows-improved-handling-of-generic-types-b5909cc5e3c5 for more about Flow's new handling of generic types.Notable bug fixes:
Parser:
Misc:
ShadowRoot library definition (thanks @Brianzchen)…performance improvements. This option is now deprecated and will be removed in a coming version.
New Features:
this annotations in functions, like function f(this: {foo: string}, param1: string): string { return this.foo; }experimental.abstract_locations config option is now true by default, as it enables significant performance improvements. This option is now deprecated and will be removed in a coming version.Notable bug fixes:
K: string flows into $Keys<{[K]: ...}>K: 'literal' is checked against itself like k === 'literal'Misc:
flow-remove-types to support this parametersLikely to cause new Flow errors:
Likely to cause new Flow errors:
Bug Fixes:
$ExactEditor Integration:
all=true (thanks @mochja)flow CLI at the same time as VS Code caused by case-insensitivity of Windows pathsLibrary Definitions:
inputType to InputEvent (thanks @Brianzchen)intersectsNode to Range (thanks @Brianzchen)Misc:
/tmp/flow/flowlibs_<HASH>, to take up less space.Show code actions in the IDE for some parse errors with suggested fixes.
New Features:
Notable bug fixes:
Library Definitions:
Buffer.write to number (thanks @fedotov).Misc:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
Notable bug fixes:
Requires_not_found or Sig_requires_not_found.Misc:
propTypes to React.AbstractComponentStatics (thanks @brianzchen).Improved exhaustiveness checking in switch statements.
Likely to cause new Flow errors:
Misc:
Likely to cause new Flow errors:
Likely to cause new Flow errors:
types_first=false in a flowconfig if desired. See https://medium.com/flow-type/types-first-a-scalable-new-architecture-for-flow-3d8c7ba1d4eb for more about types-first.New Features:
file_watcher.watchman.mergebase_with flowconfig option and --file-watcher-mergebase-with CLI option to choose a tracking bookmark for Watchman to compute the mergebase against.Misc:
Remove deprecated, nonstandard itemType and inlineDetail fields from the LSP completionItem implementation.
Likely to cause new Flow errors:
New Features:
Notable bug fixes:
flow focus-check when a focused file has a syntax error.Misc:
null-void-addition lint now that it has been subsumed by an ordinary type error.export *itemType and inlineDetail fields from the LSP completionItem implementation.Likely to cause new Flow errors:
Likely to cause new Flow errors:
New Features:
Notable bug fixes:
Misc:
"Go to Definition" on a JSX attribute name now jumps to the prop's type.
module in ES modules when well_formed_exports is enabled.types_first=true) when using well_formed_exports.include. For types-first to function properly, the entire project's exports must be well-formed, not just specific paths.--types-first on the command line overrides well_formed_exports=false in .flowconfig. This makes it easier to test types-first mode.unsafe-addition lint now defaults to being an error. It will be converted from a lint to a type error in the future.dynamic-export lint which does not work in types-first modeRemoved deprecated blacklist/whitelist aliases for config options, use includes/excludes instead (see updated docs: for Types First and flowconfig opt…
New Features:
module.exports = ... to the actual definition.Library Definitions:
offset an optional argument for the sized Buffer read/writes (thanks @isker!)Misc:
includes/excludes instead (see updated docs: for Types First and flowconfig options).Likely to cause new Flow errors:
Likely to cause new Flow errors:
Notable bug fixes:
Misc:
cast and isValid to take in optional representation type for enumsEnable LSP support for autofix exports by default.
New Features:
default were exported with export default syntax.Library Definitions:
Parser:
Config:
Improvements to editor in flow.org/try, including syntax highlighting
Misc:
Library Definitions:
Fixed an issue where changing .flowconfig or package.json and then running flow status would get stuck in a restart loop, if using lazy mode with Watc
.flowconfig or package.json and then running flow status would get stuck in a restart loop, if using lazy mode with Watchman and Mercurial.Allow indexers in exact object annotations
window/showStatus responsesHeadersInit and signal to Fetch API (thanks @andretshurotshka!)replace method to DOMTokenList (thanks @w01fgang!)Publishing of flow-bin v0.125.0 failed to include the binaries. Oops!
Publishing of flow-bin v0.125.0 failed to include the binaries. Oops!
Your coding agent can read these notes before it upgrades. Set up the MCP server →