Skip to content

Commit

Permalink
v0.259.0
Browse files Browse the repository at this point in the history
Reviewed By: SamChou19815

Differential Revision:
D68234211

------------------------------------------------------------------------
(from c2d2389cc0c8d4eb5b1f775fffb6d0cbf85b9d6d)

fbshipit-source-id: 69de0d06f943e5f7baf8443a48b30904262d31bd
  • Loading branch information
pieterv authored and facebook-github-bot committed Jan 15, 2025
1 parent 00fde30 commit e600642
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 9 deletions.
20 changes: 20 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion flow_parser.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "flow_parser"
version: "0.258.1"
version: "0.259.0"
maintainer: "[email protected]"
authors: ["Flow Team <[email protected]>"]
homepage: "https://github.com/facebook/flow/tree/master/src/parser"
Expand Down
4 changes: 2 additions & 2 deletions flowtype.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "flowtype"
version: "0.258.1"
version: "0.259.0"
maintainer: "[email protected]"
authors: "Flow Team <[email protected]>"
license: "MIT"
Expand All @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-parser-bin/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-parser/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-remove-types/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/try-flow-website-js/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/common/flow_version.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* LICENSE file in the root directory of this source tree.
*)

let version = "0.258.1"
let version = "0.259.0"
2 changes: 1 addition & 1 deletion website/docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e600642

Please sign in to comment.