Skip to content

12.0.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@cknitt cknitt released this 27 Jul 18:20
· 198 commits to master since this release
3f24985

🚀 New Feature

  • Allow @directive on functions for emitting function level directive code (let serverAction = @directive("'use server'") (~name) => {...}). #6756
  • Add rewatch to the npm package as an alternative build tool. #6762
  • Throws an instance of JavaScript's new Error() and adds the extension payload for cause option. #6611
  • Allow free vars in types for type coercion e :> t. #6828
  • Allow private in 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 j and js allowed names for tag functions. #6817
  • lazy syntax is no longer supported. If you're using it, use Lazy module or React.lazy_ instead. #6342
  • Remove handling of attributes with bs. prefix (@bs.as -> @as etc.). #6643
  • Remove obsolete @bs.open feature. #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 .ml to .res via format. #6848
  • Remove support for compiling .ml files, and general cleanup. #6852
  • Remove rescript convert subcommand. #6860
  • Remove support for @bs.send.pipe. This also removes all functions in Js_typed_array that rely on @bs.send.pipe. #6858 #6891
  • Remove deprecated Js.Vector and Js.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 uses Curry at runtime. #6872
  • Avoid generation of Curry with 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 -nostdlib internal 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 :> t2 was only supported in .ml syntax and never by the .res parser. #6829
  • Convert caml_format and js_math to .res. #6834
  • Convert js.ml files to .res. #6835
  • Remove old .ml tests. #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 -uncurried command-line flag. #6885
  • Cleanup: remove tracking of uncurried state in parser/printer. #6888
  • Remove %opaque primitive. #6892
  • Reunify JsxC/JsxU -> Jsx etc. #6895
  • Remove the transformation of foo(1,2) into Js.Internal.opaqueFullApply(Internal.opaque(f), 1, 2), and change the back-end to treat all applications as uncurried. #6893

💅 Polish

  • Make the --help arg 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 let instead of var. #6102
  • Turn off transformation for closures inside loops when capturing loop variables, now that let is emitted instead of var. #6480
  • Improve unused attribute warning message. #6787
  • Remove internal option use-stdlib from build schema. #6778
  • Fix Js.Types.JSBigInt payload to use native bigint type. #6911
  • Deprecate %external extension, which has never been officially introduced. #6906