Releases: rescript-lang/rescript
Releases · rescript-lang/rescript
12.0.0-beta.11
💥 Breaking Change
- Have
String.charCodeAtreturnoption<int>; addString.charCodeAtUnsafe. #7877 - Remove support of JSX children spread. #7869
🚀 New Feature
- Add
Array.filterMapWithIndexto Stdlib. #7876
🐛 Bug fix
- Fix code generation for emojis in polyvars and labels. #7853
- Add
resettoexperimental_featuresto correctly reset playground. #7868 - Fix crash with
@geton external of typeunit => 'a. #7866 - Fix record type spreads in inline records. #7859
💅 Polish
- Reactivate optimization for length of array literals. #7872
Float.isNaN: useNumber.isNaNinstead of globalisNaN. #7874
🏠 Internal
12.0.0-beta.10
🚀 New Feature
- Support mapping more standard library types automatically to TS types via
gentype, without requiring shims. #7842
🐛 Bug fix
- Show
Stdlib.TypedArraycompletions for typed arrays. #7827 - Show
Stdlib.NullandStdlib.Nullablecompletions forStdlib.null<'a>andStdlib.nullable<'a>types, respectively. #7826 - Fix generation of interfaces for module types containing multiple type constraints. #7825
- JSX preserve mode: fix "make is not a valid component name". #7831
- Rewatch: include parser arguments of experimental features. #7836
- Stop mangling tagged templates and backquoted strings. #7841
- JSX v4: fix arity mismatch for
@react.componentwithReact.forwardRef. #7845
💅 Polish
12.0.0-beta.9
💥 Breaking Change
- Extract ReScript runtime files from main
rescriptpackage to separate@rescript/runtimepackage. #7796 - Remove
@rescript/std(in favor of@rescript/runtime). #7811
🚀 New Feature
- Add support for
ArrayBufferand typed arrays to@unboxed. #7788 - Experimental: Add
let?syntax for unwrapping and propagating errors/none as early returns for option/result types. #7582 - Add support for shipping features as experimental, including configuring what experimental features are enabled in
rescript.json. #7582
🐛 Bug fix
- Fix JS regex literal parsing in character classes. #7790
- Fix creating interface for functions with upper bounded polymorphic args. #7786
💅 Polish
- Make parser less strict around leading attributes. #7787
- Dedicated error message for ternary type mismatch. #7804
- Dedicated error message for passing a braced ident to something expected to be a record. #7806
- Hint about partial application when missing required argument in function call. #7807
- More autocomplete improvements involving modules and module types. #7795
- Autocomplete
@react.componentWithPropsattribute. #7812 - Add some missing iframe attributes to
domProps. #7813 - Polish error message for inline record escaping scope. #7808
- Formatter: Change placement of closing
>in JSX. #7803
🏠 Internal
- Build runtime with rewatch on Windows, too. #7794
12.0.0-beta.7
🚀 New Feature
- Add markdown divider between module doc and module type in hover information. #7775
- Show docstrings before type expansions on hover. #7774
- Autocomplete (and improved hovers) for first-class module unpacks. #7780
🐛 Bug fix
- Preserve
@as(...)decorator on record fields when creating interface. #7779 - Fix parse error with nested record types and attributes on the field name that has the nested record type. #7781
- Fix ppx resolution with package inside monorepo. #7776
- Fix 'Unbound module type' errors that occurred when trying to async import modules. #7783
💅 Polish
12.0.0-beta.6
💥 Breaking Change
rescript formatno longer accepts--all. All (non-dev) files of the current rescript.json are now formatted by default. #7752
🚀 New Feature
- Add new Stdlib helpers:
String.capitalize,String.isEmpty,Dict.size,Dict.isEmpty,Array.isEmpty,Map.isEmpty,Set.isEmpty. #7516
🐛 Bug fix
- Fix issue with ast conversion (for ppx use) on functions with attributes on first argument. #7761
💅 Polish
rescript formatnow has a--devflag that works similar torescript clean. #7752rescript cleannow will clean an individual project (see #7707). #7752rescript cleanwill log multiplein-sourceextensions if present. #7769
🏠 Internal
- AST: Use jsx_tag_name instead of Longindent.t to store jsx tag name. #7760
12.0.0-beta.5
🐛 Bug fix
- Fix formatting of nested records in
.resifiles. #7741 - Don't format and don't check formatting of dependencies. #7748
- Fix
rescript-editor-analysis semanticTokensreturning invalid JSON in certain cases. #7750
📝 Documentation
- Update jsx schema configuration. #7755
💅 Polish
- Read package name from rescript.json if package.json is absent. #7746
🏠 Internal
12.0.0-beta.4
🐛 Bug fix
- Fix error message that falsely suggested using coercion when it wouldn't work. #7721
- Fix hang in
rescript-editor-analysis.exe codeActionthat sometimes prevented ReScript files from being saved in VS Code. #7731 - Fix formatter removing () from functor type. #7735
- Rewatch: don't compile dev-dependencies of non local dependencies with
--dev. #7736
💅 Polish
- Apply heuristic to suggest using JSX fragments where we guess that might be what the user wanted. #7714
- Show deprecation warnings for
bs-dependenciesetc. for local dependencies only. #7724 - Add check for minimum required node version. #7723
- Use more optional args in stdlib and deprecate some functions. #7730
- Improve error message for when trying to do dot access on an option/array. #7732
12.0.0-beta.3
💥 Breaking Change
Result.getOrThrownow throws a JS error instead of aNot_foundReScript exception. #7630- Remove
rescript dumpcommand.bsccan be used directly to dump the contents of a.cmifile instead if needed. #7710
🚀 New Feature
- Add optional
messageargument toResult.getOrThrowand improve default error message. #7630 - Add
RegExp.escapebinding. #7695
🐛 Bug fix
- Fix
--create-sourcedirsgeneration with for a single project. #7671 - Fix rewatch not recompiling on changes on Windows. #7690
- Fix locations of regex literals. #7683
- Fix async React component compilation. #7704
- Fix
@thiswithasynckeyword. #7702
💅 Polish
- Configuration fields
bs-dependencies,bs-dev-dependenciesandbsc-flagsare now deprecated in favor ofdependencies,dev-dependenciesandcompiler-flags. #7658 - Better error message if platform binaries package is not found. #7698
- Hint in error for string constants matching expected variant/polyvariant constructor. #7711
- Polish arity mismatch error message a bit. #7709
- Suggest related functions with the expected arity in errors when it makes sense. #7712
- Improve error when a constructor expects an inline record. #7713
- Remove
@methattribute. #7684
🏠 Internal
12.0.0-beta.2
💥 Breaking Change
- Rust implementation of the
rescript formatcommand. Command line options changed from-all,-checkand-stdinto--all,--checkand--stdincompared to the legacy implementation. #7603
🚀 New Feature
- Add experimental command to
rescript-toolsfor extracting all ReScript code blocks from markdown, either a md-file directly, or inside of docstrings in ReScript code. #7623
🐛 Bug fix
- Fix
typeofparens on functions. #7643 - Rewatch: Add
--devflag to clean command. #7622 - Rewatch: Use root package suffix in clean log messages. #7648
- Fix inside comment printing for empty dict. #7654
- Fix I/O error message when trying to extract extra info from non-existing file. #7656
- Fix fatal error when JSX expression used without configuring JSX in
rescript.json. #7656 - Rewatch: Only allow access to
"bs-dev-dependencies"from"type": "dev"source files. #7650
💅 Polish
- Add missing backtick and spaces to
Belt.Map.mapdoc comment. #7632 - AST: store the attributes directly on function arguments. #7660
🏠 Internal
- Remove internal/unused
-bs-vflag. #7627 - Remove unused
-bs-Dand-bs-list-conditionalsflags. #7631 - Remove obsolete jsx options. #7633
- Remove obsolete option
-bs-unsafe-empty-array. #7635 - Clean up
config.ml. #7636 - Rewatch: simplify getting bsc path. #7634
- Rewatch: only get
"type": "dev"source files for local packages. #7646 - Rewatch: add support for
rescript -wfor compatibility. #7649
12.0.0-beta.1
🚀 New Feature
- Add experimental command to
rescript-toolsfor formatting all ReScript code blocks in markdown. Either in a markdown file directly, or inside of docstrings in ReScript code. #7598 - Add
String.getSymbolUnsafeback to Stdlib. #7626
💅 Polish
- Add a warning if the name in package.json does not match the name in rescript.json. #7604
🏠 Internal
- Remove uncurried handling from rewatch. #7625