Skip to content

Latest commit

Β 

History

History
1139 lines (788 loc) Β· 78 KB

CHANGELOG.md

File metadata and controls

1139 lines (788 loc) Β· 78 KB

Changelog

Tags:

  • πŸ’₯ [Breaking Change]
  • πŸ‘“ [Spec Compliance]
  • πŸš€ [New Feature]
  • πŸ› [Bug Fix]
  • πŸ“ [Documentation]
  • 🏠 [Internal]
  • πŸ’… [Polish]

12.0.0-alpha.6 (Unreleased)

12.0.0-alpha.5

πŸš€ New Feature

πŸ› Bug fix

πŸ’… Polish

🏠 Internal

12.0.0-alpha.4

πŸ’₯ Breaking Change

πŸš€ New Feature

πŸ› Bug fix

πŸ’… Polish

🏠 Internal

12.0.0-alpha.3

πŸ› Bug fix

12.0.0-alpha.2

πŸš€ New Feature

  • Allow coercing polyvariants to variants when we can guarantee that the runtime representation matches. rescript-lang#6981
  • Add new dict literal syntax (dict{"foo": "bar"}). rescript-lang#6774
  • Optimize usage of the new dict literal syntax to emit an actual JS object literal. rescript-lang#6538

πŸ› Bug Fix

🏠 Internal

