benjamn / ast-types

Esprima-compatible implementation of the Mozilla JS Parser API
MIT License
1.13k stars 195 forks source link

Bump flow-parser from 0.195.2 to 0.200.0 #914

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flow-parser from 0.195.2 to 0.200.0.

Release notes

Sourced from flow-parser's releases.

v0.200.0

Likely to cause new Flow errors:

  • We now require all generic functions to be fully annotated to prevent generic-escape issues. Some escaped-generic errors will be removed with missing-local-annot errors on return type annotation positions.
  • Under LTI, we will no longer silently give unannotated parameters in destructuring assignment any type. Instead, they will be properly contextually typed. e.g. try Flow example.
  • Some additional errors might be revealed after a correctness fix in implicit instantiation. e.g. try Flow example
  • The exact_by_default option is now required to be set in the [options] section of the .flowconfig. Add either exact_by_default=true or exact_by_default=false to your [options] section. Previously the absence of the option was equivalent to exact_by_default=false. In the future, we will make the absence of the option equivalent to exact_by_default=true. Read more about the option here: https://flow.org/en/docs/config/options/#toc-exact-by-default-boolean. To create a valid new .flowconfig, use flow init.
  • Changes to type variable unification may cause new errors to surface or old errors to be shifted to new locations.
  • Fixed a bug where an unannotated parameter does not cause a missing-local-annot error under LTI. e.g. try Flow example
  • Flow will stop emitting some spurious errors and uncover some hidden bugs under local type inference, as a result of removing a cache that no longer makes sense.
  • The this type of exported classes' methods are no longer unsoundly typed as any. As a result, more underconstrained implicit instantiation errors might show up in LTI.
  • Relational comparisons between dates and numbers are no longer allowed.

