flow

Adds static typing to JavaScript to improve developer productivity and code quality.

MIT License

Downloads
42.1M
Stars
22.1K
Committers
931

Bot releases are visible (Hide)

flow - https://github.com/facebook/flow/releases/tag/v0.136.0

Published by facebook-github-bot about 4 years ago

Likely to cause new Flow errors:

  • Flow now raises errors when generic type variables escape out of the scope in which they were defined.

Notable bug fixes:

  • Fix a race condition related to saved state and cancelable rechecks that caused internal errors of Requires_not_found or Sig_requires_not_found.

Misc:

  • Added documentation to core.js builtins.
  • Add optional propTypes to React.AbstractComponentStatics (thanks @brianzchen).
flow - https://github.com/facebook/flow/releases/tag/v0.135.0

Published by facebook-github-bot about 4 years ago

  • Improved exhaustiveness checking in switch statements.
  • Improved autocomplete results to show documentation in more cases.
  • Turned the untyped-type-import lint into an error by default. In a later release, we will turn this into a regular type error instead of a lint error.
  • Removed esproposal configuration options from the .flowconfig format.
  • Added library definition for MediaRecorder API.
  • Fixed Object.freeze to no longer incorrectly convert an inexact object into an exact object.
  • Fixed handling of exported objects with spreads in types-first mode.
flow - https://github.com/facebook/flow/releases/tag/v0.134.0

Published by facebook-github-bot about 4 years ago

Likely to cause new Flow errors:

New Features:

  • Added a 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.
  • Show JSDoc documentation in type declarations.

Misc:

  • Improved the consistency of what operation is pointed to in error messages, to ensure they aren't dependent on the order in which constraints are generated.
  • Filtered "did you mean" code actions to only send actions on code under cursor.
  • Changed the return type of fileURLToPath (thanks @aaronasachimp)
flow - https://github.com/facebook/flow/releases/tag/v0.133.0

Published by facebook-github-bot about 4 years ago

Likely to cause new Flow errors:

  • Improve reliability of inclusion check in strict equality conditionals.

New Features:

  • Show JSDoc documentation in hover, autocomplete, and signature help.

Notable bug fixes:

  • Fix a bug related to saved state that could cause crashes during initialization.
  • Fix a bug related to saved state that could cause internal errors during rechecks.
  • Fix crash with flow focus-check when a focused file has a syntax error.

Misc:

  • Remove the null-void-addition lint now that it has been subsumed by an ordinary type error.
  • Improved signature help for inlined tuple rest params.
  • Enable the following language features by default, since they have reached stage 4:
    • export *
    • Nullish coalescing
    • Optional chaining
  • Remove deprecated, nonstandard itemType and inlineDetail fields from the LSP completionItem implementation.
  • Exit the worker processes gracefully when the main process crashes.
flow - https://github.com/facebook/flow/releases/tag/v0.132.0

Published by facebook-github-bot about 4 years ago

Likely to cause new Flow errors:

  • Disallow using any-typed values type annotations. example

New Features:

  • Added warnings against suppressions without error codes

Notable bug fixes:

  • Fixed some crashes when Flow could not connect to Watchman

Misc:

  • Fix syntax errors in README badges (thanks @jamesisaac)
flow - https://github.com/facebook/flow/releases/tag/v0.131.0

Published by facebook-github-bot about 4 years ago

  • "Go to Definition" on a JSX attribute name now jumps to the prop's type.
  • Improved error messages for non-strict equality checks
  • Fixed a bug that prevented the use of module in ES modules when well_formed_exports is enabled.
  • Fixed an issue that allowed types-first mode to be 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.
  • Fixed a similar issue so that --types-first on the command line overrides well_formed_exports=false in .flowconfig. This makes it easier to test types-first mode.
  • The unsafe-addition lint now defaults to being an error. It will be converted from a lint to a type error in the future.
  • Removed dynamic-export lint which does not work in types-first mode
  • Improved initialization performance
flow - https://github.com/facebook/flow/releases/tag/v0.130.0

Published by facebook-github-bot about 4 years ago

New Features:

  • Improved IDE get definition behavior of imported names by jumping past module.exports = ... to the actual definition.

Library Definitions:

  • Made offset an optional argument for the sized Buffer read/writes (thanks @isker!)

Misc:

  • Removed deprecated blacklist/whitelist aliases for config options, use includes/excludes instead (see updated docs: for Types First and flowconfig options).
flow - https://github.com/facebook/flow/releases/tag/v0.129.0

Published by facebook-github-bot over 4 years ago

Likely to cause new Flow errors:

  • $Keys<...> will no longer include non-own instance properties, matching the behavior of Object.keys.

Notable bug fixes:

  • Fixed an incremental rechecking issue caused by the hashes of type destructors

Misc:

  • Updated the type of cast and isValid to take in optional representation type for enums
  • Added missing links to Medium articles from flow.org (thanks @jamesisaac)
