Skip to content

12.0.0-alpha.14

Pre-release
Pre-release
Compare
Choose a tag to compare
@cknitt cknitt released this 17 Jun 13:06
· 14 commits to master since this release
1ca0ca3

💥 Breaking Change

  • Iterator.forEach now emits Iterator.prototype.forEach call. #7506
  • Rename functions ending with Exn to end with OrThrow. The old Exn functions are now deprecated:
    • Bool.fromStringExnBool.fromStringOrThrow
    • BigInt.fromStringExnBigInt.fromStringOrThrow
    • JSON.parseExnJSON.parseOrThrow
    • Changed BigInt.fromFloat to return an option rather than throwing an error.
    • Added BigInt.fromFloatOrThrow
    • Option.getExnOption.getOrThrow
    • Null.getExnNull.getOrThrow
    • Nullable.getExnNullable.getOrThrow
    • Result.getExnResult.getOrThrow
    • List.getExnList.getOrThrow
    • List.tailExnList.tailOrThrow
    • List.headExnList.headOrThrow
    • Old functions remain available but are marked as deprecated with guidance to use the new OrThrow variants.
    • #7518, #7554

🚀 New Feature

  • Add RegExp.flags. #7461
  • Add Array.findLast, Array.findLastWithIndex, Array.findLastIndex, Array.findLastIndexWithIndex and Array.findLastIndexOpt. #7503
  • Add options argument to Console.dir. #7504
  • Show variant constructor's inline record types on hover. #7519
  • Add additional Iterator.prototype bindings to runtime/Stdlib_Iterator.res. #7506

🐛 Bug fix

  • rescript-tools doc no longer includes shadowed bindings in its output. #7497
  • Treat throw like raise in analysis. #7521
  • Fix index out of bounds exception thrown in rare cases by rescript-editor-analysis.exe codeAction command. #7523
  • Don't produce duplicate type definitions for recursive types on hover. #7524
  • Prop punning when types don't match results in I/O error: _none_: No such file or directory. #7533
  • Fix partial application with user-defined function types. #7548
  • Fix doc comment before variant throwing syntax error. #7535
  • Fix apparent non-determinism in generated code for pattern matching. #7557

💅 Polish

  • Suggest awaiting promise before using it when types mismatch. #7498
  • Complete from RegExp stdlib module for regexes. #7425
  • Allow oneliner formatting when including module with single type alias. #7502
  • Improve error messages for JSX type mismatches, passing objects where record is expected, passing array literal where tuple is expected, and more. #7500
  • Show in error messages when coercion can be used to fix a type mismatch. #7505
  • Remove deprecated pipe last (|>) syntax. #7512
  • Improve error message for pipe (->) syntax. #7520
  • Improve a few error messages around various subtyping issues. #7404
  • In module declarations, accept the invalid syntax M = {...} and format it to M : {...}. #7527
  • Improve doc comment formatting to match the style of multiline comments. #7529
  • Improve error messages around type mismatches for try/catch, if, for, while, and optional record fields + optional function arguments. #7522
  • Sync reanalyze with the new APIs around exception. #7536
  • Improve array pattern spread error message. #7549
  • Sync API docs with rescript-lang.org on release. #7555

🏠 Internal

  • Refactor the ast for record expressions and patterns. #7528
  • Editor: add completions from included modules. #7515
  • Add -editor-mode arg to bsc for doing special optimizations only relevant to the editor tooling. #7541