Not released to @esy-ocaml/reason - would have required a major version bump. These features will be released in 3.5.0.
Improvements:
Parse and print parentheses around inline record declarations (2363)
Proper outcome printing (for editor and build) of inline records (2336)
Proper outcome printing of types with inline records (parentheses) (2370)
3.4.1
Fixes:
Don't remove semis in blocks inside ternary expressions as jsx children (2352).
Handle single line comments ending with end-of-file (2353).
3.4.0
Fixes:
Don't pun record types if they contain attributes (2316).
Improvements:
// line comments! (2268). Make sure that your constraints on refmt versions for native projects. Specify a version >= 3.4.0 if you use // comments in your Reason code. Specifiy ranges like 3.4.0-3.5.0.
WHITESPACES IMPROVEMENTS ARE HERE: empty lines between most things will now be preserved when you format your code! Multiple lines still collapse to one line in most cases (1921, 1919, 1876).
Fewer unnecessary wrappings in type declarations and negative constants (1616, 1634).
Parse and print attributes on object type rows (1637).
Better printing of externals with attributes (1640).
Better printing for multiple type equations in a module type in a function argument (1641).
Better printing for unary -. in labeled argument (1642).
3.0.0
Our biggest release! Please see our blog post on https://reasonml.github.io/blog/2017/10/27/reason3.html.
Summary: this is, practically speaking, a non-breaking change. You can mix and match two projects with different syntax versions in BuckleScript 2 (which just got release too! Go check), and they'll Just Work (tm).
To upgrade your own project, we've released a script, https://github.com/reasonml/upgradeSyntaxFrom2To3
Improvements:
Much better printing for most common idioms.
Even better infix operators formatting for ==, &&, > and the rest (1380, 1386, etc.).
More predictable keyword swapping behavior (1539).
BuckleScript's Js.t {. foo: bar} now formats to {. "foo": bar}, just like its value counterpart ([%bs.obj {foo: 1}] to {"foo": bar}.
[@foo], [@@foo] and [@@@foo] are now unified into [@foo] and placed in front instead of at the back.
! is now the logical negation. It was not previously.
Dereference was !. Now it's a postfix ^.
Labeled argument with type now has punning!
String concat is now ++ instead of the old ^.
For native, Reason now works on OCaml 4.05 and the latest topkg (1438).
Record field punning for module field prefix now prints well too: {M.x, y} is {M.x: x, y: y}.
The combination of function label renaming + type annotation + punning is now supported!
Label is now changed from ::foo back to ~foo, just like for OCaml.
Fix LOTS of bugs regarding parsing & formatting (closing around 100 improvement-related issues!).
Official refmt.js, with public API. See README.md.
Official refmt native public API too.
New JS application/abstraction syntax. Yes yes, we know. Despite the 100+ fixes, this one's all you cared about. Modern software engineering ¯\_(ツ)_/¯. Please do read the blog post though.
Breaking Changes:
Remove --use-stdin and --is-interface-pp option from refmt; they've been deprecated for a long time now
Remove unused binaries: reup, etc.
Remove the old reactjs_jsx_ppx.ml. You've all been on reactjs_jsx_ppx_2.ml for a long time now.
Reserved keywords can no longer be used as an external declaration's labels.
Deprecated:
Deprecate --add-printers option from refmt; we'll have a better strategy soon.
1.13.7
Much better infix operators (e.g. |>) formatting! (1259)
Official refmt.js, with public API. See README.md. We've back-ported this into the 1.13.7 release =)