flow - https://github.com/facebook/flow/releases/tag/v0.128.0

Published by facebook-github-bot over 4 years ago

New Features:

  • Enable LSP support for autofix exports by default.
  • Added a lint rule to ensure exports named default were exported with export default syntax.
  • Enabled support for JSDoc in some LSP results.

Library Definitions:

  • Add parameter to MediaStreamTrack.applyConstraints()

Parser:

  • Fix parsing async arrow functions with multiple type parameters

Config:

  • Remove types-first flag aliases prefixed with "experimental"
  • Replace well_formed_exports.whitelist with well_formed_exports.includes
flow - https://github.com/facebook/flow/releases/tag/v0.127.0

Published by facebook-github-bot over 4 years ago

Misc:

  • Improvements to editor in flow.org/try, including syntax highlighting
  • Fix broken links in docs
  • Standardized error suppression syntax, added ability to suppress errors based on error codes

Library Definitions:

  • Add KD functions
  • Add onended callback to OscillatorNode
  • Make 3rd parameter of node.js symlinkSync optional
flow - https://github.com/facebook/flow/releases/tag/v0.126.1

Published by facebook-github-bot over 4 years ago

  • 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 Watchman and Mercurial.
flow - https://github.com/facebook/flow/releases/tag/v0.126.0

Published by facebook-github-bot over 4 years ago

  • Allow indexers in exact object annotations
  • Fixed type-at-pos in flow.org/try
  • Improved language of LSP window/showStatus responses
  • Improved control flow handing in logical expressions
  • Allow applying utility types to opaque types in the defining module
  • Added HeadersInit and signal to Fetch API (thanks @andretshurotshka!)
  • Added replace method to DOMTokenList (thanks @w01fgang!)
flow - https://github.com/facebook/flow/releases/tag/v0.125.1

Published by facebook-github-bot over 4 years ago

Publishing of flow-bin v0.125.0 failed to include the binaries. Oops!

flow -

Published by facebook-github-bot over 4 years ago

Likely to cause new Flow errors:

  • Fixed signatures generated in types-first for classes with non-trivial expressions
    in their extends clauses, which were before treated like extending any.

New features:

  • Types-first is no longer an experimental mode, but is now fully supported!

Notable bug fixes:

  • Fixed a soundness bug that allowed refined property expressions to be treated as
    empty in some circumstances.

Misc:

  • Added $FlowIssue and $FlowExpectedError as default suppression comments.
  • Improved quality of AST and comment printing and layout.
  • Improved quality of type printing for type-at-pos and friends.
  • Added '.cjs' to default extensions list.

Parser:

  • Fixed ranges of sequence and assignment expressions that contain grouping parentheses.
  • Disallowed newline after type keyword in type aliases.

Library definitions:

  • Added headers timeout to http & https server (thanks, @mattconde!)
  • Added flushHeaders to http$ServerResponse (thanks, @gajus!)
  • Changed thisArg parameter for array callback functions (e.g. map, reduce) to mixed.
  • Added more precise typing for common cases of Array.flat.
flow -

Published by facebook-github-bot over 4 years ago

Library Definitions:

  • Add StorageEvent overloads.

Misc:

  • Use textEdit in identifier completion item responses over the LSP, to avoid possible behavior differences with different LSP clients.
  • Various improvements to the pretty-printer.
  • A small improvement in completeness when handling the "not" operation in the presence of unions of literal types.
  • Wrap the usage message to 100 chars.
  • Fix a poorly-positioned error related to polymorphic function types.

Parser:

  • Improved some parser error messages by treating the end of file as a valid end of object property.
  • Updated ESTree output for import expressions to match the spec.

flow-dev-tools:

  • Add the update-suppressions subcommand.
flow - https://github.com/facebook/flow/releases/tag/v0.123.0

Published by facebook-github-bot over 4 years ago

New Features:

  • Added support for the babel react jsx transform with the react.runtime flowconfig
    option. When set to automatic the transform auto-imports jsx (the replacement for
    createElement) under a fresh name (unique of all existing names in the source).
    When set to classic it will continue transpiling jsx to React.createElement.

Notable bug fixes:

  • We are now treating $Exact<T|U> as $Exact<T>|$Exact<U>. Before, when we checked
    against this type we would treat it like $Exact<T> & $Exact<U>, instead.
  • Fix to prevent infinitely expanding recursive type applications of arrays (example).

Misc:

  • Improvements in comment attachement in various kinds of AST nodes. These will
    help improve the accuracy of error suppression and various services that inspect
    comments (printing, showing documentation, etc.).
  • $Exports<'m'> will now lookup module 'm' directly in builtins, instead of the
    environment.
  • Extend union optimizations used on maybe predicate to also be applied in exists
    predicates.

Parser:

  • The range around type cast expression now includes the parentheses. This follows
    the pattern of other constructs with mandatory punctuation like blocks, objects or arrays.
flow - https://github.com/facebook/flow/releases/tag/v0.122.0

