Skip to content

Releases: rescript-lang/rescript-compiler

11.0.0-rc.1

16 Aug 14:50
a921557
Compare
Choose a tag to compare
11.0.0-rc.1 Pre-release
Pre-release

🚀 New Feature

  • GenType: Propagate comments from record fields to emitted TypeScript types. #6333

💥 Breaking Change

  • $$default is no longer exported from the generated JavaScript when using default exports. #6328

💅 Polish

  • Conditionally print error message about record with missing label potentially being a component. #6337
  • Put definition in the bottom and the actual error at the top when reporting errors for supplying fields etc with the wrong name. #6336
  • Fix left over places where polyvariant tag names were printed in OCaml syntax instead of ReScript. #6348

11.0.0-beta.4

18 Jul 16:37
1eb38db
Compare
Choose a tag to compare
11.0.0-beta.4 Pre-release
Pre-release

🚀 New Feature

  • Variants: Allow coercing from variant to variant where applicable. #6314
  • Variants: Experimental support for spreading variant type definitions to copy constructors from one variant to another. #6316

💥 Breaking Change

  • Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. #6317

🐛 Bug Fix

  • Fixed outcome printing of uncurried higher order function types. #6323
  • Fixed printing of type constraints in template literal substitutions. #6324

11.0.0-beta.3

28 Jun 08:20
3899bb1
Compare
Choose a tag to compare
11.0.0-beta.3 Pre-release
Pre-release

🚀 New Feature

  • Untagged variants: consider regexp as an object type. #6296
  • Semantic-based optimization of code generated for untagged variants. #6108
  • Record type spreads: Allow using type variables in type spreads. Both uninstantiated and instantiated ones. #6309
  • Variants: Allow coercing variants to string/int/float when applicable. #6311

🐛 Bug Fix

  • Fix issue with dynamic import of modules in expressions. #6310

11.0.0-beta.2

08 Jun 13:44
c3d57c4
Compare
Choose a tag to compare
11.0.0-beta.2 Pre-release
Pre-release

🚀 New Feature

  • Introduced a new %ffi extension (experimental - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. #6251
  • Extended untagged variants with function types. #6279

💥 Breaking Change

  • Remove rudimentary node bindings and undocumented %node extension. #6285

🐛 Bug Fix

  • Fix issue where uncurried type internals leak in type error. #6264
  • Improve error messages for untagged variant definition. #6290
  • Fix type checking performance issue for large records. #6289

11.0.0-beta.1

22 May 15:32
Compare
Choose a tag to compare
11.0.0-beta.1 Pre-release
Pre-release

🚀 Main New Feature

  • Make uncurried mode opt-out: by default, every project is now in uncurried mode, unless "uncurried": false is specified in the project config. #6249

💅 Polish

  • Removed duplicate Super_error implementation in syntax. #6246

🐛 Bug Fix

  • Fix issue with inlining records in the presence of record coercion. #6256

11.0.0-alpha.6

05 May 15:07
384a592
Compare
Choose a tag to compare
11.0.0-alpha.6 Pre-release
Pre-release

💥 Breaking Change

  • -bs-super-errors flag has been deprecated along with Super_errors. #6243
  • @rescript/react >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. #6238

🐛 Bug Fix

  • Remove unnecessary require and import statements when using dynamic imports. #6232
  • Fix option unboxing logic in the presence of untagged variants. #6233
  • Fix printing of local module with type. #6212
  • Adapting JSX4 to React.fragment's children type change ('children -> React.element) #6238

💅 Polish

  • In uncurried mode, outcome printer swaps curried and uncurries function printing compared to legacy.
  • Add location information to duplicate type definition error messages. #6199
  • Replace normal module errors with Super_error module, and clean up Super_error. #6199
  • Js.Json.t, Js.null and Js.nullable are now untagged variants representing their runtime values, instead of abstract types. #6218

11.0.0-alpha.5

27 Apr 18:35
f2d5c80
Compare
Choose a tag to compare
11.0.0-alpha.5 Pre-release
Pre-release

🚀 Main New Feature

  • Add support for Dynamic import. #5703
  • GenType: Add moduleResolution option to customize extensions on emitted import statements. This helps to adjust output compatibility with TypeScript projects using ESM. #6182
    • node (default): Drop extensions.
    • node16: Use TS output's extensions. Make it ESM-compatible.
    • bundler: Use TS input's extensions. Make it ESM-compatible.
  • Make untagged variants understand payloads defined as records. #6208

💥 Breaking Change

  • Parse assert as a regular function. assert is no longer a unary expression. Example: before assert 1 == 2 is parsed as (assert 1) == 2, now it is parsed as assert(1 == 2). #6180

🐛 Bug Fix

  • Make "rescript format" work with node 10 again and set minimum required node version to 10 in package.json. #6186
  • Fix partial application for uncurried functions with labeled args #6198
  • Add error messages for dangling doc comments/attributes and mutable in record type definition. #6206
  • Fix issue with overlapping array and object in untagged variants #6219

11.0.0-alpha.4

19 Apr 15:01
7cd303e
Compare
Choose a tag to compare
11.0.0-alpha.4 Pre-release
Pre-release

🚀 Main New Feature

  • Add surface syntax for partial application of uncurried functions: foo(1, ...). This corresponds to curried application in the old mode. #6166

🐛 Bug Fix

  • Fix broken formatting in uncurried mode for functions with _ placeholder args. #6148
  • Fix issue where spreading record types with optional labels would not have their labels preserved as optional. #6154
  • Fix error location to be the type with the spreads when spreading record types with duplicate labels. #6157
  • Disable warning on @inline attibute on uncurried functions. #6152
  • Support doc comments on arguments of function types. #6161
  • Fix issue with record type coercion and unboxed. #6158
  • Fixed subtype checking for record types with @as attributes: The subtype relationship now takes into account the compatibility of @as attributes between corresponding fields, ensuring correctness in runtime representation.
    #6158
  • Emit directive above header comment. #6172
  • Add error message to private extension. #6175

💅 Polish

  • Update list of reserved JS keywords. #6167
  • Add error message to @@directive. #6174

11.0.0-alpha.3

14 Apr 07:12
a6090a5
Compare
Choose a tag to compare
11.0.0-alpha.3 Pre-release
Pre-release

🚀 Main New Feature

  • Add support for extensible records (e.g. type t = {...t1, x:int, ...t2}) #5715

🐛 Bug Fix

  • Fix formatting and parentheses placement in uncurried functions with constraints. #6143

11.0.0-alpha.2

12 Apr 12:47
c521f17
Compare
Choose a tag to compare
11.0.0-alpha.2 Pre-release
Pre-release

🐛 Bug Fix

  • Special case generation of uncurried functions with 1 argument of unit type so they don't take a parameter. #6131

🚀 Main New Features

  • Add support for type coercion :> for records. #5721