benjamn / ast-types

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

Bump flow-parser from 0.166.0 to 0.189.0 #855

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flow-parser from 0.166.0 to 0.189.0.

Release notes

Sourced from flow-parser's releases.

v0.189.0

Likely to cause new Flow errors:

New Features:

  • Class members can be suggested by autocomplete even if this is not typed explicitly.

Notable bug fixes:

  • We will now consistently emit object-this-reference errors. Previously these errors were missing when the object is an argument of Object.freeze(), Object.defineProperties() or Object.create().
  • Fix crash when walking directories that can't be accessed.
  • Fixed a potential crash when two type identifiers are declared in the same block.

Library Definitions:

  • Improve fs.readFile type definition when the encoding config option is supplied.

v0.188.2

Bug fixes:

  • Fix crash during incremental recheck

Performance:

  • Improve performance of auto-imports index update for large codebases

v0.188.1

Bug fixes:

  • Fix a crash when querying hg

Misc:

  • We renamed the codemod command flow codemod annotate-lti to flow codemod annotate-functions-and-classes to clarify that this is not the only codemod necessary for enabling LTI eventually.

v0.188.0

Likely to cause new Flow errors:

  • Previously we supported a weird JS runtime rule for constructor returns when you call new SomeClass:

    • If the returned value is primitive, then it's ignored and the instance will be returned instead.
    • If the returned value is object like, then the return object will be the eval result of new SomeClass.

    This is confusing, and we dropped support for this feature in this release. Now we enforce that all class constructors must return void.

  • Fixed a bug preventing refinements from being invalidated in inline && expressions: examples like typeof x === 'number' && reassignXToString() && (x: number) were passing even if reassignXToString() assigned a a string value to x.

New Features:

  • flow codemod annotate-lti is now provided to help prepare your codebase to enable the enforce_local_inference_annotations=true flag. In order to eventually enable local type inference, we will require additional annotations in places we can't contextually type your code. You can enable the annotation enforcement now with enforce_local_inference_annotations=true in flowconfig. This flag enables the behaviors of all the following experimental flags, which will be deleted in the next release:
experimental.enforce_local_inference_annotations=true
experimental.enforce_this_annotations=true
experimental.enforce_class_annotations=true

To migrate your codebase, you can run the following codemod to prepare your codebase for the new requirement: flow codemod annotate-lti. Check out an upcoming blog post for more details.

Misc:

  • Remove the file_watcher.watchman.survive_restarts flowconfig option, which was deprecated in 0.158.0. We will always try to survive Watchman restarts.
  • Remove the experimental.refactor flowconfig option. It has been true by default since v0.158.0.

... (truncated)

Changelog

Sourced from flow-parser's changelog.

0.189.0

Likely to cause new Flow errors:

New Features:

  • Class members can be suggested by autocomplete even if this is not typed explicitly.

Notable bug fixes:

  • We will now consistently emit object-this-reference errors. Previously these errors were missing when the object is an argument of Object.freeze(), Object.defineProperties() or Object.create().
  • Fix crash when walking directories that can't be accessed.
  • Fixed a potential crash when two type identifiers are declared in the same block.

Library Definitions:

  • Improve fs.readFile type definition when the encoding config option is supplied.

0.188.2

Bug fixes:

  • Fix crash during incremental recheck

Performance:

  • Improve performance of auto-imports index update for large codebases

0.188.1

Bug fixes:

  • Fix a crash when querying hg

Misc:

  • We renamed the codemod command flow codemod annotate-lti to flow codemod annotate-functions-and-classes to clarify that this is not the only codemod necessary for enabling LTI eventually.

0.188.0

Likely to cause new Flow errors:

  • Previously we supported a weird JS runtime rule for constructor returns when you call new SomeClass:
  • If the returned value is primitive, then it's ignored and the instance will be returned instead.
  • If the returned value is object like, then the return object will be the eval result of new SomeClass. This is confusing, and we dropped support for this feature in this release. Now we enforce that all class constructors must return void.
  • Fixed a bug preventing refinements from being invalidated in inline && expressions: examples like typeof x === 'number' && reassignXToString() && (x: number) were passing even if reassignXToString() assigned a a string value to x.

New Features:

  • flow codemod annotate-lti is now provided to help prepare your codebase to enable the enforce_local_inference_annotations=true flag. In order to eventually enable local type inference, we will require additional annotations in places we can't contextually type your code. You can enable the annotation enforcement now with enforce_local_inference_annotations=true in flowconfig. This flag enables the behaviors of all the following experimental flags, which will be deleted in the next release:
experimental.enforce_local_inference_annotations=true
experimental.enforce_this_annotations=true
experimental.enforce_class_annotations=true

To migrate your codebase, you can run the following codemod to prepare your codebase for the new requirement: flow codemod annotate-lti. Check out an upcoming blog post for more details.

... (truncated)

Commits
  • 434f463 v0.189.0
  • 12cfe0d Create tarjan nodes on demand
  • 8017d21 [reordered-env] Non-assigning type writes should never be added as dependents
  • 60ab3a3 v0.188.2
  • 7b05879 Speed up reindexing
  • eaca887 Fix incremental crash when removing old dependents
  • f6431a7 Do not trigger contextual typing when array_literal_providers flag is on bu...
  • 1e122a1 Add class members to autocomplete results
  • a1f41d4 [lti] Use implicit instantiation pin type machinery to pin the element type f...
  • a744d32 [libdef] Improve fs.readFile type definition for better overload resolution
  • 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 #856.