Published by facebook-github-bot over 4 years ago

Likely to cause new Flow errors:

  • Moved react-dom modules out of built-in libdefs. They are now available on flow-typed.

    To install the libdefs, run flow-typed install --flow-version=0.122.0 [email protected]

    This diff is necessary to allow React to make breaking changes to react-dom without force-pinning Flow users to the latest version of react-dom.

  • Fixed an unsoundness in union and intersection spreads

  • Improved object spread-related error messages, which may cause suppressed errors to become unsuppressed because they moved to better locations

Improved Editor Integration:

  • Removed completion of function param snippets. Before, f<tab> might complete foo(aParam), which is problematic if you don't want to call the function. Now it just completes foo. These snippets are further obviated by signature help, which appears when you type (.
  • Improved accuracy of "Did You Mean?" Quick Fixes for object property type errors
  • Added support for Go to Definition on export-from declarations (export { HERE } from ...)
  • Fixed tracking of open files in LSP clients which could cause stale errors in the IDE

Misc:

  • Added HTMLUnknownElement and support for custom elements to document.createElement (thanks @YevhenKap!)
  • Fixed --saved-state-no-fallback flag so that Flow exits when saved state is not found
  • Fixed an issue where an invalid package.json would prevent generating saved state
  • Fixed a potential deadlock when communicating with Watchman
  • Fixed types-first signatures for CJS requires introduced with var
  • Enabling experimental.types_first now implies experimental.well_formed_exports

Parser:

  • Renamed RestProperty to RestElement to match estree
  • Changed 'for await' nodes from ForAwaitStatement to ForOf with await: true to match estree
flow - https://github.com/facebook/flow/releases/tag/v0.121.0

Published by facebook-github-bot over 4 years ago

Highlights:

  • Made several improvements to errors:
    • Restricted errors to only be suppressible at the error's primary location (see blog post)
    • Fixed the error grouping logic to no longer group unrelated errors that happen to share a location
    • Changed the order of locations printed in error messages so that the primary location is always printed first (which is the one you need to suppress if you want to do that)

Misc:

  • Fixed the add-comments script to add comments on JSXText
  • Fixed a crash when TMPDIR exceeded 83 characters
  • Stopped parsing .flow files without @flow

Lib defs:

  • Improved definitions for Node's url.parse function (thanks @chicoxyzzy)
  • Added missing console methods (thanks @goodmind)
  • Added Element.hasAttributes()
  • Added string index to NamedNodeMap
  • Fixed Element.querySelector() and Element.querySelectorAll() overloads
  • Added type definition for Promise.allSettled()
flow - https://github.com/facebook/flow/releases/tag/v0.120.1

Published by facebook-github-bot over 4 years ago

Likely to cause new Flow errors:

  • $Shape types now carry more information about the locations of errors that involve them, which may invalidate old suppressions.
  • any-typed values are now refined by primitive typeof checks (example).

New Features:

  • "Did You Mean?" IDE feature that suggests corrections to your code as you type. For example, if you write foo.bar on an object foo that doesn’t have a field named bar but does have a field named baz, the quick fix will apply that suggestion.

  • declare can now be used on class fields. When Flow implemented the class fields proposal, uninitialized class fields (e.g. class C { foo }) were not allowed, so we used that syntax for type-only declarations (class C { foo: string }). Since then, they now are initialized to undefined and Babel 8 will start to leave them. To maintain existing behavior, change uninitialized fields to use the declare keyword, signalling to Babel that they should be stripped (class C { declare foo: string }).

Notable bug fixes:

  • Fixed possible stack overflow from overly long traces.
  • Fixed infinite recursion case involving polymorphic types.
  • Various improvements to the output of type-at-pos and signatureHelp

Misc:

  • Fixed libdefs of Notification to have read-only fields
flow - v0.120.0

Published by facebook-github-bot over 4 years ago

Likely to cause new Flow errors:

  • $Shape types now carry more information about the locations of errors that involve them, which may invalidate old suppressions.
  • any-typed values are now refined by primitive typeof checks (example).

New Features:

  • "Did You Mean?" IDE feature that suggests corrections to your code as you type. For example, if you write foo.bar on an object foo that doesn’t have a field named bar but does have a field named baz, the quick fix will apply that suggestion.

  • declare can now be used on class fields. When Flow implemented the class fields proposal, uninitialized class fields (e.g. class C { foo }) were not allowed, so we used that syntax for type-only declarations (class C { foo: string }). Since then, they now are initialized to undefined and Babel 8 will start to leave them. To maintain existing behavior, change uninitialized fields to use the declare keyword, signalling to Babel that they should be stripped (class C { declare foo: string }).

Notable bug fixes:

  • Fixed possible stack overflow from overly long traces.
  • Fixed infinite recursion case involving polymorphic types.
  • Various improvements to the output of type-at-pos and signatureHelp

Misc:

  • Fixed libdefs of Notification to have read-only fields