From e6006422e34144d0627ba6c605ca8d49e2af47e5 Mon Sep 17 00:00:00 2001 From: Pieter Vanderwerff Date: Wed, 15 Jan 2025 14:36:37 -0800 Subject: [PATCH] v0.259.0 Reviewed By: SamChou19815 Differential Revision: D68234211 ------------------------------------------------------------------------ (from c2d2389cc0c8d4eb5b1f775fffb6d0cbf85b9d6d) fbshipit-source-id: 69de0d06f943e5f7baf8443a48b30904262d31bd --- Changelog.md | 20 ++++++++++++++++++++ flow_parser.opam | 2 +- flowtype.opam | 4 ++-- packages/flow-parser-bin/package.json | 2 +- packages/flow-parser/package.json | 2 +- packages/flow-remove-types/package.json | 2 +- packages/try-flow-website-js/package.json | 2 +- src/common/flow_version.ml | 2 +- website/docs/install.md | 2 +- 9 files changed, 29 insertions(+), 9 deletions(-) diff --git a/Changelog.md b/Changelog.md index 37a567719db..9589fb18c51 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,23 @@ +### 0.259.0 + +Likely to cause new Flow errors: +* When a function without statics is passed to a place that expects inexact objects, the error will just say "function without statics is incompatible with object", instead of listing all the missing props in statics in errors. Error code might change. +* When a non-callable object is passed to a place expecting functions, we will have a clearer message saying "non-callable object is incompatible with function" instead of the current error talking about the callable property. Some error code might change, which requires new suppressions. + +Notable bug fixes: +* For errors involving unions and intersections, we will now show a list of possible causes in a sorted order: the ones that are mostly likely to be the cause will be shown first. + +IDE: +* We slightly changed the go-to-definition behavior for export from statements: + - For `bar` in `export {foo as bar} from '...'`, we will always jump to itself + - For `foo` in `export {foo} from '...'` or `export {foo as bar} from '...'`, we will always jump to the name at the export, if this statement is well typed. + - For `foo` in `export {foo} from '...'` or `export {foo as bar} from '...'`, we will jump to itself if the statement is not well-typed. +* Go-to-definition on intrinsic jsx elements will jump to nowhere instead of jump to itself. +* Go-to-definition for `require('...')` expression will now jump to the default export of an ESM module if available, or the first export of an ESM module. + +Library Definitions: +* Type for `React.Context` has been updated to support [React 19's context as provider model](https://react.dev/blog/2024/12/05/react-19#context-as-a-provider). Given this change, you might need additional annotations on exports. e.g. + ### 0.258.1 IDE: diff --git a/flow_parser.opam b/flow_parser.opam index 345e717d227..5634d954cd5 100644 --- a/flow_parser.opam +++ b/flow_parser.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "flow_parser" -version: "0.258.1" +version: "0.259.0" maintainer: "flow@fb.com" authors: ["Flow Team "] homepage: "https://github.com/facebook/flow/tree/master/src/parser" diff --git a/flowtype.opam b/flowtype.opam index cafcecded82..3ed1b768663 100644 --- a/flowtype.opam +++ b/flowtype.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "flowtype" -version: "0.258.1" +version: "0.259.0" maintainer: "flow@fb.com" authors: "Flow Team " license: "MIT" @@ -15,7 +15,7 @@ depends: [ "camlp-streams" {>= "5.0.1"} "dtoa" {>= "0.3.2"} "fileutils" {>= "0.6.4"} - "flow_parser" {= "0.258.1"} + "flow_parser" {= "0.259.0"} "inotify" {os = "linux" & >= "2.4.1"} "ounit2" {with-test} "lwt" {>= "5.7.0"} diff --git a/packages/flow-parser-bin/package.json b/packages/flow-parser-bin/package.json index b92e831053f..766e6ef5371 100644 --- a/packages/flow-parser-bin/package.json +++ b/packages/flow-parser-bin/package.json @@ -1,6 +1,6 @@ { "name": "flow-parser-bin", - "version": "0.258.1", + "version": "0.259.0", "description": "The Flow JavaScript parser, via bindings to the native OCaml implementation", "main": "index.js", "repository": "https://github.com/facebook/flow.git", diff --git a/packages/flow-parser/package.json b/packages/flow-parser/package.json index f6e4d7170d7..173872a57aa 100644 --- a/packages/flow-parser/package.json +++ b/packages/flow-parser/package.json @@ -1,6 +1,6 @@ { "name": "flow-parser", - "version": "0.258.1", + "version": "0.259.0", "description": "JavaScript parser written in OCaml. Produces ESTree AST", "homepage": "https://flow.org", "license": "MIT", diff --git a/packages/flow-remove-types/package.json b/packages/flow-remove-types/package.json index dda48b92d87..d68920e5fc2 100644 --- a/packages/flow-remove-types/package.json +++ b/packages/flow-remove-types/package.json @@ -1,6 +1,6 @@ { "name": "flow-remove-types", - "version": "2.258.1", + "version": "2.259.0", "description": "Removes Flow type annotations from JavaScript files with speed and simplicity.", "author": { "name": "Flow Team", diff --git a/packages/try-flow-website-js/package.json b/packages/try-flow-website-js/package.json index 6078372fe86..c7bc4c8b547 100644 --- a/packages/try-flow-website-js/package.json +++ b/packages/try-flow-website-js/package.json @@ -1,6 +1,6 @@ { "name": "try-flow-website-js", - "version": "0.258.1", + "version": "0.259.0", "description": "An NPM package to hold compiled `flow.js` and libdefs for every Flow version.", "license": "MIT", "repository": "facebook/flow", diff --git a/src/common/flow_version.ml b/src/common/flow_version.ml index 893ed271e21..7d9ae8187b2 100644 --- a/src/common/flow_version.ml +++ b/src/common/flow_version.ml @@ -5,4 +5,4 @@ * LICENSE file in the root directory of this source tree. *) -let version = "0.258.1" +let version = "0.259.0" diff --git a/website/docs/install.md b/website/docs/install.md index ca06f887f9f..38f6b3bcc1a 100644 --- a/website/docs/install.md +++ b/website/docs/install.md @@ -126,7 +126,7 @@ npm install --save-dev flow-bin "name": "my-flow-project", "version": "1.0.0", "devDependencies": { - "flow-bin": "^0.258.1" + "flow-bin": "^0.259.0" }, "scripts": { "flow": "flow"