Skip to content

2.0.0

Compare
Choose a tag to compare
@anmonteiro anmonteiro released this 14 Sep 01:24
· 342 commits to main since this release
4651013

CHANGES:

  • Build executables for bytecode-only platforms too (#596)
  • Move the entire builtin PPX to melange.ppx. Preprocessing with melange.ppx will needed in most cases going forward, as it's responsible for processing external declarations, @deriving attributes and more, compared to the previous release where melange.ppx just processed AST extension nodes (#583)
  • Remove old BuckleScript-style conditional compilation (#605)
  • Don't emit JS import / require paths with foo/./bar.js (#598, #612)
  • Wrap the melange runtime (#624, #637). After this change, Melange exposes fewer toplevel modules. Melange runtime / stdlib modules are now wrapped under:
    • Caml* / Curry modules are part of the runtime and keep being exposed as before
    • Js.* contains all the modules previously accessible via Js_*, e.g. Js_int -> Js.Int
    • Belt.* wraps all the Belt modules; Belt_List etc. are not exposed anymore, but rather nested under Belt, e.g. Belt.List
    • Node.*: we now ship a melange.node library that includes the modules containing Node.js bindings. After this change, users will have to depend on melange.node explicitly in order to use the Node.* modules.
    • Dom.*: we now ship a melange.dom library that includes the modules containing Node.js bindings. After this change, users will have to depend on melange.dom explicitly in order to use the Dom.* module.
  • Disable warning 61 (unboxable-type-in-prim-decl) for externals generated by Melange (#641, #643)
  • Add --rectypes (#644) to enable recursive types
  • [melange.ppx]: Deprecate bs.* attributes in favor of mel.* (#566,
    #662, #663)
  • [melange]: Fix field access code generation when openin inline functor applications (#661, #664)
  • [melange]: Upgrade the OCaml typechecker version to 5.1 (#668)
  • [melange.ppx]: Deprecate [@@mel.val] and suggest its removal. This attribute is redundant and unnecessary (#675, #678)
  • [melange]: remove old, unused CLI flags: -bs-ns, -bs-cmi, -bs-cmj, -bs-no-builtin-ppx, -bs-super-errors (#686).
  • [melange]: generate correct code for types with the option shape (#700).
  • [melange]: stop exporting $$default in the generated JavaScript when using ES6 default exports let default = .. (#708).
  • [melange]: allow exporting invalid OCaml identifiers in the resulting JavaScript with @mel.as (#714, fixes #713).
  • [melange]: Allow using @mel.as in external declarations without explicitly annotating @mel.{string,int} ([#722 (https://github.com//pull/722), fixes #578).
  • [melange]: Allow using @mel.unwrap in external declarations with @mel.obj (#724, fixes #679).
  • [melange]: Support renaming fields in inline records / record extensions with @mel.as (#732, fixes #730).