Skip to content

Latest commit

 

History

History
185 lines (132 loc) · 12.4 KB

CHANGELOG.md

File metadata and controls

185 lines (132 loc) · 12.4 KB

@rescript/core Changelog

Next version

  • Fix bindings of DataView. #246

1.6.1

  • Add difference, intersection, union, symmetricDifference, isSubsetOf, isSupersetOf, isDisjointFrom, toArray functions to Set. #247

1.6.0

  • Optimize compare and equal functions. #238
  • Add make and done + value functions to AsyncIterator. #243
  • Int: Add bitwise functions from Pervasives. #245

1.5.2

  • Remove aliases for runtime modules (MapperRt, Internal) and Re. #237

1.5.1

  • Remove leftover top-level t<'a>. #236

1.5.0

  • 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

1.3.0

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

  • 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

  • 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

  • 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

  • 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

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

API changes

  • Add Result.mapError #98

Documentation

  • Docstrings for Object. Not yet complete. #117

0.4.0

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.

0.3.1

Bug fixes

  • Fix peer dependency range so later versions of npm don't complain as Core is used with ReScript v11 alpha.

0.3.0

API changes

  • Add Result.forEach #116
  • Set peer dependencies range for ReScript compiler #133

0.2.0

API changes

  • Change Map.set to not return self, to indicate that it's mutable. #34
  • Change Set.add to not return self, to indicate that it's mutable. #35
  • Change Iterator bindings to have the same shape as AsyncIterator for consistency. #34
  • Add Iterator.toArray binding for turning an iterator into an array. #34
  • Add Array.at binding for returning an array item by its index. #48
  • Fixed type signatures of Array.fromArrayLikeWithMap and Array.fromIteratorWithMap. #50
  • Remove internal async/await helpers that do not need to be exposed in Core.
  • Add locale and formatting options to localeDateString, localeString and localTimeString functions #30
  • Remove Undefined module. Nullable or option directly (where appropriate) can be used instead. #59
  • Change RegExp.source to return a string. Was previously returning a bool, which is wrong. #47
  • Remove Date.valueOf as it returns the same as Date.getTime. #61
  • Change Float.fromString signature. Now accepts only string. #54
  • Change Float.parseFloat signature. Now accepts only string. #54
  • Add getExn, getUnsafe, getWithDefault, map, mapWithDefault and flatMap to Nullable. #67
  • Add getExn, getUnsafe, getWithDefault, map, mapWithDefault and flatMap to Null. #73
  • Add make, fromInitializer, findMap, keepSome, reduceRight and reduceRightWithIndex. #49
  • Remove reduceReverse in favor of reduceRight. #49
  • Fixed type signatures of reduce and reduceWithIndex. #49
  • Add panic/Error.panic. #72
  • The globally available null value now originates from Nullable and not Null, just like the globally available undefined value does. #88
  • Add Int.range and Int.rangeWithOptions, #52
  • Remove Array.fromIterator and Array.fromIteratorWithMap. The same functions exist in Iterator as Iterator.fromArray and Iterator.fromArrayWithMapper. #78
  • Remove unsafe Array.from and Array.fromWithMap. #78
  • Add Int.clamp and Float.clamp, #90

Documentation

  • Docstrings for Map and Iterator. #34
  • Docstrings for Global. #39
  • Docstrings for Set. #35
  • Docstrings for AsyncIterator. #33
  • Docstrings for Type. #32
  • Docstrings for Int. #37
  • Docstrings for Dict. #40
  • Docstrings for RegExp. #47
  • Docstrings for Date. #61
  • Docstrings for Float. #54
  • Docstrings for String. #27
  • Docstrings for Array. #78