πŸ’… Polish

  • Improve formatting in the generated js code. rescript-lang#6932
    • }\ncatch{ -> } catch {
    • for(let i = 0 ,i_finish = r.length; i < i_finish; ++i){ -> for (let i = 0, i_finish = r.length; i < i_finish; ++i) {
    • while(true) { -> while (true) {
    • Fixed tabulation for switch case bodies
    • Fixed tabulation for throw new Error bodies
    • Removed empty line at the end of switch statement
    • Removed empty default case from switch statement in the generated code
  • Optimised the Type Extension runtime code and removed trailing /1 from RE_EXN_ID. rescript-lang#6958
  • Compact output for anonymous functions. rescript-lang#6945 rescript-lang#7013
  • Rewatch 1.0.9. rescript-lang#7010

12.0.0-alpha.1

πŸš€ New Feature

πŸ’₯ Breaking Change

πŸ› Bug Fix

🏠 Internal

πŸ’… Polish

11.1.3

πŸ› Bug Fix

11.1.3-rc.1

πŸ› Bug Fix

11.1.2

πŸ› Bug Fix

  • Fix issue where capitalised type variables were only allowed in certain positions. rescript-lang#6820

11.1.2-rc.1

πŸš€ New Feature

πŸ› Bug Fix

  • Fix location of let bindings with attributes. rescript-lang#6791
  • PPX v4: mark props type in externals as @live to avoid dead code warnings for prop fields in the editor tooling. rescript-lang#6796
  • Fix issue where optional labels were not taken into account when disambiguating record value construction. rescript-lang#6798
  • Fix issue in gentype when type Jsx.element surfaces to the user. rescript-lang#6808
  • Fix inclusion check (impl vs interface) for untagged variants, and fix the outcome printer to show tags. rescript-lang#6669
  • Fix encoding inside tagged template literals. rescript-lang#6810

11.1.1

πŸ› Bug Fix

  • Fix issue of incorrect switch cases with identical bodies when mixing object and array. rescript-lang#6792
  • Fix formatter eats comments on the first argument of a uncurried function. rescript-lang#6763
  • Fix formatter removes parens in pipe operator with anonymous uncurried function. rescript-lang#6766

11.1.0

πŸ› Bug Fix

11.1.0-rc.8

πŸš€ New Feature

πŸ› Bug Fix

πŸ’… Polish

11.1.0-rc.7

πŸ› Bug Fix

  • Fix variance setting for builtin dict type. Fixes issues around inference. rescript-lang#6707

11.1.0-rc.6

πŸš€ New Feature

πŸ› Bug Fix

11.1.0-rc.5

πŸ› Bug Fix

11.1.0-rc.4

πŸ› Bug Fix

:nail-care: Polish

  • Omit undefined in external function calls for trailing optional arguments when not supplied. rescript-lang#6653
  • Make pattern match suggestions to be easier to copy-paste. rescript-lang#6656

11.1.0-rc.3

πŸ’… Polish

  • No parens around tagged template literals. rescript-lang#6639
  • Allow identifier with modules in tagged template literals (e.g. Pg.sqlselect * from ${table} where id = ${id}). rescript-lang#6645

πŸ› Bug Fix

  • Fix compiler crash when reexporting tagged template literal externals. rescript-lang#6645

11.1.0-rc.2

πŸš€ New Feature

πŸ› Bug Fix

🏠 Internal

11.1.0-rc.1

πŸš€ New Feature

πŸ› Bug Fix

  • GenType: distinguish inline records from unary variant cases of object type. rescript-lang#6586

11.0.1

πŸ› Bug Fix

  • Renamed inline record fields: fix renamed field access in inline records. rescript-lang#6551
  • Fixed issue with coercions sometimes raising a Not_found instead of giving a proper error message. rescript-lang#6574
  • Fix issue with recursive modules and uncurried. rescript-lang#6575

πŸ’… Polish

11.0.0

No changes compared to rc.9.

11.0.0-rc.9

πŸš€ New Feature

πŸ› Bug Fix

  • GenType: now emits full suffix on JS import path to be compatible with .res.js. rescript-lang#6541

πŸ’… Polish

11.0.0-rc.8

πŸš€ New Feature

  • Add support for type coercion for invariant type arguments such as array payloads. rescript-lang#6518
  • Start treating rescript command the same as the rescript build command, so now you can do rescript -w. rescript-lang#6524

πŸ› Bug Fix

πŸ’… Polish

11.0.0-rc.7

πŸš€ New Feature

πŸ› Bug Fix

  • Fix issue where an inline record with attributes did not parse. rescript-lang#6499
  • Fix issue with uncurried function with 1 arg being a variable where an undefined variable could be emitted. rescript-lang#6507
  • Fix runtime errors on @genType.as("alias") output. rescript-lang#6509

11.0.0-rc.6

πŸš€ New Feature

πŸ› Bug Fix

πŸ’… Polish

11.0.0-rc.5

πŸš€ New Feature

  • Allow coercing unboxed variants with only strings (now including with a single payload of string) to the primitive string. rescript-lang#6441
  • Allow coercing strings to unboxed variants that have a catch-all unboxed string case. rescript-lang#6443
  • Allow coercing int to float. rescript-lang#6448

πŸ› Bug Fix

  • Fix issue with dynamic import of module in nested expressions. rescript-lang#6431
  • Fix issue where GenType was not supporting @tag on ordinary variants. rescript-lang#6437
  • Fix using dynamic import of module in block instead of async function. rescript-lang#6434
  • Fix issue with using dynamic import of module in uncurried mode. rescript-lang#6434
  • Fix build error with JSX v4 transformation of React.forwardRef in uncurried mode. rescript-lang#6447
  • Fix printing of exotic JSX names. rescript-lang#6451
  • Fix locations when code with await fails to compile (all locations would point to the internal function unsafe_await). rescript-lang#6452
  • Fix renaming fields (with @as) in inline records doesn't work when destructuring. rescript-lang#6456
  • Fix rc.4 regressions:
    • Don't show compilation time when calling rescript build -help command. rescript-lang#6439
    • Running rescript build -w with a compilation error doesn't exit with an error code and continues waiting for changes. rescript-lang#6460

🏠 Internal

πŸ’… Polish

11.0.0-rc.4

πŸš€ New Feature

  • Support renaming fields in inline records with @as attribute. #6391
  • Support renaming object fields of @obj external ppx with @as attribute. #6391
  • Add builtin abstract types for File and Blob APIs. rescript-lang#6383
  • Untagged variants: Support promise, RegExes, Dates, File and Blob. rescript-lang#6383
  • Untagged variants: Support bool. rescript-lang#6368
  • Support aliased types as payloads to untagged variants. rescript-lang#6394
  • Support the async component for React Server Component in JSX V4. rescript-lang#6399
  • Support rescript.json configuration file and deprecate bsconfig.json. rescript-lang#6382

πŸ’₯ Breaking Change

  • Update watcher rules to recompile only on config and *.res/*.resi/*.ml/.mli file changes. Solves the issue of unnecessary recompiles on .css, .ts, and other unrelated file changes. rescript-lang#6420
  • Add smart printer for pipe chains. rescript-lang#6411 (the formatter will reformat existing code in certain cases)
  • Js.Json.t now uses Boolean(bool) instead of explicit @as(true) True | @as(false) False. rescript-lang#6421

πŸ› Bug Fix

  • Fix issue with GenType and labelled arguments. rescript-lang#6406
  • Fix dependencies reinitialization on every change in watch mode. Leads to faster rebuilds and cleaner terminal. rescript-lang#6404

πŸ’… Polish

  • A little performance improvement for JSX V4 runtime helper by removing one object allocation for components with key prop. rescript-lang#6376
  • The error message for "toplevel expressions should evaluate to unit" has been revamped and improved. rescript-lang#6407
  • Improve "Somewhere wanted" error messages by changing wording and adding more context + suggested solutions to the error messages where appropriate. rescript-lang#6410
  • Display the compile time for rescript build command. rescript-lang#6404
  • Improve help message for build and clean commands. rescript-lang#6404
  • Pass through the -verbose flag to builds in watch mode. rescript-lang#6404
  • Improve error message when defining duplicate labels in a record. rescript-lang#6415
  • Improve error message when trying to concatenate strings using the wrong operator. rescript-lang#6416

11.0.0-rc.3

πŸ› Bug Fix

πŸ’… Polish

  • Add Bun to reserved names, so that modules named Bun don't clash with the globally exposed Bun object. rescript-lang#6381

11.0.0-rc.2

πŸš€ New Feature

  • rescript build will always build its dependency by default. The argument -with-deps is not needed anymore. rescript-lang#6350

πŸ’₯ Breaking Change

  • Stop mangling object field names. If you had objects with field names containing "__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. rescript-lang#6354

πŸ› Bug Fix

11.0.0-rc.1

πŸš€ New Feature

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

πŸ’₯ Breaking Change

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

πŸ’… Polish

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

11.0.0-beta.4

πŸš€ New Feature

  • Variants: Allow coercing from variant to variant where applicable. rescript-lang#6314
  • Variants: Experimental support for spreading variant type definitions to copy constructors from one variant to another. rescript-lang#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. rescript-lang#6317

πŸ› Bug Fix

11.0.0-beta.3

πŸš€ New Feature

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

πŸ› Bug Fix

11.0.0-beta.2

πŸš€ 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. rescript-lang#6251
  • Extended untagged variants with function types. rescript-lang#6279

πŸ’₯ Breaking Change

πŸ› Bug Fix

11.0.0-beta.1

πŸš€ 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. rescript-lang#6249

πŸ’… Polish

πŸ› Bug Fix

11.0.0-alpha.6

πŸ’₯ Breaking Change

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

πŸ› Bug Fix

πŸ’… Polish

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

11.0.0-alpha.5

πŸš€ Main New Feature

  • Add support for Dynamic import. rescript-lang#5703
  • GenType: Add moduleResolution option to customize extensions on emitted import statements. This helps to adjust output compatibility with TypeScript projects using ESM. rescript-lang#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. rescript-lang#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). rescript-lang#6180

πŸ› Bug Fix

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

11.0.0-alpha.4

πŸš€ Main New Feature

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

πŸ› Bug Fix

  • Fix broken formatting in uncurried mode for functions with _ placeholder args. rescript-lang#6148
  • Fix issue where spreading record types with optional labels would not have their labels preserved as optional. rescript-lang#6154
  • Fix error location to be the type with the spreads when spreading record types with duplicate labels. rescript-lang#6157
  • Disable warning on @inline attibute on uncurried functions. rescript-lang#6152
  • Support doc comments on arguments of function types. rescript-lang#6161
  • Fix issue with record type coercion and unboxed. rescript-lang#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. rescript-lang#6158
  • Emit directive above header comment. rescript-lang#6172
  • Add error message to private extension. rescript-lang#6175

πŸ’… Polish

11.0.0-alpha.3

πŸš€ Main New Feature

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

πŸ› Bug Fix

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

11.0.0-alpha.2

πŸš€ Main New Feature

πŸ› Bug Fix

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

11.0.0-alpha.1

πŸš€ Main New Feature

  • Introduce experimental uncurried mode. For experimentation only. PR #5796
  • Customization of runtime representation of variants and introduction of untagged variants PR #6095, PR #6103

πŸš€ New Feature

  • Add support for uncurried mode: a mode where everything is considered uncurried, whether with or without the .. This can be turned on with @@uncurried locally in a file. For project-level configuration in bsconfig.json, there's a boolean config "uncurried", which propagates to dependencies, to turn on uncurried mode. Since there's no syntax for partial application in this new mode, introduce @res.partial foo(x) to express partial application. This is temporary and will later have some surface syntax. Make uncurried functions a subtype of curried functions, and allow application for uncurried functions. The make function of components is generated as an uncurried function. Use best effort to determine the config when formatting a file. rescript-lang#5968 rescript-lang#6080 rescript-lang#6086 rescript-lang#6087
  • Customization of runtime representation of variants. This is work in progress. E.g. some restrictions on the input. See comments of the form "TODO: put restriction on the variant definitions allowed, to make sure this never happens". rescript-lang#6095
  • Introduce untagged variants rescript-lang#6103
  • Add support for unary uncurried pipe in uncurried mode rescript-lang#5804
  • Add support for partial application of uncurried functions: with uncurried application one can provide a subset of the arguments, and return a curried type with the remaining ones rescript-lang#5805
  • Add support for uncurried externals rescript-lang#5815 rescript-lang#5819 rescript-lang#5830 rescript-lang#5894
  • Parser/Printer: unify uncurried functions of arity 0, and of arity 1 taking unit. There's now only arity 1 in the source language. rescript-lang#5825
  • Add support for default arguments in uncurried functions rescript-lang#5835
  • Inline uncurried application when it is safe rescript-lang#5847
  • Support optional named arguments without a final unit in uncurried functions rescript-lang#5907
  • GenType: add the option to use the @genType annotation at the module level, meaning that all the items in the module should be exported. rescript-lang#6113
  • GenType: add support for @genType annotations on module definitions. rescript-lang#6113
  • Prebuilt binaries are now provided for all major platforms:
    • macOS x64
    • macOS ARM
    • Linux x64 (statically linked)
    • Linux ARM (statically linked)
    • Windows x64

πŸ’₯ Breaking Change

  • Remove support for the legacy Reason syntax. Existing Reason code can be converted to ReScript syntax using ReScript 9 as follows:
    • npm i -g rescript@9
    • rescript convert <reason files>
  • Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by create-rescript-app which is maintained separately.
  • Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore.
  • Made pinned dependencies transitive: if a is a pinned dependency of b and b is a pinned dependency of c, then a is implicitly a pinned dependency of c. This change is only breaking if your build process assumes non-transitivity.
  • Curried after uncurried is not fused anymore: (. x) => y => 3 is not equivalent to (. x, y) => 3 anymore. It's instead equivalent to (. x) => { y => 3 }. Also, (. int) => string => bool is not equivalen to (. int, string) => bool anymore. These are only breaking changes for unformatted code.
  • Exponentiation operator ** is now right-associative. 2. ** 3. ** 2. now compile to Math.pow(2, Math.pow(3, 2)) and not anymore Math.pow(Math.pow(2, 3), 2). Parentheses can be used to change precedence.
  • Remove unsafe j`$(a)$(b)` interpolation deprecated in compiler version 10 rescript-lang#6068
  • Remove deprecated module Printexc
  • @deriving(jsConverter) not supported anymore for variant types rescript-lang#6088
  • New representation for variants, where the tag is a string instead of a number. rescript-lang#6088
  • GenType: removed support for @genType.as for records and variants which has become unnecessary. Use the language's @as instead to channge the runtime representation without requiring any runtime conversion during FFI. rescript-lang#6099 rescript-lang#6101

πŸ› Bug Fix

πŸ’… Polish

  • Syntax: process uncurried types explicitly in the parser/printer rescript-lang#5784 rescript-lang#5822
  • Syntax: process uncurried function declarations explicitly in the parser/printer rescript-lang#5794
  • PPX V4: allow uncurried make function and treat it like a curried one #5802 #5808 #5812
  • Remove processing of objects expressions, which don't exist in .res syntax (Pexp_object) rescript-lang#5841
  • Remove class type processing from compiler ppx rescript-lang#5842
  • Remove method application via operator ##, which does not exist in .res syntax rescript-lang#5844
  • Treat @meth annotation as making the type uncurried for backwards compatibitly with some examples rescript-lang#5845
  • Process @set annotation for field update as generating an uncurried function rescript-lang#5846
  • Treat uncurried application of primitives like curried application, which produces better output rescript-lang#5851
  • New internal representation for uncurried functions using built-in type function$<fun_type, arity> this avoids having to declare all the possible arities ahead of time rescript-lang#5870
  • PPX V3: allow uncurried make function and treat it like a curried one rescript-lang#6081
  • Add support for |> in uncurried mode by desugaring it rescript-lang#6083
  • Change the compilation of pattern matching for variants so it does not depends on variats being integers rescript-lang#6085
  • Improve code generated for string templates rescript-lang#6090
  • Move Jsx and JsxDOM and JsxEvent and JsxPPXReactSupport inside Pervasives and build them separately for curried and uncurried mode rescript-lang#6091
  • Gentype: allow recursive data types rescript-association/genType#585

10.1.4

πŸ› Bug Fix

πŸš€ New Feature

πŸ’… Polish

10.1.3

πŸš€ New Feature

  • Add experimental suppport for directives. An annotation such as @@directive("use client;") emits use client; verbatim before imports rescript-lang#5999
  • genType: add Core standard library support for the following builtin types: Null.t, Nullable.t, Undefined.t, Dict.t<_>, Promise.t<_>, Date.t, BigInt.t, RegExp.t, Map.t<_, _>, WeakMap.t<_, _>, Set<_>, WeakSet<_> rescript-lang#6024

πŸ’₯ Breaking Change

  • genType: streamline the treatment of optionals as undefined rescript-lang#6024
    • Represent option<t> as undefined | t instead of null | undefined | t. This is more permissive when importing functions taking optional values (allows to use option types), but stricter when e.g. exporting ReScript functions taking arguments of option type. Fallback: use Js.undefined<_> instead.
    • Represent {x:option<string>} as {x:(undefined | string)} instead of {x?: string}. This is more in line with TS's behaviour. Fallback: use {x?:string}.

πŸ’… Polish

πŸ› Bug Fix

10.1.2

πŸ› Bug Fix

  • Fix an issue where error messages related to duplicate props were displayed without a loc and were unclear rescript-lang/syntax#728

10.1.1

πŸ’₯ Breaking Change

  • Parse the attributes of labelled argument to the pattern attributes of argument instead of function. rescript-lang/syntax#722
  • The prop names duplicated to keyword are not mangled automatically in JSX v4.
    • Use @as instead

πŸš€ New Feature

  • Add support for empty inlined record literal {} for inlined records where all fields are optional rescript-lang#5900

πŸ› Bug Fix

10.1.0

πŸ› Bug Fix

  • Fix issue where no error was reported when ? was used for non-optional fields. rescript-lang#5853
  • Fix issue where optional fields in inline records were not supported and would cause type errors rescript-lang#5827

10.1.0-rc.5

πŸ› Bug Fix

  • Prevent inlining of async functions in last stage of the compiler when the functions are not exported (not in interface file or shadowed) rescript-lang#5790

10.1.0-rc.4

πŸš€ New Feature

πŸ› Bug Fix

  • Fix issue where the last line of rescript format --help usage was being swallowed rescript-lang#5760
  • Specialize the printing of the rhs of a record field assignment for optional values {x: ? e} rescript-lang/syntax#714

10.1.0-rc.3

πŸš€ New Feature

πŸ› Bug Fix

πŸ’… Polish

10.1.0-rc.2

πŸ› Bug Fix

  • Fix issue with changes not being applied with React Native's Metro bundler for files with warnings rescript-lang#5738
  • Fix emitting unary minus for floats in case of negative constants rescript-lang#5737
  • Fix issue where a spread ...x in non-last position would not be reported as syntax error rescript-lang/syntax#673
  • Fix issue where the formatter would delete async in a function with labelled arguments.
  • Fix several printing issues with async including an infinite loop rescript-lang/syntax#680
  • Fix issue where certain JSX expressions would be formatted differenctly in compiler 10.1.0-rc.1 rescript-lang/syntax#675
  • Fix issue where printing nested pipe discards await rescript-lang/syntax#687

10.1.0-rc.1

πŸ’₯ Breaking Change

  • Deprecate DOM element attributes in JsxDOM.domProps: begin_, end_, to_
    • Use begin, end, to instead.
  • Emit an error when a @string or @int attribute is used in a V4 component rescript-lang#5724

πŸš€ New Feature

  • Add extra variants for output filename suffixes in bsconfig.json: .bs.mjs and .bs.cjs are allowed rescript-lang#5631
  • Safe promises: t-first Js.Promise2 bindings, and remove warning for nested promises rescript-lang#5709

πŸ› Bug Fix

πŸ‘“ Spec Compliance

  • Functions with consecutive dots now print as multiple arrow functions like in JavaScript.

πŸ’… Polish

  • Add loading, aria-* DOM element attributes in JsxDOM.domProps: ariaCurrent, ariaInvalid, ariaAutocomplete, etc.
  • Change the internal representation of props for the lowercase components to record. rescript-lang/syntax#665
  • Add JsxPPXReactSupport module to relocate the helper functions for JSX v4 from rescript-react

10.1.0-alpha.2

πŸš€ New Feature

πŸ› Bug Fix

πŸ’… Polish

10.1.0-alpha.1

πŸ’₯ Breaking Change

  • Pipe -> does not support a code block on the right-hand side e.g. x->{ open A; get("test") }

πŸš€ New Feature

  • Experimental support for for async/await rescript-lang#5537
  • Make promise a built-in type rescript-lang#5650
  • Initial support for JSX V4 including genType, still work in progress.
    • πŸ’₯ when V4 is activated, at most one component is allowed for each module.
  • Add placeholder types for ES6 collections: Set, Map, WeakSet, and WeakMap rescript-lang#5630

πŸ› Bug Fix

  • Fix issue with arrays and creation of recursive values rescript-lang#5640
  • Fix issue where characters such as newlines would be escaped in a template string expression rescript-lang#5638
  • Fix issue where pipe -> processing eats up attributes rescript-lang#5581
  • Fix issue where cancelling rescript build would leave the .bsb.lock file behind and block future builds

πŸ’… Polish

10.0.1

πŸ› Bug Fix

10.0.0

Compiler

πŸ’₯ Breaking Change

  • bsconfig.json does not support // line comments anymore.
    • Example: "suffix": ".bs.js" // determine the suffix
    • Fix: remove the comment and use standard json.
  • Changed return type of Js.String.match_ as it was wrong. #5070
    • Example: any use of Js.String.match_ and Js.String2.match_
    • Fix: follow the type errors
  • GenType is now vendored in the compiler and drops support for the Flow and untyped back-ends to focus on providing a better experience for TypeScript.
    • Fix: keep on using the older version of the compiler and the separate genType package if Flow support is required. Migrate to TS if one wants to upgrade the compiler version.

πŸš€ New Feature

πŸ› Bug Fix

  • Classify bigint correctly #5351
  • Fixed crash in rescript build on Windows #5516
  • Fixed rescript init command not working #5526
  • Fix issue with compiler log not terminated that causes problems with editor extension not clearing issues when fixed #5545
πŸ’… Polish
  • Changed Linux build to depend on GLIBC 2.28 again for compatibility with Debian 10.

  • Proper M1 support (CI now supports M1 native builds)

Syntax

πŸ’₯ Breaking Change

  • @bs.send.pipe is now removed. Earlier it was deprecated.
  • Missing labels in function application is now an error (https://forum.rescript-lang.org/t/ann-more-strict-checks-in-missed-labels/2117).
    • Example: let f = (x, ~z) => x + z; f(1, 2)
    • Fix: do let f = (x, ~z) => x + z; f(1, ~z=2) instead
  • Externals without @val annotations do not work anymore, and externals with = "" give an error.
    • Example: external setTimeout: (unit => unit, int) => float = "setTimeout" is not supported anymore.
    • Fix: use @val external setTimeout: (unit => unit, int) => float = "setTimeout" instead.
    • Example2: @val external setTimeout: (unit => unit, int) => float = "" is not supported anymore.
    • Fix2: use @val external setTimeout: (unit => unit, int) => float = "setTimeout" instead.
  • Strings processed at compile-time don't need escaping anymore.
    • Example: let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g").
    • Fix: use let blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g") instead.
  • Remove parsing of "import" and "export" which was never officially supported rescript-lang/syntax#597 rescript-lang/syntax#599
    • Example: export type t = int
    • Fix: @genType type t = int
    • Example2: import realValue: complexNumber => float from "./MyMath"
    • Fix2: @genType.import("./MyMath") external realValue: complexNumber => float = "realValue"

πŸš€ New Feature

  • Unicode is now supported in regular strings and chars (when the symbol fits). This is now going to work: let str = "Ξ£". And, you'll be able to pattern match on unicode chars: switch c { | 'Ξ£' => "what a fine unicode char" | _ => "unicode is fun" }
  • Doc comments /** ... */ are now supported. Inernally, they are attributes, so are only valid at positions where @foo is allowed, or a syntax error is given. Similarly for module-level /*** comments */ that can go where @@attributes go.

πŸ› Bug Fix

  • Fix printing for inline nullary functor types #477
  • Fix stripping of quotes for empty poly variants #474
  • Implement syntax for arity zero vs arity one in uncurried application in #139
  • Fix parsing of first class module exprs as part of binary/ternary expr in #256
  • Fix formatter hanging on deeply nested function calls #261

Libraries

πŸ’₯ Breaking Change

πŸ› Bug Fix

πŸ’… Polish

  • Several Belt / Js libraries are now converted to ReScript syntax, with corresponding comments in Markdown format suitable for hovering. See #5361.

Playground

🏠 Internal

  • Added jsoo_playground_main.ml as the rescript-lang.org playground bundle entrypoint

πŸ’₯ Breaking Change


You can find more old changelog from docs/changelog