Releases: rescript-lang/rescript
Releases · rescript-lang/rescript
12.0.0-alpha.3
12.0.0-alpha.2
🚀 New Feature
- Allow coercing polyvariants to variants when we can guarantee that the runtime representation matches. #6981
- Add new dict literal syntax (
dict{"foo": "bar"}). #6774 - Optimize usage of the new dict literal syntax to emit an actual JS object literal. #6538
🐛 Bug Fix
- Fix issue where long layout break added a trailing comma in partial application
.... #6949 - Fix incorrect format of function under unary operator. #6953
- Fix incorrect printing of module binding with signature. #6963
- Fix incorrect printing of external with
@asattribute and_placholder (fixed argument). #6970 - Disallow spreading anything but regular variants inside of other variants. #6980
- Fix comment removed when function signature has
typekeyword. #6997 - Fix parse error on doc comment before "and" in type def. #7001
🏠 Internal
- Add dev container. #6962
- Convert more tests to the node test runner. #6956
- Remove attribute "internal.arity". #7004
- Remove dead modules. #7008
💅 Polish
- Improve formatting in the generated js code. #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 casebodies - Fixed tabulation for
throw new Errorbodies - Removed empty line at the end of
switchstatement - Removed empty
defaultcase fromswitchstatement in the generated code
- Optimised the Type Extension runtime code and removed trailing
/1fromRE_EXN_ID. #6958 - Compact output for anonymous functions. #6945 #7013
- Rewatch 1.0.9. #7010
12.0.0-alpha.1
🚀 New Feature
- Allow
@directiveon functions for emitting function level directive code (let serverAction = @directive("'use server'") (~name) => {...}). #6756 - Add
rewatchto the npm package as an alternative build tool. #6762 - Throws an instance of JavaScript's
new Error()and adds the extension payload forcauseoption. #6611 - Allow free vars in types for type coercion
e :> t. #6828 - Allow
privatein with constraints. #6843 - Add regex literals as syntax sugar for
@bs.re. #6776 - Improved mechanism to determine arity of externals, which is consistent however the type is written. #6874 #6881 #6883
💥 Breaking Change
- Make
jandjsallowed names for tag functions. #6817 lazysyntax is no longer supported. If you're using it, useLazymodule orReact.lazy_instead. #6342- Remove handling of attributes with
bs.prefix (@bs.as->@asetc.). #6643 - Remove obsolete
@bs.openfeature. #6629 - Drop Node.js version <18 support, due to it reaching End-of-Life. #6429
- Remove deprecated -bs-super-errors option. #6814
- Some global names and old keywords are no longer prefixed. #6831
- Remove ml parsing tests and conversion from
.mlto.resvia format. #6848 - Remove support for compiling
.mlfiles, and general cleanup. #6852 - Remove
rescript convertsubcommand. #6860 - Remove support for
@bs.send.pipe. This also removes all functions inJs_typed_arraythat rely on@bs.send.pipe. #6858 #6891 - Remove deprecated
Js.VectorandJs.List. #6900
🐛 Bug Fix
- Fix unhandled cases for exotic idents (allow to use exotic PascalCased identifiers for types). #6777 #6779 #6897
- Fix unused attribute check for
@as. #6795 - Reactivate unused attribute check for
@int. #6802 - Fix issue where using partial application
...can generate code that usesCurryat runtime. #6872 - Avoid generation of
Currywith reverse application|>. #6876 - Fix issue where the internal ppx for pipe
->would not use uncurried application in uncurried mode. #6878
🏠 Internal
- Build with OCaml 5.2.0. #6797
- Convert OCaml codebase to snake case style. #6702
- Fix
-nostdlibinternal compiler option. #6824 - Remove a number of ast nodes never populated by the .res parser, and resulting dead code. #6830
- Remove coercion with 2 types from internal representation. Coercion
e : t1 :> t2was only supported in.mlsyntax and never by the.resparser. #6829 - Convert
caml_formatandjs_mathto.res. #6834 - Convert
js.mlfiles to.res. #6835 - Remove old
.mltests. #6847 - Make compiler libs ready for uncurried mode. #6861
- Make tests ready for uncurried mode. #6862
- Make gentype tests uncurried. #6866
- Remove
@@uncurried.swap, which was used for internal tests. #6875 - Build the compiler libraries/tests in uncurried mode. #6864
- Ignore
-uncurriedcommand-line flag. #6885 - Cleanup: remove tracking of uncurried state in parser/printer. #6888
- Remove
%opaqueprimitive. #6892 - Reunify JsxC/JsxU -> Jsx etc. #6895
- Remove the transformation of
foo(1,2)intoJs.Internal.opaqueFullApply(Internal.opaque(f), 1, 2), and change the back-end to treat all applications as uncurried. #6893
💅 Polish
- Make the
--helparg be prioritized in the CLI, so correctly prints help message and skip other commands. #6667 - Remove redundant space for empty return in generated js code. #6745
- Remove redundant space for export in generated js code. #6560
- Remove redundant space after continue in generated js code. #6743
- Remove empty export blocks in generated js code. #6744
- Fix indent for returned/thrown/wrapped in parentheses objects in generated js code. #6746
- Fix indent in generated js code. #6747
- In generated code, use
letinstead ofvar. #6102 - Turn off transformation for closures inside loops when capturing loop variables, now that
letis emitted instead ofvar. #6480 - Improve unused attribute warning message. #6787
- Remove internal option
use-stdlibfrom build schema. #6778 - Fix
Js.Types.JSBigIntpayload to use nativebiginttype. #6911 - Deprecate
%externalextension, which has never been officially introduced. #6906
11.1.3
🐛 Bug Fix
- Fix tag function location on compiler error. #6816
- Fix Deno compatibility issues on Windows. #6850
- Fix issue with infinite loops with type errors on recursive types. #6867
- Ignore
@uncurryattribute in uncurried mode, to avoid generating calls toCurryat runtime. #6869 - Avoid generating calls to Curry when adjusting arity of uncurried functions. #6870
- Fix build after calling without
-warn-error, see #6868 for more details. #6877 - Fix issue with uninitialized
_paramin recursive functions with unit argument. #6907
11.1.3-rc.1
🐛 Bug Fix
- Omit standard library dir from load path if
-nostdlibis set. #6833
11.1.2
11.1.2-rc.1
🚀 New Feature
- Support Windows 11 ARM (using the x64 binaries in emulation). #6813
🐛 Bug Fix
- Fix location of let bindings with attributes. #6791
- PPX v4: mark props type in externals as
@liveto avoid dead code warnings for prop fields in the editor tooling. #6796 - Fix issue where optional labels were not taken into account when disambiguating record value construction. #6798
- Fix issue in gentype when type
Jsx.elementsurfaces to the user. #6808 - Fix inclusion check (impl vs interface) for untagged variants, and fix the outcome printer to show tags. #6669
- Fix encoding inside tagged template literals. #6810
11.1.1
11.1.0
ReScript 11.1, which builds upon the foundation laid by ReScript 11.0 earlier this year, comes with a host of exciting additions.
🚀 Highlights
- JSX for More Than React
- Tagged Template Literals
- Import Attributes
- BigInt Support
- Array Spread Syntax
- Hyphens in JSX Tag Names
- Omit Trailing Undefined in External Function Calls
%todoandwarn-error
📋 More Information
11.1.0-rc.8
🚀 New Feature
- Add
%todoextension for leaving implementation for later. #6713 - Add
-warn-errorargument for generating errors in CI. Useful for%todoextension. #6717
🐛 Bug Fix
- Improve error when using
@deriving(accessors)on a variant with record arguments. #6712 - Stop escaping JSX prop names with hyphens. #6705
- Fix trailing undefined for optional parameters not omitted with
@sendand@new. #6716 - Fix JSX4 adding the incorrect type annotation for the prop
refinReact.forwardRefcomponent. #6718 - Fix description for warning number 110. #6725
💅 Polish
- Module spec
es6andes6-globalis deprecated in favor ofesmodule. #6709