Releases: rescript-lang/rescript
Releases · rescript-lang/rescript
10.1.0-rc.1
💥 Breaking Change
- Deprecate DOM element attributes in
JsxDOM.domProps
:begin_
,end_
,to_
- Use
begin
,end
,to
instead.
- Use
- Emit an error when a
@string
or@int
attribute is used in a V4 component #5724
🚀 New Feature
- Add extra variants for output filename suffixes in
bsconfig.json
:.bs.mjs
and.bs.cjs
are allowed #5631 - Safe promises: t-first Js.Promise2 bindings, and remove warning for nested promises #5709
🐛 Bug Fix
- Fix issue where uncurried async functions were emitted without
async
#5718 - Fix location issue in error messages with JSX V4 where the multiple props types are defined rescript-lang/syntax#655
- Fix location issue in make function in JSX V4 that breaks dead code elimination rescript-lang/syntax#660
- Fix parsing (hence pretty printing) of expressions with underscore
_
and comments. - Fix printing of comments inside JSX tag rescript-lang/syntax#664
- Fix issue where formatter erases tail comments inside JSX tag rescript-lang/syntax#663
- Fix issue where the JSX prop has type annotation of the first class module rescript-lang/syntax#666
- Fix issue where an empty record literal {} expected to have a non-record type would type check #5729
👓 Spec Compliance
- Functions with consecutive dots now print as multiple arrow functions like in JavaScript.
💅 Polish
- Add
loading
,aria-*
DOM element attributes inJsxDOM.domProps
:ariaCurrent
,ariaInvalid
,ariaAutocomplete
, etc. - Change the internal representation of props for the lowercase components to record. rescript-lang/syntax#665
10.1.0-alpha.2
🚀 New Feature
- Fix pretty printer where it would print doc comments on the same line as other attributes rescript-lang/syntax#642
- Propagte
"jsx"
configuration to dependencies #5661 - Add support for empty record literal
{}
for records where all fields are optional #5658 - Add support for empty record type (e.g.
type empty = {}
) #5658
🐛 Bug Fix
- Fix issue in formatting JSX spread props rescript-lang/syntax#644
- Fix location issue in error messages with JSX V4 where the body of the component is an application rescript-lang/syntax#633
- Fix printing of type declarations in error message where they would be considered recursive by default
- Fix issue where the printer would omit attributes for
->
and|>
rescript-lang/syntax#629 - Fix printing of optional fields in records #5654
💅 Polish
- Improvements and fixes for JSX V4. See guide https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md
- Mention all missing fields in error message for records, not just one #5657
10.1.0-alpha.1
💥 Breaking Change
- Vendor genType, which does not need to be installed separately anymore. Only TypeScript back-end supported.
- 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
#5537 -
Make
promise
a built-in type #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
, andWeakMap
#5630
🐛 Bug Fix
- Fix issue with arrays and creation of recursive values #5640
- Fix issue where characters such as newlines would be escaped in a template string expression #5638
- Fix issue where pipe
->
processing eats up attributes #5581 - Fix issue where cancelling
rescript build
would leave the.bsb.lock
file behind and block future builds
💅 Polish
- Print patterns in warnings using rescript printer #5492
10.0.1
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.
- Example:
- Changed return type of
Js.String.match_
as it was wrong. #5070- Example: any use of
Js.String.match_
andJs.String2.match_
- Fix: follow the type errors
- Example: any use of
🚀 New Feature
- New records with optional fields e.g.
type opt = {x: int, y?: string}
were added as an experimental feature #5423 #5452 New Syntax - Add support for
@new @variadic
(see #5364)
🐛 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
- Example:
- 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.
- Example:
- 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.
- Example:
- 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"
- Example:
🚀 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
- "Attributes not allowed here". If you see this error chances are you're using a ppx that needs updating to a new version.
See an exampe of how to update a ppx- Example: for
rescript-relay
0.23.0 is not supported. - Fix: use
rescript-relay@beta
or the new version when released.
- Example: for
- Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: 0fd8bb0.
🐛 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
- Removed Reason syntax support for the playground experience. See #5375
10.0.0-rc.1
Release Candidate 1
10.0.0-rc.1
🐛 Bug Fix
- Fix library issue with missing
bytes_to_string
#5573
10.0.0-beta.3
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.
- Example:
- Changed return type of
Js.String.match_
as it was wrong. #5070- Example: any use of
Js.String.match_
andJs.String2.match_
- Fix: follow the type errors
- Example: any use of
🚀 New Feature
- New records with
@optional
fields e.g.type opt = {x: int, ?y: string}
were added as an experimental feature #5423 #5452 New Syntax - Add support for
@new @variadic
(see #5364)
🐛 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
- Example:
- 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.
- Example:
- 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.
- Example:
- 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"
- Example:
🚀 New Feature
- 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
- "Attributes not allowed here". If you see this error chances are you're using a ppx that needs updating to a new version.
See an exampe of how to update a ppx- Example: for
rescript-relay
0.23.0 is not supported. - Fix: use
rescript-relay@beta
or the new version when released.
- Example: for
- Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: 0fd8bb0.
💅 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
- Removed Reason syntax support for the playground experience. See #5375
10.0.0-beta.3
Beta 3
🐛 Bug Fix
- Fix issue with compiler log not terminated that causes problems with editor extension not clearing issues when fixed #5545
Beta 2
💅 Polish
- Changed Linux build to depend on GLIBC 2.28 again for compatibility with Debian 10.
Beta 1
🐛 Bug Fix
💥 Breaking Change
bsconfig.json
does not support// line
comments anymore- Externals without
@val
annotations do not work anymore, and externals with= ""
give an error. - Regular expressions don't need escaping. E.g.
let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g")
is nowlet blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g")
.
Alpha 1
Compiler
🚀 New Feature
🐛 Bug Fix
- Classify bigint correctly #5351
💥 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).
- Fix Js.String.match_ return type #5070
🏠 [Internal]
- Proper M1 support (CI now supports M1 native builds)
Syntax
🚀 New Feature
- 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
💥 Breaking Change
- Remove parsing of "import" and "export" which was never officially supported.
Libraries
💥 Breaking Change
- Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: 0fd8bb0.
- There could be issues with
rescript-relay
. See #5493.
💅 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
*
Removed Reason syntax support for the playground experience. See #5375
10.0.0-beta.2
*
means potential breaking changes
New since beta.1:
- Changed Linux build to depend on GLIBC 2.28 again for compatibility with Debian 10.
New since alpha.1:
- Fixed crash in
rescript build
on Windows #5516 - Fixed
rescript init
command not working #5526 *
bsconfig.json
does not support // line comments anymore*
Externals without@val
annotations do not work anymore, and externals with= ""
give an error.*
Regular expressions don't need escaping. E.g.let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g")
is nowlet blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g")
.
Compiler
- Add support for
@new @variadic
(see #5364) - New records with
@optional
fields #5423 #5452 - Classify bigint correctly #5351
*
@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).*
Fix Js.String.match_ return type #5070- Proper M1 support (CI now supports M1 native builds)
Syntax
- 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. - 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
- Remove parsing of "import" and "export" which was never officially supported.
Libraries
*
Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: 0fd8bb0.*
There could be issues withrescript-relay
. See #5493.- Several Belt / Js libraries are now converted to ReScript syntax, with corresponding comments in Markdown format suitable for hovering. See #5361.
Playground
- Added
jsoo_playground_main.ml
as the rescript-lang.org playground bundle entrypoint *
Removed Reason syntax support for the playground experience. See #5375
10.0.0-beta.1
*
means potential breaking changes
New since alpha.1:
- Fixed crash in
rescript build
on Windows #5516 - Fixed
rescript init
command not working #5526 *
bsconfig.json
does not support // line comments anymore*
Externals without@val
annotations do not work anymore, and externals with= ""
give an error.*
Regular expressions don't need escaping. E.g.let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g")
is nowlet blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g")
.
Compiler
- Add support for
@new @variadic
(see #5364) - New records with
@optional
fields #5423 #5452 - Classify bigint correctly #5351
*
@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).*
Fix Js.String.match_ return type #5070- Proper M1 support (CI now supports M1 native builds)
Syntax
- 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. - 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
- Remove parsing of "import" and "export" which was never officially supported.
Libraries
*
Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: 0fd8bb0.*
There could be issues withrescript-relay
. See #5493.- Several Belt / Js libraries are now converted to ReScript syntax, with corresponding comments in Markdown format suitable for hovering. See #5361.
Playground
- Added
jsoo_playground_main.ml
as the rescript-lang.org playground bundle entrypoint *
Removed Reason syntax support for the playground experience. See #5375
10.0.0-alpha.1
*
means potential breaking changes
Compiler
- Add support for
@new @variadic
(see #5364) - New records with
@optional
fields #5423 #5452 - Classify bigint correctly #5351
*
@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).*
Fix Js.String.match_ return type #5070- Proper M1 support (CI now supports M1 native builds)
Syntax
- 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. - 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
- Remove parsing of "import" and "export" which was never officially supported.
Libraries
*
Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: 0fd8bb0.*
There could be issues withrescript-relay
. See #5493.- Several Belt / Js libraries are now converted to ReScript syntax, with corresponding comments in Markdown format suitable for hovering. See #5361.
Playground
- Added
jsoo_playground_main.ml
as the rescript-lang.org playground bundle entrypoint *
Removed Reason syntax support for the playground experience. See #5375