Skip to content

Releases: rescript-association/rescript-core

1.5.0

14 Jun 07:15
@zth zth
Compare
Choose a tag to compare
  • BREAKING: Fixes the type of RegExp.Result.t to be array<option<string>> instead of array<string>. #234.
  • Fix type of Nullable.t which was not untagged in the implementation. #235

1.4.0

05 Jun 18:13
@zth zth
Compare
Choose a tag to compare

1.3.0

19 Apr 17:11
@zth zth
Compare
Choose a tag to compare

This version requires ReScript >=11.1.0-rc.6.

  • BREAKING: Use new native bigint type. This requires ReScript compiler version "11.1.0-rc.6" or higher. #207
  • Int, Float, BigInt: use optional args and deprecate xxxWithRadix, xxxWithPrecision etc. #209
  • BREAKING: Add optional ~message: string=? to Option.getExn. This also changes the error raised by Option.getExn from Not_found to a regular JS error. #212

1.2.0

03 Apr 19:43
@zth zth
Compare
Choose a tag to compare
  • Add optional arguments to JSON.stringify and JSON.parseExn and deprecate JSON.stringifyWithIndent, JSON.stringifyWithReplacer, JSON.parseExnWithReviver etc. #201
  • Add Array.join and deprecate Array.joinWith. #205
  • BREAKING: Intl types: simplify bindings for constructors / functions with optional arguments. #198
  • Fix: Expose Intl.Common. #197
  • Add Array.flatMapWithIndex #199
  • Add Promise.any, Promise.allSettled, Promise.withResolvers #204

1.1.0

23 Feb 09:25
@zth zth
Compare
Choose a tag to compare
  • BREAKING: Align List api with other modules (List.getBy -> List.find etc.). #195
  • BREAKING: Adds typed bindings to Intl, replacing the options type of {..} with records. #65
  • Add Dict.forEach, Dict.forEachWithKey and Dict.mapValues #181
  • Remove internal xxxU helper functions that are not needed anymore in uncurried mode. #191
  • Rename Object.empty to Object.make for consistency.
  • Add dynamic import. #178
  • Add Iterator.forEach and AsyncIterator.forEach helpers for iterators. #175

1.0.0

14 Feb 19:15
@zth zth
Compare
Choose a tag to compare
  • Up ReScript dependency to 11+.
  • JSON, Null and Nullable untagged variants are now properly exposed.
  • BREAKING: Duplicated definition of result in Result module removed, as result is now a built in. Switch out any Result.t type annotations to point to the built in result instead.

0.7.0

07 Feb 08:55
@zth zth
Compare
Choose a tag to compare
  • Add Dict.getUnsafe #167
  • Fixes mis-bound Intl functions #180
    • Intl.DateTimeFormat.formatRangeToParts was bound to formatRange instead of formatRangeToParts
    • Intl.PluralRules.select, Intl.PluralRules.selectInt, and Intl.PluralRules.selectBigInt were bound to format instead of select

Documentation

  • Fix docstring for Array.getUnsafe and Array.filterMap #168

0.6.0

17 Nov 10:25
@zth zth
Compare
Choose a tag to compare

API changes

  • Add Math.Int.floor and Math.Int.random, #156
  • Change Array.joinWiths signature to accept only string arrays and add Array.joinWithUnsafe with the polymorphic signature of the former #157

Documentation

  • Docstrings for Math.Int.floor and Math.Int.random. #156

0.5.0

09 Oct 11:30
@zth zth
Compare
Choose a tag to compare

API changes

  • Add Result.mapError #98

Documentation

  • Docstrings for Object. Not yet complete. #117

0.4.0

07 Jul 11:07
@zth zth
Compare
Choose a tag to compare

API changes

  • Map, Set, WeakMap, WeakSet: use the types defined in the Js namespace. #143
  • Symbol: use the types defined in the Js namespace. #145
  • The types RescriptCore.Type.function and RescriptCore.Type.object use the types defined in the Js namespace. #146
  • The type RescriptCore.Type.symbol removed in favor of RescriptCore.Symbol.t. #146
  • Added BigInt support for RescriptCore.Classify.t. #146
  • Array mutable & immutable helper name changed to conform to JS' upcoming APIs such as toSorted
    • sort -> toSorted, sortInPlace -> sort
    • reverse -> toReversed, reverseInPlace -> reverse
    • splice -> toSpliced, spliceInPlace -> splice
    • shuffle -> toShuffled, shuffleInPlace -> shuffle
    • fillAllInPlace -> fillAll, fillInPlaceToEnd -> fillToEnd, fillInPlace -> fill
    • added with
  • Same for TypedArray:
    • sort -> toSorted, sortInPlace -> sort
    • reverse -> toReversed, reverseInPlace -> reverse
    • fillAllInPlace -> fillAll, fillInPlaceToEnd -> fillToEnd, fillInPlace -> fill
  • And List:
    • shuffle -> toShuffled
  • Use float instead of int for ordering to avoid premature overflow. #149
  • Add Ordering module. #149

Note 1: These changes should all produce the correct type errors. Though TypedArray's reverse and sort previously mutated and returned the mutated array itself, whereas now they'd be copies. Please be careful refactoring these 2.

Note 2: the newly added helpers, Array.toSorted, Array.toSpliced, Array.toReversed, Array.with, TypedArray.toSorted and TypedArray.toReversed require their respective polyfill, as they're not currently supported by Firefox.