Releases: rescript-lang/rescript
Releases · rescript-lang/rescript
11.0.0-rc.7
11.0.0-rc.6
🚀 New Feature
- Freely configurable suffix for generated .js files. #6472
🐛 Bug Fix
- Fix issue with GenType and
result
introduced in rc.5. #6464 - Fix compiler crash when inlining complex constants in pattern matching. #6471
- Fix issue with generating async functions inside loops. #6479
- Fix issue with Gentype and string annotations with numbers such as
@as("0")
. #6487 - Fix error message on curried/uncurried signature mismatch. #6414
💅 Polish
- Improve some error messages in rescript.conf parsing. #6469
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. #6441
- Allow coercing strings to unboxed variants that have a catch-all unboxed string case. #6443
- Allow coercing
int
tofloat
. #6448
🐛 Bug Fix
- Fix issue with dynamic import of module in nested expressions. #6431
- Fix issue where GenType was not supporting
@tag
on ordinary variants. #6437 - Fix using dynamic import of module in block instead of async function. #6434
- Fix issue with using dynamic import of module in uncurried mode. #6434
- Fix build error with JSX v4 transformation of React.forwardRef in uncurried mode. #6447
- Fix printing of exotic JSX names. #6451
- Fix locations when code with
await
fails to compile (all locations would point to the internal functionunsafe_await
). #6452 - Fix renaming fields (with @as) in inline records doesn't work when destructuring. #6456
- Fix
rc.4
regressions:
🏠 Internal
- Remove dependency stdlib-406 -> belt. #6453
- Playground: Add support for implicitly opened modules. #6446
💅 Polish
- Add
Deno
to reserved names, so that modules namedDeno
don't clash with the globally exposedDeno
object. #6428 - Disable ESLint/TSLint on gentype outputs properly. #6442
- Improve
rescript
CLI to usestdout
/stderr
appropriately for help command's message. #6439 - Generate
f()
instead off(undefined)
forf()
. #6459
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. #6383
- Untagged variants: Support
promise
, RegExes, Dates, File and Blob. #6383 - Untagged variants: Support
bool
. #6368 - Support aliased types as payloads to untagged variants. #6394
- Support the async component for React Server Component in JSX V4. #6399
- Support
rescript.json
configuration file and deprecatebsconfig.json
. #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. #6420 - Add smart printer for pipe chains. #6411 (the formatter will reformat existing code in certain cases)
Js.Json.t
now usesBoolean(bool)
instead of explicit@as(true) True | @as(false) False
. #6421
🐛 Bug Fix
- Fix issue with GenType and labelled arguments. #6406
- Fix dependencies reinitialization on every change in watch mode. Leads to faster rebuilds and cleaner terminal. #6404
💅 Polish
- A little performance improvement for JSX V4 runtime helper by removing one object allocation for components with key prop. #6376
- The error message for "toplevel expressions should evaluate to unit" has been revamped and improved. #6407
- Improve "Somewhere wanted" error messages by changing wording and adding more context + suggested solutions to the error messages where appropriate. #6410
- Display the compile time for
rescript build
command. #6404 - Improve help message for
build
andclean
commands. #6404 - Pass through the
-verbose
flag to builds in watch mode. #6404 - Improve error message when defining duplicate labels in a record. #6415
- Improve error message when trying to concatenate strings using the wrong operator. #6416
11.0.0-rc.3
11.0.0-rc.2
🚀 New Feature
rescript build
will always build its dependency by default. The argument-with-deps
is not needed anymore. #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. #6354
🐛 Bug Fix
- Fixed outcome printer resolution of uncurried config. #6353
11.0.0-rc.1
🚀 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
🚀 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
11.0.0-beta.3
🚀 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
🚀 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