Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rescript

Package Overview
Dependencies
Maintainers
4
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rescript - npm Package Versions

1
8

11.0.0-beta.4

Diff

Changelog

Source

11.0.0-beta.4

:rocket: New Feature
  • Variants: Allow coercing from variant to variant where applicable. https://github.com/rescript-lang/rescript-compiler/pull/6314
  • Variants: Experimental support for spreading variant type definitions to copy constructors from one variant to another. https://github.com/rescript-lang/rescript-compiler/pull/6316
:boom: Breaking Change
  • Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. https://github.com/rescript-lang/rescript-compiler/pull/6317
:bug: Bug Fix
  • Fixed outcome printing of uncurried higher order function types. https://github.com/rescript-lang/rescript-compiler/pull/6323
  • Fixed printing of type constraints in template literal substitutions. https://github.com/rescript-lang/rescript-compiler/pull/6324
cknittel
published 11.0.0-beta.3 •

Changelog

Source

11.0.0-beta.3

:rocket: New Feature
  • Untagged variants: consider regexp as an object type. https://github.com/rescript-lang/rescript-compiler/pull/6296
  • Semantic-based optimization of code generated for untagged variants. https://github.com/rescript-lang/rescript-compiler/issues/6108
  • Record type spreads: Allow using type variables in type spreads. Both uninstantiated and instantiated ones. https://github.com/rescript-lang/rescript-compiler/pull/6309
  • Variants: Allow coercing variants to string/int/float when applicable. https://github.com/rescript-lang/rescript-compiler/pull/6311
:bug: Bug Fix
  • Fix issue with dynamic import of modules in expressions. https://github.com/rescript-lang/rescript-compiler/pull/6310
cknittel
published 11.0.0-beta.2 •

Changelog

Source

11.0.0-beta.2

:rocket: New Feature
  • Introduced a new %ffi extension (experimental - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251
  • Extended untagged variants with function types. https://github.com/rescript-lang/rescript-compiler/pull/6279
:boom: Breaking Change
  • Remove rudimentary node bindings and undocumented %node extension. https://github.com/rescript-lang/rescript-compiler/pull/6285
:bug: Bug Fix
  • Fix issue where uncurried type internals leak in type error. https://github.com/rescript-lang/rescript-compiler/pull/6264
  • Improve error messages for untagged variant definition. https://github.com/rescript-lang/rescript-compiler/pull/6290
  • Fix type checking performance issue for large records. https://github.com/rescript-lang/rescript-compiler/pull/6289
cknittel
published 11.0.0-beta.1 •

Changelog

Source

11.0.0-beta.1

:rocket: Main New Feature
  • Make uncurried mode opt-out: by default, every project is now in uncurried mode, unless "uncurried": false is specified in the project config. https://github.com/rescript-lang/rescript-compiler/pull/6249
:nail_care: Polish
  • Removed duplicate Super_error implementation in syntax. https://github.com/rescript-lang/rescript-compiler/pull/6246
:bug: Bug Fix
  • Fix issue with inlining records in the presence of record coercion. https://github.com/rescript-lang/rescript-compiler/pull/6256
cknittel
published 11.0.0-alpha.6 •

Changelog

Source

11.0.0-alpha.6

:boom: Breaking Change
  • -bs-super-errors flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript-compiler/pull/6243
  • @rescript/react >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript-compiler/pull/6238
:bug: Bug Fix
  • Remove unnecessary require and import statements when using dynamic imports. https://github.com/rescript-lang/rescript-compiler/pull/6232
  • Fix option unboxing logic in the presence of untagged variants. https://github.com/rescript-lang/rescript-compiler/pull/6233
  • Fix printing of local module with type. https://github.com/rescript-lang/rescript-compiler/issues/6212
  • Adapting JSX4 to React.fragment's children type change ('children -> React.element) https://github.com/rescript-lang/rescript-compiler/pull/6238
:nail_care: Polish
  • In uncurried mode, outcome printer swaps curried and uncurries function printing compared to legacy.
  • Add location information to duplicate type definition error messages. https://github.com/rescript-lang/rescript-compiler/pull/6199
  • Replace normal module errors with Super_error module, and clean up Super_error. https://github.com/rescript-lang/rescript-compiler/pull/6199
  • Js.Json.t, Js.null and Js.nullable are now untagged variants representing their runtime values, instead of abstract types. https://github.com/rescript-lang/rescript-compiler/pull/6218