New Features:

  • We added flow autofix missing-local-annot command that will try to add annotations to autofix all missing-local-annot errors in a given file.
  • We now provide autofixes in IDE for all missing-local-annot errors where we can locally infer a type. Previously, this kind of autofix is only provided for unannotated parameters.
  • Added an unused-promise-in-sync-scope lint which will detect unused promises in sync scopes (like unused-promise-in-async-scope does for async scopes). Enabling unused-promise will enable both of these rules. The individual rules will be removed in a future release.
  • Pragmas (e.g. // @flow strict, // @jsx custom_jsx_fun) are now supported in try-flow.

IDE:

  • Added autocomplete for jsdoc comments on functions.
  • Added autocomplete for $FlowFixMe comments.
  • Autocomplete will no longer suggest existing type names for type binding identifiers (e.g., in the name of a type alias).

Notable bug fixes:

  • We will no longer warn about missing-local-annot when there is a proper typing context in super call. e.g. super(x => x) will now pass type checking under LTI if the super constructor call expects such function.
  • Builtin types like $ReadOnly will no longer shadow your local definitions with the same name.
  • We will no longer emit spurious errors when we are doing contextual typing while trying to resolve an overload. e.g. try Flow example
  • We fixed a bug that over-zealously uses contextual type information from sibling nodes to type generic function calls. As a result, examples like the following no longer error: try Flow example
  • fixed a bug where optional chaining on a value typed as a type application would not filter out the null or undefined value. e.g. try Flow example
  • Some spurious errors might be removed as a result of Flow doing proper cache invalidation.
  • Fix sorting of auto-imports with the same similarity score and length.

Parser:

  • Parse and error on JSX type arguments.
  • Add custom parse error for abstract classes.
  • Add custom parse error when attempting to use template literal types in Flow.
  • Add custom parse errors for TS class visibility modifiers public/private/protected.
  • Remove function as an alias to Function, and don't allow function as a type name in general. (closes [issue #9000](facebook/flow#9000)).

v0.199.1

Notable bug fixes:

  • Fix crash related to deleted files in Haste

v0.199.0

Likely to cause new Flow errors:

  • Support for spread argument in the builtin special-cased $Compose function is dropped. If you need this, you can write it yourself:
declare function compose<T>(
  fns:...$ReadOnlyArray<T=>T>,
): T;
</tr></table> 

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.200.0

Likely to cause new Flow errors:

  • We now require all generic functions to be fully annotated to prevent generic-escape issues. Some escaped-generic errors will be removed with missing-local-annot errors on return type annotation positions.
  • Under LTI, we will no longer silently give unannotated parameters in destructuring assignment any type. Instead, they will be properly contextually typed. e.g. try Flow example.
  • Some additional errors might be revealed after a correctness fix in implicit instantiation. e.g. try Flow example
  • The exact_by_default option is now required to be set in the [options] section of the .flowconfig. Add either exact_by_default=true or exact_by_default=false to your [options] section. Previously the absence of the option was equivalent to exact_by_default=false. In the future, we will make the absence of the option equivalent to exact_by_default=true. Read more about the option here: https://flow.org/en/docs/config/options/#toc-exact-by-default-boolean. To create a valid new .flowconfig, use flow init.
  • Changes to type variable unification may cause new errors to surface or old errors to be shifted to new locations.
  • Fixed a bug where an unannotated parameter does not cause a missing-local-annot error under LTI. e.g. try Flow example
  • Flow will stop emitting some spurious errors and uncover some hidden bugs under local type inference, as a result of removing a cache that no longer makes sense.
  • The this type of exported classes' methods are no longer unsoundly typed as any. As a result, more underconstrained implicit instantiation errors might show up in LTI.
  • Relational comparisons between dates and numbers are no longer allowed.

New Features:

  • We added flow autofix missing-local-annot command that will try to add annotations to autofix all missing-local-annot errors in a given file.
  • We now provide autofixes in IDE for all missing-local-annot errors where we can locally infer a type. Previously, this kind of autofix is only provided for unannotated parameters.
  • Added an unused-promise-in-sync-scope lint which will detect unused promises in sync scopes (like unused-promise-in-async-scope does for async scopes). Enabling unused-promise will enable both of these rules. The individual rules will be removed in a future release.
  • Pragmas (e.g. // @flow strict, // @jsx custom_jsx_fun) are now supported in try-flow.

IDE:

  • Added autocomplete for jsdoc comments on functions.
  • Added autocomplete for $FlowFixMe comments.
  • Autocomplete will no longer suggest existing type names for type binding identifiers (e.g., in the name of a type alias).

Notable bug fixes:

  • We will no longer warn about missing-local-annot when there is a proper typing context in super call. e.g. super(x => x) will now pass type checking under LTI if the super constructor call expects such function.
  • Builtin types like $ReadOnly will no longer shadow your local definitions with the same name.
  • We will no longer emit spurious errors when we are doing contextual typing while trying to resolve an overload. e.g. try Flow example
  • We fixed a bug that over-zealously uses contextual type information from sibling nodes to type generic function calls. As a result, examples like the following no longer error: try Flow example
  • fixed a bug where optional chaining on a value typed as a type application would not filter out the null or undefined value. e.g. try Flow example
  • Some spurious errors might be removed as a result of Flow doing proper cache invalidation.
  • Fix sorting of auto-imports with the same similarity score and length.

Parser:

  • Parse and error on JSX type arguments.
  • Add custom parse error for abstract classes.
  • Add custom parse error when attempting to use template literal types in Flow.
  • Add custom parse errors for TS class visibility modifiers public/private/protected.
  • Remove function as an alias to Function, and don't allow function as a type name in general. (closes [issue #9000](facebook/flow#9000)).

0.199.1

Notable bug fixes:

  • Fix crash related to deleted files in Haste

0.199.0

Likely to cause new Flow errors:

  • Support for spread argument in the builtin special-cased $Compose function is dropped. If you need this, you can write it yourself:

... (truncated)

Commits
  • 5aa002c Fix missing exact_by_default flag in tests/tvars
  • e283761 [IDE] Remove typechecking from document highlight command
  • f4e92ea [IDE] Update documentHighlight to use cached ast
  • 1c7682d [IDE] use cacheable obj_to_obj_hook in propertyFindRefs
  • ea44819 v0.200.0
  • db51577 push post-reinit rechecks onto the recheck stream
  • df3e117 split checking changes since saved state into helper function
  • 6cd3e1b add push_after_reinit to recheck stream
  • 572bf3c make recheck stream maintain physical equality
  • aa1272c fix race in saved_state_reinit_upstream_change_git test
  • 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 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)
dependabot[bot] commented 1 year ago

Superseded by #919.