Skip to content

Commit

Permalink
v0.247.0
Browse files Browse the repository at this point in the history
Reviewed By: panagosg7

Differential Revision: D63494830

fbshipit-source-id: 59854b4a2b64ad4c4992490c878d574779d13159
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Sep 27, 2024
1 parent 1bd55cf commit 769b035
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 9 deletions.
30 changes: 30 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
### 0.247.0

Breaking changes:
* Support for the deprecated `$Call` type is removed. `$Call` will now resolve to whatever `$Call` points to in the global libdef. If you need more time to migrate, you can create a shim like `$Call<F, T> = $TupleMap<[T], F>[0]`, but please note that we intend to remove support for `$TupleMap` eventually.
* `deprecated-type-dollar-call` lint is removed, since the support for `$Call` is removed.
* `react.disable_function_components_default_props` config option is removed. It is on by default since v0.238.

Likely to cause new Flow errors:
* `$TupleMap` is deprecated and will be soon removed, now that mapped type works on array inputs. Existing `$TupleMap` will still work in this release, but every use will trigger a `deprecated-type` lint that is on by default.
* Flow now performs literal subtyping checks for strict equality conditions in non-refinement contexts. [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SQ0Tyo2AABLZ7JyYMRkJyAOT8iBCgDcAB1YMROQBeBXCzCUCWcgD0as5JkoEEonKgEAA7tLciAGiYSHBoEkMvYTCB6UA)
* Fixed destructuring with invalid literal defaults. The following now errors properly: [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SRgD2UcGgAAIYAAKYBQZzYLkAXi5AHJ5FLxfTkFyBUK5eKYMRxVyAD4SzCUGUASnlAB0oPTciAGiYSJyoEkMvYTCB6UA)
* Using string ref on components that are definitely not a class component is now an error. [example](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SRgD2UcGgAAIAGLEAAUAEoucB6QAdKASgA8fIgXJYMAAvGKQBAhHUVVyAPQAPgA3NqtVzZg1OflBlyIFteFyoBAAO5ckyUCC3fgNEwkTlQJIZewmED0oA)
* React utility types will no longer incorrectly accept hook types when they expect component types. e.g. `type A = React$ElementConfig<hook (props: {foo: string}) => void>;` will now error.

New Features:
* Refinements against negated bigint literals should now work.

Notable bug fixes:
* Mapped type on generic arrays is now supported. Previously it will fail with array is not an object error.
* `flow-remove-types` now correctly handles `as` cast with generics.

IDE:
* On hover, values that have `React.AbstractComponent` type will be shown in the [component type](https://flow.org/en/docs/react/component-types/) syntax
* Flow now offers a code action to insert inferred render type when you hover on the name of the component.
* Flow now provides keyword completion for component type, hook types and render types.

Library Definitions:
* Overly restrictive typing of queueMicrotask is now fixed.


### 0.246.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.246.0"
version: "0.247.0"
maintainer: "flow@fb.com"
authors: ["Flow Team <flow@fb.com>"]
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.246.0"
version: "0.247.0"
maintainer: "flow@fb.com"
authors: "Flow Team <flow@fb.com>"
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.246.0"}
"flow_parser" {= "0.247.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.246.0",
"version": "0.247.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.246.0",
"version": "0.247.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.246.0",
"version": "2.247.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.246.0",
"version": "0.247.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.246.0"
let version = "0.247.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.246.0"
"flow-bin": "^0.247.0"
},
"scripts": {
"flow": "flow"
Expand Down

0 comments on commit 769b035

Please sign in to comment.