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.199.0 #911

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flow-parser from 0.195.2 to 0.199.0.

Release notes

Sourced from flow-parser's releases.

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;
  • Flow now consistently disallows implicit coercion of dates to numbers. Prefer explicit conversion with getTime().
  • When a type argument is inferred from type argument bound or default, and such inference causes error downstream, we will provide better explanations in the error message where the type is coming from. Examples in try Flow.
  • We fixed a bug under LTI that causes us to incorrectly skip checking for some function expressions Example. Some previously hidden errors might be revealed.
  • We fixed a bug that causes some empty arrays to be incorrectly inferred as Array<empty> under LTI. e.g. Array.from(nullableStringArray ?? []). As a result, previously hidden errors might be revealed.
  • Errors for bad == or === comparisons will now consistently show up. Previously, some errors might be hidden when some optimizations are hit, which heavily depends on the implementation details. Example
  • More missing-local-annot error might be shown in cases when we cannot resolve overload. Example
  • We fixed a bug where an unannotated parameter does not cause a missing-local-annot error under LTI. e.g.
declare function id<T>(T): T;
id([(item) => 1]); // now errors

New Features:

  • Improved behavior of string literal autocomplete. Results will be provided regardless of the quote style used, and extra quotes won't be inserted when one is already typed.
  • Add support for declare let and declare const. These work like declare var, but follow the rules of let and const respectively.

Notable bug fixes:

  • We will no longer emit escaped-generic errors for predicate function bodies.
  • $Compose now works under LTI mode.
  • Remove spurious illegal-this error when a this annotation is used in contextual typing.
  • Under LTI mode, we will no longer emit spurious incompatibility errors in invalid predicate function like function f({a: b}): boolean %checks { return typeof b === 'string'; }. Instead, you will only get error on this unsupported syntax.
  • Fix type created by tagged template literals and String.raw. (Closes #7580. Fixes #5705. Fixes #2616.)
  • We will emit fewer underconstrained-implicit-instantiation errors, when we decide that using type parameter default or bound won't cause downstream errors.
  • Fixed a bug in LTI where some errors in utility types were not properly shown. Example
  • Fix IDE services that stopped working while a file contained a setter with the wrong number of parameters.
  • Fix an issue with lazy mode where deleting a file before the server starts did not check files that were depending on the deleted file.

Misc:

Parser:

  • Parse bigint object keys (but type checking is not support yet).

v0.198.2

Notable bug fixes:

  • Fix a crash on Windows
  • Fix a bug that could possibly result in a crash

Parser:

  • Fix bugs concerning await in async formal parameters (including a regression in 0.198.0)

v0.198.1

... (truncated)

Changelog

Sourced from flow-parser's changelog.

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:
declare function compose<T>(
  fns:...$ReadOnlyArray<T=>T>,
): T;
  • Flow now consistently disallows implicit coercion of dates to numbers. Prefer explicit conversion with getTime().
  • When a type argument is inferred from type argument bound or default, and such inference causes error downstream, we will provide better explanations in the error message where the type is coming from. Examples in try Flow.
  • We fixed a bug under LTI that causes us to incorrectly skip checking for some function expressions Example. Some previously hidden errors might be revealed.
  • We fixed a bug that causes some empty arrays to be incorrectly inferred as Array<empty> under LTI. e.g. Array.from(nullableStringArray ?? []). As a result, previously hidden errors might be revealed.
  • Errors for bad == or === comparisons will now consistently show up. Previously, some errors might be hidden when some optimizations are hit, which heavily depends on the implementation details. Example
  • More missing-local-annot error might be shown in cases when we cannot resolve overload. Example
  • We fixed a bug where an unannotated parameter does not cause a missing-local-annot error under LTI. e.g.
declare function id<T>(T): T;
id([(item) => 1]); // now errors

New Features:

  • Improved behavior of string literal autocomplete. Results will be provided regardless of the quote style used, and extra quotes won't be inserted when one is already typed.
  • Add support for declare let and declare const. These work like declare var, but follow the rules of let and const respectively.

Notable bug fixes:

  • We will no longer emit escaped-generic errors for predicate function bodies.
  • $Compose now works under LTI mode.
  • Remove spurious illegal-this error when a this annotation is used in contextual typing.
  • Under LTI mode, we will no longer emit spurious incompatibility errors in invalid predicate function like function f({a: b}): boolean %checks { return typeof b === 'string'; }. Instead, you will only get error on this unsupported syntax.
  • Fix type created by tagged template literals and String.raw. (Closes #7580. Fixes #5705. Fixes #2616.)
  • We will emit fewer underconstrained-implicit-instantiation errors, when we decide that using type parameter default or bound won't cause downstream errors.
  • Fixed a bug in LTI where some errors in utility types were not properly shown. Example
  • Fix IDE services that stopped working while a file contained a setter with the wrong number of parameters.
  • Fix an issue with lazy mode where deleting a file before the server starts did not check files that were depending on the deleted file.

Misc:

Parser:

  • Parse bigint object keys (but type checking is not support yet).

0.198.2

Notable bug fixes:

  • Fix a crash on Windows
  • Fix a bug that could possibly result in a crash

Parser:

... (truncated)

Commits
  • dd5e77b fix missing errors when a file is deleted before init in lazy mode
  • 7bddfc5 v0.199.0
  • 5ca8f4a fix loc of undefined label error
  • b0f14ac [parser] fix optional chaining parsing
  • 0da5b42 [parser] add test for incorrect undefined label error
  • 7b261a6 add tests for optional chaining on super
  • b7c9d82 fix exceptions on invalid setters
  • 8866262 improve errors for unexpected LSP responses
  • 4375980 [lti] Ensure we always fail when we fail to resolve overload during hint eval
  • 9826cc3 include evaluated cache in cache snapshot
  • 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 #913.