From 2162be8c51bfe4db8490ceb425066c71f1c92281 Mon Sep 17 00:00:00 2001 From: Pieter Vanderwerff Date: Wed, 13 Mar 2024 14:45:08 -0700 Subject: [PATCH] v0.231.0 Reviewed By: alexmckenley, panagosg7 Differential Revision: D54873586 fbshipit-source-id: fbd8b4eb6e772ce21cc0d18c261c1fe1dd1ad994 --- Changelog.md | 21 +++++++++++++++++++++ flow_parser.opam | 2 +- flowtype.opam | 4 ++-- packages/flow-parser-bin/package.json | 2 +- packages/flow-parser/package.json | 2 +- packages/flow-remove-types/package.json | 2 +- packages/try-flow-website-js/package.json | 2 +- src/common/flow_version.ml | 2 +- website/docs/install.md | 2 +- 9 files changed, 30 insertions(+), 9 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3a2ba04a87c..1093f8da7b3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,24 @@ +### 0.231.0 + +Likely to cause new Flow errors: +* Fixed subtyping of inline interfaces, e.g. [try-flow](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+IFkolXpUCWewUEAwhCQgRDH8wEH4hMnwROHlsNnw4KHwwSLAAC3wANyo4LFxscWQuHgMNZmwsiRSAWglaY1cq-hIAa2wJXNpG4Vxcdvdu3v7B0RxKUYMhKDBSqmbWwIq3eagoOrKSKgH0wtMMPznY7d2SfcoBiEZ-aG5G3Ix085AF-ZhsRoRehqUEiNMgSQHlSruBZxJrMcJwMhzAC+-EgGiCLWMAAIACpYgC8WPSgK4YGwWOAMGIyCxwhEMyRAG4ADpQDRLKjk2z2LHyGk4llQeRYjAkIl+Eyk8nATCUGloYjLKBMrEAelVWIAyjkINo2FiTJQILN+PkTCQ4NAgvkAAxWABMAGY7TaQEigA). + +New Features: +* No longer trigger `method-unbinding` errors with indexed access types. +* Add `relay_integration.esmodules` option. When this option, along with `relay_integration`, is enabled, Flow will treat `graphql` fragments/queries/etc. as `import default` rather than `require`. Use this when you ouput ESM from Relay's codegen (e.g. `eagerEsModules`). + +Notable bug fixes: +* Don't error when returning an array, map, etc when an `AsyncGenerator` type is expected (e.g. [try-Flow](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+IFkolXpUCWewUEAwhCQgRDH8wEH4hMnwROHlsNnw4KHwwSLAAC3wANyo4LFxscWQuHgMNZmwsiRSAWglaY1cq-hIAa2wJXNpG4Vxcdvdu3v7B0RxKUYMhKDBSqmbWwIq3eagoOrKSKgH0wtMMPznY7d2SfcoBiEZ-aG5G3Ix085AF-ZhsRoRehqUEiNMgSQHlSruBZxJrMcJwMhzAC+-EgGiCAB0JBioBgSLRFgACGALZRwaCEgBU-ygAEYABQASmQhIAgvjFgBxQQmSIQSgAHmEIhmvEJ+QgcDYYolUoAfITgDjCSrCbQ4Hg2JTCQBtWligBMYoAzABdADchIA9FbCQB3aAAcgkhJMlH5hNOtBE-OwOKROJxeIJYGJpMeUCpNINTJZ7JD3J2NDCguFovFkulGfliuVqvVmu1GDtbxdAAV3YkyFZuLh6XrDSbTYzLTb7U6XW6PV6fSx-YHcRzQyTFhGo4JjbG2UPE7yUwKdfZTFAEGK0yZTTLM1uc0rI-mNbgtYSdnbCQBZDCMAVL9Krk-TExypmt20OqDO13UbtQb2+-tQDEID5CYJDkoByDAQADFYBoGgAnLBIBIkAA)) + +IDE: +* Fixed a bug where `AUTO332` appeared in the result of string literal type completion. + +Library Definitions: +* Added definitions for `FileSystem` APIs (thanks @ZelJin). +* Added constructor to the `StorageManager` class (thanks @ZelJin). +* Removed `checkPropTypes`, `DOM`, `createClass`, `ConcurrentMode` from `react` module. +* Types in react module can now also be used when React is default imported like `import React from 'react'`, they can also be used without imports, e.g. `type N = React.Node`. + ### 0.230.0 Likely to cause new Flow errors: diff --git a/flow_parser.opam b/flow_parser.opam index 445047efb35..2446cfabb40 100644 --- a/flow_parser.opam +++ b/flow_parser.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "flow_parser" -version: "0.230.0" +version: "0.231.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 099a34dc02e..dcec457b28c 100644 --- a/flowtype.opam +++ b/flowtype.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "flowtype" -version: "0.230.0" +version: "0.231.0" maintainer: "flow@fb.com" authors: "Flow Team " license: "MIT" @@ -15,7 +15,7 @@ depends: [ "core_kernel" {>= "v0.14.1" & <= "v0.16.0"} "dtoa" {>= "0.3.2"} "fileutils" {>= "0.6.3"} - "flow_parser" {= "0.230.0"} + "flow_parser" {= "0.231.0"} "inotify" {os = "linux" & >= "2.4.1"} "ounit2" {with-test} "lwt" {>= "5.4.0"} diff --git a/packages/flow-parser-bin/package.json b/packages/flow-parser-bin/package.json index 6ab25841d75..8a7d5661c71 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.230.0", + "version": "0.231.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 69ce5aed459..3f4ea3453ac 100644 --- a/packages/flow-parser/package.json +++ b/packages/flow-parser/package.json @@ -1,6 +1,6 @@ { "name": "flow-parser", - "version": "0.230.0", + "version": "0.231.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 dbe387f4d76..991c47eeecb 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.230.0", + "version": "2.231.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 af10f587fc8..740b1647a45 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.230.0", + "version": "0.231.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 d030fadbd5f..b3f9e77deb0 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.230.0" +let version = "0.231.0" diff --git a/website/docs/install.md b/website/docs/install.md index 2552cf33fdb..d6dc4786a8b 100644 --- a/website/docs/install.md +++ b/website/docs/install.md @@ -124,7 +124,7 @@ npm install --save-dev flow-bin "name": "my-flow-project", "version": "1.0.0", "devDependencies": { - "flow-bin": "^0.230.0" + "flow-bin": "^0.231.0" }, "scripts": { "flow": "flow"