Skip to content

Commit

Permalink
v0.114.0
Browse files Browse the repository at this point in the history
Reviewed By: dsainati1

Differential Revision: D18997841

fbshipit-source-id: 0dd75570b90446b274b641c1f4e8e61cd73d8077
  • Loading branch information
mroch authored and facebook-github-bot committed Dec 13, 2019
1 parent 457c788 commit f3db6fd
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 9 deletions.
18 changes: 18 additions & 0 deletions Changelog.md
@@ -1,3 +1,21 @@
### 0.114.0

Likely to cause new Flow errors:
* Fixed the order of evaluation of JSX attributes and children to match runtime, so that refinements work properly. This can lead to new errors if refined values are used as children, and a function is called within an attribute, because the refinements are now invalidated in a different order. On the other hand, calling a function in a child no longer incorrectly invalidates values used as attributes. [[example](https://flow.org/try/#0JYWwDg9gTgLgBAJQKYEMDG8BmUIjgIilQ3wG4AoczAVwDsNgJa4AxACgG8APAGjgE8AvgC443UbWogARkih9+EqbKiCAlEoA2msXCIxqUZpO1xBlAG4oocLqID8kmXLgBeOABYATBSs3FcI7KLu7eFMCYcGxccACE7iY6AGRJAnEJ1NpqYuRwcAA8LLau3HAA9ABUcADOABYQmQAmcLJwEADWcBVlggIl-G5wiXzeggB8uXliMRna5lNibAFOKtmVNfVNQxDwrR1dPZP5ZSwTgkA)]
* Added support for refinements on [optional chains](https://github.com/tc39/proposal-optional-chaining)! Now, examples like `if (x?.y)` and `if (x?.y === 42)` understand that `x` is truthy in the consequent. Flow also now refines subexpressions of optional chains. For example, given `obj?.fun(obj.value)`, the second `obj` is known to be truthy since it is only reachable if the earlier `obj?.fun` is also truthy; therefore, you don't need to optional-chain it again (`obj?.value`).

New Features:
* Added typechecking support for `symbol`! Note that just like `number` is not a `Number`, and vice versa, `symbol` is not a `Symbol`. In the core lib defs, we change usage of `Symbol` to `symbol & Symbol`. Eventually, it will just be `symbol`. The `symbol & Symbol` is temporary for one version to allow for existing usage of the `: Symbol` to be codemodded to `: symbol`.

Bug fixes:
* Optimized typechecking pointwise-equal unions, from O(n^2) to O(n)
* Optimized reverse dependency computation, greatly reducing the time spent computing what needs to be rechecked after an edit
* Fixed an error message that pointed at the definition of a write-only property instead of the callsite that tried to read it [[example](https://flow.org/try/#0CYUwxgNghgTiAEA3W8AqARASgLngbwFowBXGOAOwBdc8B7AM3oGcRKB1AS2EoAtdziAWwBGIGAF9xAbgBQHevAAUGTADoSZEFQCU+eOJlA)]
* Fixed an issue where coverage results could be incorrect in [Types First](https://medium.com/flow-type/what-the-flow-team-has-been-up-to-54239c62004f) mode when a file is rechecked
* Fixed an issue when Flow prints evaluated types like `$ElementType`, that led to printing `empty` instead. This improves hover tooltips.
* Fixed several issues causing various processes to die uncleanly while exiting.


### 0.113.0
Bug fixes:
* Fixed autocomplete when at the end of file
Expand Down
2 changes: 1 addition & 1 deletion opam
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "flowtype"
version: "0.113.0"
version: "0.114.0"
maintainer: "flow@fb.com"
authors: "Flow Team <flow@fb.com>"
license: "MIT"
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-parser-bin/package.json
@@ -1,6 +1,6 @@
{
"name": "flow-parser-bin",
"version": "0.113.0",
"version": "0.114.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
@@ -1,6 +1,6 @@
{
"name": "flow-parser",
"version": "0.113.0",
"version": "0.114.0",
"description": "JavaScript parser written in OCaml. Produces ESTree AST",
"homepage": "https://flow.org",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/flow-remove-types/package.json
@@ -1,6 +1,6 @@
{
"name": "flow-remove-types",
"version": "2.113.0",
"version": "2.114.0",
"description": "Removes Flow type annotations from JavaScript files with speed and simplicity.",
"author": {
"name": "Flow Team",
Expand Down Expand Up @@ -43,7 +43,7 @@
"es6"
],
"dependencies": {
"flow-parser": "^0.113.0",
"flow-parser": "^0.114.0",
"pirates": "^3.0.2",
"vlq": "^0.2.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/common/flow_version.ml
Expand Up @@ -5,4 +5,4 @@
* LICENSE file in the root directory of this source tree.
*)

let version = "0.113.0"
let version = "0.114.0"
2 changes: 1 addition & 1 deletion src/parser/META
@@ -1,5 +1,5 @@
name="parser_flow"
version="0.113.0"
version="0.114.0"
requires = "sedlex wtf8"
description="flow parser ocamlfind package"
archive(byte)="parser_flow.cma"
Expand Down
2 changes: 1 addition & 1 deletion src/parser/opam
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "flow_parser"
version: "0.113.0"
version: "0.114.0"
maintainer: "flow@fb.com"
authors: ["Flow Team <flow@fb.com>"]
homepage: "https://github.com/facebook/flow/tree/master/src/parser"
Expand Down
2 changes: 1 addition & 1 deletion website/en/docs/_install/setup-npm.md
Expand Up @@ -11,7 +11,7 @@ npm install --save-dev flow-bin
"name": "my-flow-project",
"version": "1.0.0",
"devDependencies": {
"flow-bin": "^0.113.0"
"flow-bin": "^0.114.0"
},
"scripts": {
"flow": "flow"
Expand Down

0 comments on commit f3db6fd

Please sign in to comment.