Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: facebook/flow

v0.275.0

04 Jul 15:02
Compare
Choose a tag to compare
Loading

Likely to cause new Flow errors:

  • For all object literals in positions that cannot be contextually typed, we will infer a stricter type for them. It will cause new errors in code like
const foo = {baz: new Dog()};type Foo = {bar?: string, baz: Animal};declare function acceptFoo(foo: Foo): void;acceptFoo(foo); // error

To fix the error, you can either annotate the object

const foo: Foo = {baz: new Dog()};type Foo = {bar?: string, baz: Animal};declare function acceptFoo(foo: Foo): void;acceptFoo(foo);

or make the call site accepts readonly objects:

const foo = {baz: new Dog()};type Foo = $ReadOnly<{bar?: string, baz: Animal}>;declare function acceptFoo(foo: Foo): void;acceptFoo(foo);

We provide a codemod to automate the annotation process.flow codemod annotate-literal-declaration --write --max-type-size 5. (You can adjust the max type size based on your needs).

IDE:

  • Support rename on private properties and methods.

Library Definitions:

  • React$MixedElement is removed from builtin libdef. It will causeinternal-type error sincev0.258.0. You should useReact.MixedElement instead.
Assets11
Loading

v0.274.2

27 Jun 18:48
Compare
Choose a tag to compare
Loading
  • Bug fixes formatch
Loading

v0.274.1

26 Jun 01:07
Compare
Choose a tag to compare
Loading

New Features:

  • Support for experimentalmatch feature using optionexperimental.pattern_matching=true
Loading

v0.274.0

24 Jun 15:43
Compare
Choose a tag to compare
Loading

Likely to cause new Flow errors:

  • Unannotated object literals reachable from exports will now be inferred to have all mutable fields when being imported. Previously, it has unsound types, so new errors might appear.
  • When comparing two object types whose properties have variance incompatibilities, Flow will raise a single error that will summarize the properties with incompatible variances, instead of a single error for each property. (e.g.try-Flow)
  • When an object with extra properties is passed to a place that expect an exact object, we will now generate a single error with all extra properties. The error message will list the extra properties, and state that "Exact objects do not accept extra props". In rare cases, the error locations might be moved.
  • Flow will error more consistently with sketchy-bool on nullable boolean types (e.g.try-Flow)

Library Definitions:

  • All properties in the builtinPropertyDescriptor type are marked as readonly. If you need a mutable version, you can introduce something liketype MutablePropertyDescriptor<T> = {...$Exact<PropertyDescriptor<T>>, ...}
Loading

v0.273.1

11 Jun 19:22
Compare
Choose a tag to compare
Loading

Notable bug fixes:

  • Fixed windows builds.
  • Fixed crash when loading saved state.
Loading

v0.273.0

06 Jun 20:00
Compare
Choose a tag to compare
Loading

Likely to cause new Flow errors:

  • We are announcing Natural Inference for Flow, an improved way to infer types for primitive values, that resolves a long-standing correctness gap and source of confusion. See more inthis post.
  • Addednested-hook andnested-component lint errors which detect nested hook or component syntax within component or hook syntax. This is on by default.

Notable bug fixes:

  • For default imports, the autoimport ranking will now consider the names of the importing side. (e.g. Previously we completely ignored the name offoo inimport foo from './bar', but now we will count foo. If the pattern ofimport foo from './bar' happens a lot, then the autoimport algorithm will be more likely to suggestimport foo from './bar' rather thanimport bar from './bar').
  • Flow will infer a correct type when viewing the type of an object literal as a dictionary type. For example, the error inthis try-Flow will be raised.
  • Previously, we undercounted some imports during indexing, which causes autoimport ranking to behave incorrectly. The issue is now fixed.
  • Flow will no longer emitreact-rule-hook-conditional error for hooks called in a conditionally defined nested component.
Loading

v0.272.2

30 May 22:10
Compare
Choose a tag to compare
Loading

Notable bug fixes:

  • Prevent non-termination when computing code actions.
Loading

v0.272.1

24 May 15:18
Compare
Choose a tag to compare
Loading

Notable bug fixes:

  • Fixedhttps://flow.org/try. It was broken from v0.270.0 to v0.272.0.
  • Documentation in hover now preserves indentations. Therefore, code blocks in jsdoc will no longer lose indentation.
Loading

v0.272.0

22 May 00:40
Compare
Choose a tag to compare
Loading

Likely to cause new Flow errors:

  • When component syntax is enabled, hook calls happen inside an upper case function that doesn't have aprops param that's a subtype ofinterface {} will getreact-rule-hook-definitely-not-in-component-or-hook error.
  • Calling a function that's a union of hook and non-hook will now getreact-rule-hook-mixed-with-non-hook error instead ofreact-rule-hook error. Calling functions named like hook but not in hook syntax will now getreact-rule-hook-non-hook-syntax instead ofreact-rule-hook error.

Notable bug fixes:

  • Go-to-definition on default import ofmodule.exports will correctly jump to the exporting file

Parser:

  • Fix crash on''#!/usr/bin/env node\n'' when generating token list

Library Definitions:

  • React.forwardRef is marked as deprecated. We might remove it from our builtin libdef in the future.
Loading

v0.271.0

15 May 19:33
Compare
Choose a tag to compare
Loading

Notable bug fixes:

  • Multiple levels ofexport * will now be correctly indexed so that they won't be missing in autoimport results.

Library Definitions

  • AddFloat16Array type
Loading
Previous13454142
Previous

[8]ページ先頭

©2009-2025 Movatter.jp