Description
Here are the verbatim release notes as of Nov 4: for each item, need to evaluate whether some doc update is required.
Ticked means: either not necessary, or doc updated.
10.1.0-rc.4
🚀 New Feature
- Support format check with
rescript format -check
. Check formatting rescript#5760
🐛 Bug Fix
- Fix issue where the last line of
rescript format --help
usage was being swallowed Check formatting rescript#5760 - Specialize the printing of the rhs of a record field assignment for optional values
{x: ? e}
Parentheses when assigning optional value to optional field syntax#714
10.1.0-rc.3
🚀 New Feature
-
Support the use of spread anywhere in list creation (e.g. `list{...x, 1, ...y, ...z}). Spread anywhere feature syntax#692 Docs: Update docs for list spread. #598
-
Add support for the argument of
@react.component
to set a props type from the outside. JSX v4 shared props syntax#699
🐛 Bug Fix
- Fix issue where the JSX key type is not an optional string Fix react comp key type syntax#693
- Prevent inlining of async functions Immediately invoked async functions lead to non-working code rescript#5754
- Fix build error for JSX fragment without children Fix fragment optional children syntax#704
- Fix issue where async as an id cannot be used with application and labelled arguments [10.1] Redefined async functions don't support named arguments syntax#707
- Fix 5557: the exhaustive checking for char is incorrect during the unicode migration Fix char pattern matching in unicode rescript#5749
- Fix 5753: the comment for unicode char is inaccurate Change char payload syntax#709
- Treat await as almost-unary operator weaker than pipe so
await foo->bar
meansawait (foo->bar)
Treat await as an almost-unary operator. syntax#711
💅 Polish
- Change payload of
Pconst_char
fromchar
toint
Change char payload syntax#709
10.1.0-rc.2
🐛 Bug Fix
- Fix issue with changes not being applied with React Native's Metro bundler for files with warnings Fix .bs.js timestamp being reset to 1970-01-01 when there are warnings rescript#5738
- Fix emitting unary minus for floats in case of negative constants Fix emitting unary minus for floats in case of negative constants. rescript#5737
- Fix issue where a spread
...x
in non-last position would not be reported as syntax error Add spread element check when the last element is a spread. 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 Fix several printing issues withasync
including an infinite loop. syntax#680 - Fix issue where certain JSX expressions would be formatted differenctly in compiler 10.1.0-rc.1 Unnecessary format changes in JSX between 10.0.1 and 10.1.0-rc.1 syntax#675
- Fix issue where printing nested pipe discards await await lost on reformat syntax#687
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 JSX v4 and @string / @int rescript#5724
🚀 New Feature
- Add extra variants for output filename suffixes in
bsconfig.json
:.bs.mjs
and.bs.cjs
are allowed Add extra variants for suffixes in bsconfig.json rescript#5631 - Safe promises: t-first Js.Promise2 bindings, and remove warning for nested promises Safe promises rescript#5709
🐛 Bug Fix
- Fix issue where uncurried async functions were emitted without
async
Fix issue where uncurried async functions were emitted withoutasync
rescript#5718 - Fix location issue in error messages with JSX V4 where the multiple props types are defined Better error msg and loc for multiple props type declaration syntax#655
- Fix location issue in make function in JSX V4 that breaks dead code elimination Fix location issue in make function in JSX V4 that breaks dead code e… syntax#660
- Fix parsing (hence pretty printing) of expressions with underscore
_
and comments. - Fix printing of comments inside JSX tag fix: Avoid tail comments inside tag from being eaten syntax#664
- Fix issue where formatter erases tail comments inside JSX tag Formatter erasing comments syntax#663
- Fix issue where the JSX prop has type annotation of the first class module Fix JSX v4 for first class module syntax#666
- Fix issue where an empty record literal {} expected to have a non-record type would type check Fix issue where an empty record literal {} expected to have a non-record type would type check rescript#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. JSX v4 record-based representation for lowercase 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 Fix printing doc comments before attributes syntax#642
- Propagte
"jsx"
configuration to dependencies Propagate jsx config to dependencies, and add config "preserve-dependencies". rescript#5661 - Add support for empty record literal
{}
for records where all fields are optional Support {} for empty record literals and types. rescript#5658 - Add support for empty record type (e.g.
type empty = {}
) Support {} for empty record literals and types. rescript#5658
🐛 Bug Fix
- Fix issue in formatting JSX spread props Spread props syntax#644
- Fix location issue in error messages with JSX V4 where the body of the component is an application Add loc for returned component body 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|>
Pipe reformat eats annotation syntax#629 - Fix printing of optional fields in records Optional record fields rendered incorrectly in type errors rescript#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 Print all missing labels in error message for records, not just one. rescript#5657
10.1.0-alpha.1
💥 Breaking Change
- Vendor genType, which does not need to be installed separately anymore. Only TypeScript back-end supported. Update genType docs after the move inside the compiler. #597
- 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
Async await support rescript#5537 DOC:Add documentation for async/await. #590 -
Make
promise
a built-in type Make promise a built-in type. rescript#5650 -
JSX V4. Update React page #593
-
Add placeholder types for ES6 collections:
Set
,Map
,WeakSet
, andWeakMap
Add placeholder types for ES6 collections rescript#5630
🐛 Bug Fix
- Fix issue with arrays and creation of recursive values Fix issue with arrays and creation of recursive values. rescript#5640
- Fix issue where characters such as newlines would be escaped in a template string expression Incorrect escaping with multiline strings rescript#5638
- Fix issue where pipe
->
processing eats up attributes Fix issue where pipe "->" processing eats up attributes. rescript#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 POC: print patterns in warnings using rescript printer rescript#5492