Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 16, 2025

Bumps flow-parser from 0.259.1 to 0.271.0.

Release notes

Sourced from flow-parser's releases.

v0.271.0

Notable bug fixes:

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

Library Definitions

  • Add Float16Array type

v0.270.0

Likely to cause new Flow errors:

  • When component syntax support is enabled, upper case functions with component-like name but doesn't return React.Node will no longer be treated like components. Thus, all the hooks call in such functions will have react-rule-hook-definitely-not-in-component-or-hook errors.
  • Usage of Object.assign will now trigger unsafe-object-assign lint error that's on by default. The type checking behavior for Object.assign will otherwise stay the same for now.
  • When Flow decides that the hook call definitely doesn't happen within component or hook body, it will emit errors with code react-rule-hook-definitely-not-in-component-or-hook.

Parser:

  • Parse the TS nonnull assertion operator.

v0.269.1

It should have the same behavior as 0.269.0.

v0.268.0

Breaking:

  • The Linux x86 build is now built from ubuntu-22.04. It might make Flow not runnable on older linux distributions.

Likely to cause new Flow errors:

  • Code like the (example) will have [react-rule-hook-conditional] instead of [react-rule-hook-naming-convention] errors.
  • $Diff support is removed. If you have trouble migrating, you can try to polyfill it by this. However, $Diff has surprising behavior with regard to optional props in the second type parameter, which cannot be easily polyfilled (example).

New Features:

  • We now allow you to configure certain error code to be unsuppressable. For example, to make react-rule-hook-naming-convention and react-rule-hook-conditional errors unsuppressable, you can add the following to the [options] section in flowconfig:
unsuppressable_error_codes=react-rule-hook-naming-convention
unsuppressable_error_codes=react-rule-hook-conditional

v0.267.0

Likely to cause new Flow errors:

  • We have updated the way type parameters are instantiated in generic calls, specifically when using upper bounds:

    • We will no longer infer synthetic intersection types.
    • If multiple upper bounds are available, we pick the smallest type based on subtyping (example).
  • Support for $Rest is removed. Omit should be used instead. If you still have many instances of $Rest, you can replace them with $Diff as a temporary measure, but note that we intend to eventually remove $Diff as well.

  • React-rule hook errors related to conditional hook calls will now have react-rule-hook-conditional error code.

  • React-rule hook errors related to naming convention issues will now have react-rule-hook-naming-convention error code.

Notable bug fixes:

  • We are rolling out the initial phase of a fix to a fundamental soundness issue related to primitive literal type inference. This unsoundness has allowed invalid code like: const x = 'a'; 'b' as typeof x as 'a'; (try-Flow) to type check without errors. With this fix, Flow will infer singleton literal types for primitive literals in contexts where such precision is required. Examples of this are: const-declarations (e.g. in const x = 42 will infer the type 42 for x), annotation positions (e.g. typeof x is equivalent to the type 42), conditionals (e.g. in if (x.tag === 42) {} Flow will infer the type 42 for the value 42, instead of number). In this part of the rollout, whenever this precision is not required Flow will infer the unsound type it used to infer before (a hybrid between the singleton and general type). Eliminating this unsound type completely will be done soon.
  • flow-remove-types now handles the removal of empty imports after removing type/typeof imports (thanks @​jbroma)

v0.266.1

  • Fix a bug that causes fixed libdef-override error to stick around after an incremental recheck.

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.271.0

Notable bug fixes:

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

Library Definitions

  • Add Float16Array type

0.270.0

Likely to cause new Flow errors:

  • When component syntax support is enabled, upper case functions with component-like name but doesn't return React.Node will no longer be treated like components. Thus, all the hooks call in such functions will have react-rule-hook-definitely-not-in-component-or-hook errors.
  • Usage of Object.assign will now trigger unsafe-object-assign lint error that's on by default. The type checking behavior for Object.assign will otherwise stay the same for now.
  • When Flow decides that the hook call definitely doesn't happen within component or hook body, it will emit errors with code react-rule-hook-definitely-not-in-component-or-hook.

Parser:

  • Parse the TS nonnull assertion operator.

0.269.1

It should have the same behavior as 0.269.0.

0.269.0

Likely to cause new Flow errors:

  • Using $Omit will trigger an internal-type error.
  • There might be some error code differences around destructuring
  • Object.assign now has stricter behavior over maybe type and optional type inputs. example

New Features:

  • You can now use this is T as type-guard annotation on a method m, to refine x when calling if (x.m()) {}. This-type guards can only be used on declare classes and interfaces. (E.g. try-Flow)
  • Added support for const type parameters that allow you to specify that an argument to a function is always treated as a const-expression, by annotating the type parameter with the const modifier. This eliminates the need to use the as const syntax when calling functions with this annotation. See more in our docs.

Notable bug fixes:

  • Auto-import for modules from module.system.node.root_relative_dirname will have correct import path instead of relative import path.
  • Auto-import for modules from @flowtyped will have correct import path instead of relative import path.
  • Generic render types are now allowed everywhere.
  • Fixed potential issue that makes hover on Omit<...> to fail.

Parser:

  • Parse class static blocks. The feature is not yet supported for type-checking.

0.268.0

Breaking:

  • The Linux x86 build is now built from ubuntu-22.04. It might make Flow not runnable on older linux distributions.

Likely to cause new Flow errors:

  • Code like the (example) will have [react-rule-hook-conditional] instead of [react-rule-hook-naming-convention] errors.
  • $Diff support is removed. If you have trouble migrating, you can try to polyfill it by this. However, $Diff has surprising behavior with regard to optional props in the second type parameter, which cannot be easily polyfilled (example).

... (truncated)

Commits
  • 9a5abb9 v0.271.0
  • c658630 [flow] fix const-type-parameters for construction calls
  • 23538d5 [flow][multiplatform] Handle the .js.flow in common code case 2/2: interface ...
  • 0f8f6d1 [flow][multiplatform] Handle the .js.flow in common code case 1/2: everything...
  • 6b84ddf [flow][refactor] Factor out loc_of_file and add_duplicate_provider_error
  • d525241 [flow][refactor] Check Files.haste_name_opt before branching on whether the...
  • 062278e [flow|core] Add Float16Array type (#9280)
  • e88b877 [flow][docs] fix typo in const-expression docs
  • 81e5272 [flow] Properly support indexing of multiple levels of reexports of star exports
  • 550a46f [flow][tests] Add tests for autoimports for two-level deep export *
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [flow-parser](https://github.com/facebook/flow) from 0.259.1 to 0.271.0.
- [Release notes](https://github.com/facebook/flow/releases)
- [Changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
- [Commits](facebook/flow@v0.259.1...v0.271.0)

---
updated-dependencies:
- dependency-name: flow-parser
  dependency-version: 0.271.0
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github May 16, 2025

Labels

The following labels could not be found: Security. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant