Skip to content

Releases: melange-re/melange

1.0.0-alpha.1

30 May 23:00
Compare
Choose a tag to compare
1.0.0-alpha.1 Pre-release
Pre-release

CHANGES:

  • melange: print an error message if $MELANGELIB is set to a directory that
    doesn't exist (#449)
  • melange: fix bug where --bs-module-name didn't always affect generated JS
    file casing (#446)
  • melange: fix bug where -o output.js didn't always write a JavaScript file
    (#454)
  • melange: remove the -bs-read-cmi flag in favor of the builtin
    -intf-suffix flag, standard in OCaml
    (#458,
    #460)
  • melange: return an actionable error message when no output is specified
    with -impl / -intf
    (#465,
    #466)
  • melange: use Object.prototype.hasOwnProperty in the Caml_obj runtime
    (#469)
  • melange: transform
    NonEscapeCharacter
    correctly in JS strings (those written using {js|string here|js})
    (#469)
  • melange: define MELANGE conditional compilation variable
    (#472)
  • melange: Make Pervasives exactly match the Stdlib behavior
    (#476)
  • melange: fix unbound error when trying to use Printexc.exn_slot_id
    (#482)
  • melange: fix codegen issue accessing a nested module path that is also
    included (#487)
  • melange: preserve the correct command-line order for load path directories
    (#492)
  • melange: respect the -nostdlib option; don't add stdlib / runtime to the
    load path in that case
    (#496)
  • melange: build the Melange runtime / stdlib / runtime tests with the dune
    integration (#493). Thus
    melange now requires Dune 3.8.
  • melange: allow shadowing sub-modules of Stdlib in user projects
    (#512)
  • melange, reactjs-jsx-ppx: introduce a reactjs-jsx-ppx package, remove its
    dependency from melange
    (#517)
  • melange: remove the --bs-jsx <version> flag from melc now that
    reactjs-jsx-ppx is a separate package
    (#525)
  • melange: add melpp executable to preprocess #if conditionals with the
    melange parser (#539)
  • mel: delete the mel package. The dune integration is now the only
    officially supported workflow for orchestrating melange builds
    (#546)
  • melange: Extract melange.ppx from the melange package. This preprocessing
    step interprets extensions such as %bs.obj, %bs.raw, %bs.re, etc.
    (#534)
  • melange: allow installing melange in more OCaml versions and compiler
    switches. Melange now migrates binary AST to the version it understands
    (#548)
  • melange: don't run anonymous args function from
    [@@@bs.config {flags = [| ... |]}] attributes
    (#554)
  • melange: add --preamble flag to add a preamble to emitted JS. An example is
    "use client"; in React Server Components, which needs to appear before
    imports (#545,
    #574)
  • melange: turn off warning 20 (ignore-extra-argument) by default. This
    warning is rarely useful in Melange due to false positives when invoking
    functions defined with %bs.raw
    (#488,
    #576)

0.3.2

20 Nov 07:19
01aa3e8
Compare
Choose a tag to compare

CHANGES:

  • ppx_rescript_compat (ReScript compatibility layer): fix conversion for
    cases such as foo["bar"] = assignment
    (#441):
    • These are now correctly converted to the OCaml equivalent:
      foo##bar #= assignment
  • [mel]: fix merlin generation, broken since mel was moved to its own package
    (#442)

0.3.1

16 Nov 22:58
db4e70c
Compare
Choose a tag to compare

CHANGES:

  • Disable warning 69 (unused-field in record) for the private record
    generated by the bs.deriving attribute
    (#414)
  • Disable warning 20 (ignored-extra-argument) when applying
    foo##fn arg1 arg2
    (#416):
    • in cases such as external x : < .. > Js.t = "", the typechecker doesn't
      know the arity of the function, even though Melange will emit an uncurried
      function call.
  • Disable warning 61 (unboxable-type-in-prim-decl) in external declarations
    (#415):
    • Melange externals are substantially different from OCaml externals. This
      warning doesn't make sense in a JS runtime.
  • melc: introduce --bs-module-name flag to specify the original file name for
    the current compilation unit
    (#413)
    • Dune's namespacing implementation generates modules such as
      lib__Original_name. Passing --bs-module-name original_name allows
      melange to issue correct import / require statements to the unmangled
      JS file names.

0.3.0

06 Nov 21:51
Compare
Choose a tag to compare

CHANGES:

  • [melange] Introduce 2 explicit modes of JavaScript compilation:
    • "Batch compilation": produces .cmj and .js files at the same time (this
      is the previous behavior -- using --bs-package-output MODULE_SYSTEM:REL_PATH:JS_EXTENSION)
    • "Separate emission": produces only .cmj files with --bs-stop-after-cmj --bs-package-output REL_PATH_ONLY, and allows emitting JavaScript files
      separately, with --bs-module-type MODULE_SYSTEM -o TARGET_FILE.JS_EXTENSION
      (#384)
  • [mel]: Fix mel build --watch exiting after the first change
    (#401)
  • [melange]: Remove dependency on reason. Reason syntax users should install reason from their preferred package manager instead, and Melange / Dune will
    find it in $PATH (#409)
  • [melange]: Remove dependency on napkin (the ReScript syntax parser). Users
    that depend on libraries written in ReScript syntax should install the mel
    package and Melange / Dune will find the rescript_syntax binary in $PATH
    (#411)

0.2.0

24 Oct 23:41
Compare
Choose a tag to compare

CHANGES:

  • Initial release supporting OCaml 4.14.