Skip to content

Commit

Permalink
v0.251.0
Browse files Browse the repository at this point in the history
Summary: Release v0.251.0

Reviewed By: SamChou19815

Differential Revision: D65091648

fbshipit-source-id: 9ab10f64084042daaccb867369a6e4c64126b893
  • Loading branch information
Alex Taylor (alta) authored and facebook-github-bot committed Oct 29, 2024
1 parent 8ec838e commit bae7dcb
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 9 deletions.
17 changes: 17 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### 0.251.0

Likely to cause new Flow errors:
* Remove the deprecated `React.AbstractComponent` type. We recommend replacing them with [component types](https://flow.org/en/docs/react/component-types/). Since v0.249.0, we have provided a codemod via the `flow-upgrade` package to aid larger codebases with this conversion: `yarn run flow-codemod eliminateAbstractComponent path/to/src`.
* In addition to the removal of `React.AbstractComponent` type, we also removed support for the internal `React$AbstractComponent` when more than 1 type argument has been passed. Similarly, you should migrate to use component types if you want to specify ref props and renders.

New Features:
* We now support a new way to easily specify library definitions for npm modules. For all files in `@flowtyped` directory at the root, they can be resolved by the relative path without leading `./` relative to `@flowtyped`. e.g. `<PROJECT_ROOT>/@flowtyped/react.js.flow` can be used to type the `react` package, and `<PROJECT_ROOT>/@flowtyped/react/jsx-runtime.js.flow` can be used to type `react/jsx-runtime` module. We now recommend using this approach instead of using `declare module` in global libdef.

Notable bug fixes:
* `any` will now correctly propagate to inferred render type. [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SQAOhINE8qNgAAQwB7KODQHkAJUEGnxAEEoLQABQASmQPOBtAA3KyoJzcNy+QL4VAeQopNExZqTCQADwipVi6JWAByEA0AD5ZWAlZARIxoBZZSwYAB+G2sZQAEjFMAAyriTBaiiU2M7eDyrKnsF6VvKeSwzfjRYrRerHtB7Ib5MblKVpbRTRKeQBeMsViS182y1tSmXy1U8gD0vZ5swaQvygx5DwltnsNAqpWTUAgAHceRAthqjTRK2xqx3lSRDRm1X2B6ulSqeQA-Z0HuG0DW5EANc1CqBJBoABisACYAKyf98gPSQA).
* Fixed a bug with regard to jsx type inference with generic callable objects. [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SQ0Tyo2AABLZ7JyAAoQQYAeWQnOAAB0oJzpZyADwAFQAfAAKamMEii4AwYii+W8TkwKCi5XygCUnIAvIrOQ0IHA2PTTaKAEqsZRWAByEA0vEl9IA3JK2bgOdzoLyBYMAGJGuVK1WUWEasXaiC6-WG41my3W232x05zmu6Ke73YQNQSWyyO0IUG4gW4AAZnpBqgjeVDXNVrFDU5GBInPspigCH9nIA9AAqIe1CDaNickyJyic6DcgcSfWzBpweckQZrqV9xw0EScqcTzn01sTxUV6uC2gx+sQRsttsdruF4B9gdDqQKjHScZxIOcFyXagIFXddql5S9r1ve9JVyEAGhMEg9ygJIMnsEwQHpIA)
* Fixed a soundness hole that allowed frozen objects to be incompatible with non-readonly objects. This [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SVs9gABDBKBAAF6CADyaAAVnMJOyALzswUi5RWLnYbB8gAUwBgyHZABYAEz0gCUAG4ADqPaAckSpVrYaWi9Wq9XCEQ3dkAH3Z9lMUAQ9IlnO5fKg1uU+vZAHoQ+yAO5wY7sqAQCPsnDs4HskzcyjG82WNBtQMxGA+w0gYiMEhF-W5EANEwkODQJINAAMVi1GoAHFYAIwgelAA) will now produce an error.

Library Definitions:
* We have updated some core React type definitions to use the new [component type](https://flow.org/en/docs/react/component-types/) instead of `React.AbstractComponent`. Most of the code won't be affected, but you might have to sometimes make the Props readonly.

### 0.250.0

Likely to cause new Flow errors:
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.250.0"
version: "0.251.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.250.0"
version: "0.251.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.250.0"}
"flow_parser" {= "0.251.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.250.0",
"version": "0.251.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.250.0",
"version": "0.251.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.250.0",
"version": "2.251.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.250.0",
"version": "0.251.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.250.0"
let version = "0.251.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.250.0"
"flow-bin": "^0.251.0"
},
"scripts": {
"flow": "flow"
Expand Down

0 comments on commit bae7dcb

Please sign in to comment.