cknittel
published 11.0.0-alpha.5 •

Changelog

Source

11.0.0-alpha.5

:rocket: Main New Feature
  • Add support for Dynamic import. https://github.com/rescript-lang/rescript-compiler/pull/5703
  • GenType: Add moduleResolution option to customize extensions on emitted import statements. This helps to adjust output compatibility with TypeScript projects using ESM. https://github.com/rescript-lang/rescript-compiler/pull/6182
    • node (default): Drop extensions.
    • node16: Use TS output's extensions. Make it ESM-compatible.
    • bundler: Use TS input's extensions. Make it ESM-compatible.
  • Make untagged variants understand payloads defined as records. https://github.com/rescript-lang/rescript-compiler/pull/6208
:boom: Breaking Change
  • Parse assert as a regular function. assert is no longer a unary expression. Example: before assert 1 == 2 is parsed as (assert 1) == 2, now it is parsed as assert(1 == 2). https://github.com/rescript-lang/rescript-compiler/pull/6180
:bug: Bug Fix
  • Make "rescript format" work with node 10 again and set minimum required node version to 10 in package.json. https://github.com/rescript-lang/rescript-compiler/pull/6186
  • Fix partial application for uncurried functions with labeled args https://github.com/rescript-lang/rescript-compiler/pull/6198
  • Add error messages for dangling doc comments/attributes and mutable in record type definition. https://github.com/rescript-lang/rescript-compiler/pull/6206
  • Fix issue with overlapping array and object in untagged variants https://github.com/rescript-lang/rescript-compiler/pull/6219
cknittel
published 11.0.0-alpha.4 •

Changelog

Source

11.0.0-alpha.4

:rocket: Main New Feature
  • Add surface syntax for partial application of uncurried functions: foo(1, ...). This corresponds to curried application in the old mode. https://github.com/rescript-lang/rescript-compiler/pull/6166
:bug: Bug Fix
  • Fix broken formatting in uncurried mode for functions with _ placeholder args. https://github.com/rescript-lang/rescript-compiler/pull/6148
  • Fix issue where spreading record types with optional labels would not have their labels preserved as optional. https://github.com/rescript-lang/rescript-compiler/pull/6154
  • Fix error location to be the type with the spreads when spreading record types with duplicate labels. https://github.com/rescript-lang/rescript-compiler/pull/6157
  • Disable warning on @inline attibute on uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6152
  • Support doc comments on arguments of function types. https://github.com/rescript-lang/rescript-compiler/pull/6161
  • Fix issue with record type coercion and unboxed. https://github.com/rescript-lang/rescript-compiler/issues/6158
  • Fixed subtype checking for record types with "@as" attributes: The subtype relationship now takes into account the compatibility of "@as" attributes between corresponding fields, ensuring correctness in runtime representation. https://github.com/rescript-lang/rescript-compiler/issues/6158
  • Emit directive above header comment. https://github.com/rescript-lang/rescript-compiler/pull/6172
  • Add error message to private extension. https://github.com/rescript-lang/rescript-compiler/pull/6175
:nail_care: Polish
  • Update list of reserved JS keywords. https://github.com/rescript-lang/rescript-compiler/pull/6167
  • Add error message to @@directive. https://github.com/rescript-lang/rescript-compiler/pull/6174
cknittel
published 11.0.0-alpha.3 •

Changelog

Source

11.0.0-alpha.3

:rocket: Main New Feature
  • Add support for extensible records (e.g. type t = {...t1, x:int, ...t2}) https://github.com/rescript-lang/rescript-compiler/pull/5715
:bug: Bug Fix
  • Fix formatting and parentheses placement in uncurried functions with constraints. https://github.com/rescript-lang/rescript-compiler/pull/6143
cknittel
published 11.0.0-alpha.2 •

Changelog

Source

11.0.0-alpha.2

:rocket: Main New Feature
  • Add support for type coercion :> for records. https://github.com/rescript-lang/rescript-compiler/pull/5721
:bug: Bug Fix
  • Special case generation of uncurried functions with 1 argument of unit type so they don't take a parameter. https://github.com/rescript-lang/rescript-compiler/pull/6131
cknittel
published 11.0.0-alpha.1 •

Changelog

Source

11.0.0-alpha.1

:rocket: Main New Feature
  • Introduce experimental uncurried mode. For experimentation only. PR #5796
  • Customization of runtime representation of variants and introduction of untagged variants PR #6095, PR #6103
:rocket: New Feature
  • Add support for uncurried mode: a mode where everything is considered uncurried, whether with or without the .. This can be turned on with @@uncurried locally in a file. For project-level configuration in bsconfig.json, there's a boolean config "uncurried", which propagates to dependencies, to turn on uncurried mode. Since there's no syntax for partial application in this new mode, introduce @res.partial foo(x) to express partial application. This is temporary and will later have some surface syntax. Make uncurried functions a subtype of curried functions, and allow application for uncurried functions. The make function of components is generated as an uncurried function. Use best effort to determine the config when formatting a file. https://github.com/rescript-lang/rescript-compiler/pull/5968 https://github.com/rescript-lang/rescript-compiler/pull/6080 https://github.com/rescript-lang/rescript-compiler/pull/6086 https://github.com/rescript-lang/rescript-compiler/pull/6087
  • Customization of runtime representation of variants. This is work in progress. E.g. some restrictions on the input. See comments of the form "TODO: put restriction on the variant definitions allowed, to make sure this never happens". https://github.com/rescript-lang/rescript-compiler/pull/6095
  • Introduce untagged variants https://github.com/rescript-lang/rescript-compiler/pull/6103
  • Add support for unary uncurried pipe in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/5804
  • Add support for partial application of uncurried functions: with uncurried application one can provide a subset of the arguments, and return a curried type with the remaining ones https://github.com/rescript-lang/rescript-compiler/pull/5805
  • Add support for uncurried externals https://github.com/rescript-lang/rescript-compiler/pull/5815 https://github.com/rescript-lang/rescript-compiler/pull/5819 https://github.com/rescript-lang/rescript-compiler/pull/5830 https://github.com/rescript-lang/rescript-compiler/pull/5894
  • Parser/Printer: unify uncurried functions of arity 0, and of arity 1 taking unit. There's now only arity 1 in the source language. https://github.com/rescript-lang/rescript-compiler/pull/5825
  • Add support for default arguments in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5835
  • Inline uncurried application when it is safe https://github.com/rescript-lang/rescript-compiler/pull/5847
  • Support optional named arguments without a final unit in uncurried functions https://github.com/rescript-lang/rescript-compiler/pull/5907
  • GenType: add the option to use the @genType annotation at the module level, meaning that all the items in the module should be exported. https://github.com/rescript-lang/rescript-compiler/pull/6113
  • GenType: add support for @genType annotations on module definitions. https://github.com/rescript-lang/rescript-compiler/pull/6113
  • Prebuilt binaries are now provided for all major platforms:
    • macOS x64
    • macOS ARM
    • Linux x64 (statically linked)
    • Linux ARM (statically linked)
    • Windows x64
:boom: Breaking Change
  • Remove support for the legacy Reason syntax. Existing Reason code can be converted to ReScript syntax using ReScript 9 as follows:
    • npm i -g rescript@9
    • rescript convert <reason files>
  • Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by create-rescript-app which is maintained separately.
  • Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore.
  • Made pinned dependencies transitive: if a is a pinned dependency of b and b is a pinned dependency of c, then a is implicitly a pinned dependency of c. This change is only breaking if your build process assumes non-transitivity.
  • Curried after uncurried is not fused anymore: (. x) => y => 3 is not equivalent to (. x, y) => 3 anymore. It's instead equivalent to (. x) => { y => 3 }. Also, (. int) => string => bool is not equivalen to (. int, string) => bool anymore. These are only breaking changes for unformatted code.
  • Exponentiation operator ** is now right-associative. 2. ** 3. ** 2. now compile to Math.pow(2, Math.pow(3, 2)) and not anymore Math.pow(Math.pow(2, 3), 2). Parentheses can be used to change precedence.
  • Remove unsafe j`$(a)$(b)` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068
  • Remove deprecated module Printexc
  • @deriving(jsConverter) not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088
  • New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088
  • GenType: removed support for @genType.as for records and variants which has become unnecessary. Use the language's @as instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript-compiler/pull/6099 https://github.com/rescript-lang/rescript-compiler/pull/6101
:bug: Bug Fix
  • Fix issue where uncurried was not supported with pipe https://github.com/rescript-lang/rescript-compiler/pull/5803
  • Fix printing of nested types in uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/5826
  • Fix issue in printing uncurried callbacks https://github.com/rescript-lang/rescript-compiler/pull/5828
  • Fix formatting uncurried functions with attributes https://github.com/rescript-lang/rescript-compiler/pull/5829
  • Fix parsing/printing uncurried functions with type parameters https://github.com/rescript-lang/rescript-compiler/pull/5849
  • Fix compiler ppx issue when combining async and uncurried application https://github.com/rescript-lang/rescript-compiler/pull/5856
  • Fix issue where the internal representation of uncurried types would leak when a non-function is applied in a curried way https://github.com/rescript-lang/rescript-compiler/pull/5892
  • Fix some comments disappearing in array access expressions https://github.com/rescript-lang/rescript-compiler/pull/5947
  • Parser: fix location of variable when function definition {v => ...} is enclosed in braces https://github.com/rescript-lang/rescript-compiler/pull/5949
  • Fix issue with error messages for uncurried functions where expected and given type were swapped https://github.com/rescript-lang/rescript-compiler/pull/5973
  • Fix issue with integer overflow check https://github.com/rescript-lang/rescript-compiler/pull/6028
  • Make internal encoding of locations aware of unicode https://github.com/rescript-lang/rescript-compiler/pull/6073
  • Fix issue where foo(x,_) in uncurried mode would generate a curried function https://github.com/rescript-lang/rescript-compiler/pull/6082
  • Fix printing of uncurried application when the lhs is a function definition https://github.com/rescript-lang/rescript-compiler/pull/6084
  • Fix parsing uncurried type starting with path https://github.com/rescript-lang/rescript-compiler/pull/6089
  • Fix bigInt comparison https://github.com/rescript-lang/rescript-compiler/pull/6097
  • Fixed a bug where the async attribute was not preserved when using the @this decorator in ReScript functions. This fix allows proper handling of async functions with the @this decorator. Issue: https://github.com/rescript-lang/rescript-compiler/issues/6100
  • Fix issue with GenType and module aliases https://github.com/rescript-lang/rescript-compiler/issues/6112
:nail_care: Polish
  • Syntax: process uncurried types explicitly in the parser/printer https://github.com/rescript-lang/rescript-compiler/pull/5784 https://github.com/rescript-lang/rescript-compiler/pull/5822
  • Syntax: process uncurried function declarations explicitly in the parser/printer https://github.com/rescript-lang/rescript-compiler/pull/5794
  • PPX V4: allow uncurried make function and treat it like a curried one #5802 #5808 #5812
  • Remove processing of objects expressions, which don't exist in .res syntax (Pexp_object) https://github.com/rescript-lang/rescript-compiler/pull/5841
  • Remove class type processing from compiler ppx https://github.com/rescript-lang/rescript-compiler/pull/5842
  • Remove method application via operator ##, which does not exist in .res syntax https://github.com/rescript-lang/rescript-compiler/pull/5844
  • Treat @meth annotation as making the type uncurried for backwards compatibitly with some examples https://github.com/rescript-lang/rescript-compiler/pull/5845
  • Process @set annotation for field update as generating an uncurried function https://github.com/rescript-lang/rescript-compiler/pull/5846
  • Treat uncurried application of primitives like curried application, which produces better output https://github.com/rescript-lang/rescript-compiler/pull/5851
  • New internal representation for uncurried functions using built-in type function$<fun_type, arity> this avoids having to declare all the possible arities ahead of time https://github.com/rescript-lang/rescript-compiler/pull/5870
  • PPX V3: allow uncurried make function and treat it like a curried one https://github.com/rescript-lang/rescript-compiler/pull/6081
  • Add support for |> in uncurried mode by desugaring it https://github.com/rescript-lang/rescript-compiler/pull/6083
  • Change the compilation of pattern matching for variants so it does not depends on variats being integers https://github.com/rescript-lang/rescript-compiler/pull/6085
  • Improve code generated for string templates https://github.com/rescript-lang/rescript-compiler/pull/6090
  • Move Jsx and JsxDOM and JsxEvent and JsxPPXReactSupport inside Pervasives and build them separately for curried and uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6091
  • Gentype: allow recursive data types https://github.com/rescript-association/genType/issues/585
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc