Socket
Socket
Sign inDemoInstall

rescript

Package Overview
Dependencies
Maintainers
5
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rescript - npm Package Versions

1
56

10.0.0-m1

Diff

hongbo_zhang
published 9.1.3 •

Changelog

Source

9.1.3 (bug fix release)

Build

  • #5154 when toplevel package-specs get changed, its dependencies should be rebuilt
  • #5152 Rebuild not triggered when deletion with nested modules
  • #5153 when Different compiler version triggered, it should clean the whole dependencies instead of just the repo itself
  • #5080 Add back -ws option for the build

Syntax

  • #425 fix CRLF handling for windows
  • #414 Fix printing of underscore Pexp_fun sugar in context of Array.get
  • #408 Don't parse Int token with suffices as hash ident for poly variants
  • #410 Fix parsing of arrow type with objects in constructor declaration args
  • #404 fix printing of Osig_module in outcome printer
  • #402 Implement printing of Otyp_module in outcome printer

9.1

  • Remove depercated APIs Js.Re.exec, Js.Re.test, Node.Fs.on
  • #5014 #5063 #5027 the new ReScript CLI interface Thew new CLI is self explainatory:
rescript -h
Available flags
-v, -version  display version number
-h, -help     display help
Subcommands:
    build
    clean
    format
    convert
    help
Run rescript subcommand -h for more details,
For example:
    rescript build -h
    rescript format -h
  • #5025 in place format support, this is subsumed into rescript format subcommand
  • #5060 #5055 Add formatting support for stdin/sdout
  • #5053 #5050 clean up structural object semantics
  • #5037 Allows coercion from nullary types to int/string. This applies to collections types too
  • #5029 int polyvar is compiled into int. #0 is the same as 0 except it is structually typed as #0
  • #5023 generate interface file in rescript syntax by default
  • #5021 makes int64 runtime payload small for just comparison
  • #5019, #5017, #5016, #5015, #5010 improve error message
  • #5008 don't trigger a rebuild if mjs file changes, fix an infinite loop in watch mode
  • #5005 not depending on Format for Arg module, smaller size
  • #4985 fix the schema of bsb on dev property
  • #4967 #4986, #4984, #4971, #4972, #4969 Breaking changes Remove ocaml style classes while structural objects and structural typings are simplified. Js.t is no longer needed. If user does not know what ocaml style class is, this should not affect them.
hongbo_zhang
published 10.0.0-nightly.1 •

hongbo_zhang
published 9.1.2 •

hongbo_zhang
published 9.1.1-dev.2 •

hongbo_zhang
published 9.1.1-dev.1 •

hongbo_zhang
published 9.1.1 •

hongbo_zhang
published 9.1.0 •

hongbo_zhang
published 9.1.0-dev.1 •

caspervonb
published 0.0.0 •

Changelog

Source

10.0.0

Compiler

:boom: Breaking Change
  • bsconfig.json does not support // line comments anymore.
    • Example: "suffix": ".bs.js" // determine the suffix
    • Fix: remove the comment and use standard json.
  • Changed return type of Js.String.match_ as it was wrong. #5070
    • Example: any use of Js.String.match_ and Js.String2.match_
    • Fix: follow the type errors
  • GenType is now vendored in the compiler and drops support for the Flow and untyped back-ends to focus on providing a better experience for TypeScript.
    • Fix: keep on using the older version of the compiler and the separate genType package if Flow support is required. Migrate to TS if one wants to upgrade the compiler version.
:rocket: New Feature
  • New records with optional fields e.g. type opt = {x: int, y?: string} were added as an experimental feature #5423 #5452 New Syntax
  • Add support for @new @variadic (see https://github.com/rescript-lang/rescript-compiler/pull/5364)
:bug: Bug Fix
  • Classify bigint correctly #5351
  • Fixed crash in rescript build on Windows #5516
  • Fixed rescript init command not working #5526
  • Fix issue with compiler log not terminated that causes problems with editor extension not clearing issues when fixed #5545
:nail_care: Polish
  • Changed Linux build to depend on GLIBC 2.28 again for compatibility with Debian 10.

  • Proper M1 support (CI now supports M1 native builds)

Syntax

:boom: Breaking Change
  • @bs.send.pipe is now removed. Earlier it was deprecated.
  • Missing labels in function application is now an error (https://forum.rescript-lang.org/t/ann-more-strict-checks-in-missed-labels/2117).
    • Example: let f = (x, ~z) => x + z; f(1, 2)
    • Fix: do let f = (x, ~z) => x + z; f(1, ~z=2) instead
  • Externals without @val annotations do not work anymore, and externals with = "" give an error.
    • Example: external setTimeout: (unit => unit, int) => float = "setTimeout" is not supported anymore.
    • Fix: use @val external setTimeout: (unit => unit, int) => float = "setTimeout" instead.
    • Example2: @val external setTimeout: (unit => unit, int) => float = "" is not supported anymore.
    • Fix2: use @val external setTimeout: (unit => unit, int) => float = "setTimeout" instead.
  • Strings processed at compile-time don't need escaping anymore.
    • Example: let blockCommentsRe = %re("/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\//g").
    • Fix: use let blockCommentsRe = %re("/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g") instead.
  • Remove parsing of "import" and "export" which was never officially supported https://github.com/rescript-lang/syntax/pull/597 https://github.com/rescript-lang/syntax/pull/599
    • Example: export type t = int
    • Fix: @genType type t = int
    • Example2: import realValue: complexNumber => float from "./MyMath"
    • Fix2: @genType.import("./MyMath") external realValue: complexNumber => float = "realValue"
:rocket: New Feature
  • Unicode is now supported in regular strings and chars (when the symbol fits). This is now going to work: let str = "Σ". And, you'll be able to pattern match on unicode chars: switch c { | 'Σ' => "what a fine unicode char" | _ => "unicode is fun" }
  • Doc comments /** ... */ are now supported. Inernally, they are attributes, so are only valid at positions where @foo is allowed, or a syntax error is given. Similarly for module-level /*** comments */ that can go where @@attributes go.
:bug: Bug Fix
  • Fix printing for inline nullary functor types #477
  • Fix stripping of quotes for empty poly variants #474
  • Implement syntax for arity zero vs arity one in uncurried application in #139
  • Fix parsing of first class module exprs as part of binary/ternary expr in #256
  • Fix formatter hanging on deeply nested function calls #261

Libraries

:boom: Breaking Change
  • "Attributes not allowed here". If you see this error chances are you're using a ppx that needs updating to a new version. See an exampe of how to update a ppx
    • Example: for rescript-relay 0.23.0 is not supported.
    • Fix: use rescript-relay@beta or the new version when released.
  • Removed printing modules (Printf, Format etc) and related functions. Details of files added/removed: https://github.com/rescript-lang/rescript-compiler/commit/0fd8bb0e77c4b0e96a9647ac8af614305057003f.
:bug: Bug Fix
  • Fix library issue with missing bytes_to_string https://github.com/rescript-lang/rescript-compiler/issues/5573 https://github.com/rescript-lang/rescript-compiler/pull/5589
:nail_care: Polish
  • Several Belt / Js libraries are now converted to ReScript syntax, with corresponding comments in Markdown format suitable for hovering. See #5361.

Playground

:house: Internal
  • Added jsoo_playground_main.ml as the rescript-lang.org playground bundle entrypoint
:boom: Breaking Change
  • Removed Reason syntax support for the playground experience. See https://github.com/rescript-lang/rescript-compiler/pull/5375
1
56
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