diff --git a/Changelog.md b/Changelog.md index 5c5eeda87b3..116d5ba8c03 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,30 @@ +### 0.262.0 + +Likely to cause new Flow errors: +* Referencing `React$Component` directly will now be an error. +* Use of `React$ComponentType`, `React$Context` and `React$RefSetter` will now trigger `internal-type` errors. + +New Features: +* Added types for JSX intrinsics, which will cause new errors and show autocomplete for DOM intrinsics like `div` + +Notable bug fixes: +* Replace incorrect definition for `ClientRect` and `ClientRectList` with aliases to `DOMRect` and `DOMRectList` +This fixes the type definitions for the DOM APIs in Flow, but replacing an nonexistent globals `ClientRect` and `ClientRectList` types with just an alias to `DOMRect` and `DOMRectList`. +* fixed a bug that caused spurious errors on rest array assignments (e.g. [try-Flow](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkO4AX34kA0SQ0Tyo2AABIDOVRKMhOQBtYQiG4AH3spigCAAugBuAA6UEFVlVfJlnIAvEKAIzyzkAegNnIA7nBjpyoBAJJycLyoJyTJQIJR7bROSIXdglbkQA0TCQ4NAkg0AAxWABMADYdZGQPSgA)). +* When a library definition file has changed, Flow will no longer just stop the server. Instead, Flow will properly recheck everything, even under lazy mode. +* We now allow something of type `React.ComponentType<{}>` to be a subtype of `component()` + +IDE: +* Component syntax components will now show up in document symbols + +Library Definitions: +* Most of the bundled libdefs will no longer be maintained and shipped with Flow. Going forward, they should be downloaded from flow-typed. To maintain the same behavior as before, you should have a `flow-typed.config.json` in the root of your project with the following content: +``` +{ + "env": ["node", "dom", "bom", "intl", "cssom", "indexeddb", "serviceworkers", "webassembly"] +} +``` + ### 0.261.2 Notable bug fixes: diff --git a/flow_parser.opam b/flow_parser.opam index 574ba5c7e3f..9bb9ab1f935 100644 --- a/flow_parser.opam +++ b/flow_parser.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "flow_parser" -version: "0.261.2" +version: "0.262.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 4ca650d78ab..577b65bac32 100644 --- a/flowtype.opam +++ b/flowtype.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "flowtype" -version: "0.261.2" +version: "0.262.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.261.2"} + "flow_parser" {= "0.262.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 88f3138cc96..deb9261d0c8 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.261.2", + "version": "0.262.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 280c14b76be..6f649882a7d 100644 --- a/packages/flow-parser/package.json +++ b/packages/flow-parser/package.json @@ -1,6 +1,6 @@ { "name": "flow-parser", - "version": "0.261.2", + "version": "0.262.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 13bfef3f710..61a5d9af4f0 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.261.2", + "version": "2.262.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 49f723df452..2faf73f2926 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.261.2", + "version": "0.262.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 46661d96b53..5f500b2725f 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.261.2" +let version = "0.262.0" diff --git a/website/docs/install.md b/website/docs/install.md index b252a361903..00444e5fe4c 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.261.2" + "flow-bin": "^0.262.0" }, "scripts": { "flow": "flow"