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

10.1.0-alpha.2

Diff

Changelog

Source

10.1.0-alpha.2

:rocket: New Feature
  • Fix pretty printer where it would print doc comments on the same line as other attributes https://github.com/rescript-lang/syntax/pull/642
  • Propagte "jsx" configuration to dependencies https://github.com/rescript-lang/rescript-compiler/pull/5661
  • Add support for empty record literal {} for records where all fields are optional https://github.com/rescript-lang/rescript-compiler/pull/5658
  • Add support for empty record type (e.g. type empty = {}) https://github.com/rescript-lang/rescript-compiler/pull/5658
:bug: Bug Fix
  • Fix issue in formatting JSX spread props https://github.com/rescript-lang/syntax/pull/644
  • Fix location issue in error messages with JSX V4 where the body of the component is an application https://github.com/rescript-lang/syntax/pull/633
  • Fix printing of type declarations in error message where they would be considered recursive by default
  • Fix issue where the printer would omit attributes for -> and |> https://github.com/rescript-lang/syntax/pull/629
  • Fix printing of optional fields in records https://github.com/rescript-lang/rescript-compiler/issues/5654
  • Fix printing of comments inside empty blocks https://github.com/rescript-lang/syntax/pull/647
:nail_care: Polish
  • Improvements and fixes for JSX V4. See guide https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md
  • Mention all missing fields in error message for records, not just one https://github.com/rescript-lang/rescript-compiler/pull/5657
cknittel
published 10.1.0-alpha.1 •

Changelog

Source

10.1.0-alpha.1

:boom: Breaking Change
  • Pipe -> does not support a code block on the right-hand side e.g. x->{ open A; get("test") }
:rocket: New Feature
  • Experimental support for for async/await https://github.com/rescript-lang/rescript-compiler/pull/5537
  • Make promise a built-in type https://github.com/rescript-lang/rescript-compiler/pull/5650
  • Initial support for JSX V4 including genType, still work in progress.
    • :boom: when V4 is activated, at most one component is allowed for each module.
  • Add placeholder types for ES6 collections: Set, Map, WeakSet, and WeakMap https://github.com/rescript-lang/rescript-compiler/pull/5630
:bug: Bug Fix
  • Fix issue with arrays and creation of recursive values https://github.com/rescript-lang/rescript-compiler/pull/5640
  • Fix issue where characters such as newlines would be escaped in a template string expression https://github.com/rescript-lang/rescript-compiler/issues/5638
  • Fix issue where pipe -> processing eats up attributes https://github.com/rescript-lang/rescript-compiler/pull/5581
  • Fix issue where cancelling rescript build would leave the .bsb.lock file behind and block future builds
:nail_care: Polish
  • Print patterns in warnings using rescript printer https://github.com/rescript-lang/rescript-compiler/pull/5492
cknittel
published 10.0.1 •

Changelog

Source

10.0.1

:bug: Bug Fix
  • Fix issue where watch mode would give an error on Windows https://github.com/rescript-lang/rescript-compiler/pull/5621
cknittel
published 10.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
cknittel
published 10.0.0-rc.1 •

cknittel
published 10.0.0-beta.3 •

cknittel
published 10.0.0-beta.2 •

cknittel
published 10.0.0-beta.1 •

cknittel
published 10.0.0-alpha.1 •

hongbo_zhang
published 9.1.4 •

Changelog

Source

9.1.4

Build

  • #5167 add dump subcommand so that
rescript dump path/to/file.cmi

Will dump the interface to a readable output, note this is integrated into the build system that the build will try to build it if it is not already there

  • clean will clean its dependency by default. subcommand clean -with-deps, -with-deps is not needed any more
  • hide most bsc options, officially supported bsc flags (this is not a breaking change, those internal options are still there but subject to removal in the future)
Usage: bsc <options> <files>
Options are:
Options:
  -w                        <list>  Enable or disable warnings according to <list>:
                            +<spec>   enable warnings in <spec>
                            -<spec>   disable warnings in <spec>
                            @<spec>   enable warnings in <spec> and treat them as errors
                            <spec> can be:
                            <num>             a single warning number
                            <num1>..<num2>    a range of consecutive warning numbers
                            default setting is +a-4-9-20-40-41-42-50-61-102
  -bs-g                     Debug mode
  -bs-D                     Define conditional variable e.g, -D DEBUG=true
  -e                        (experimental) set the string to be evaluated in ReScript syntax
  -v                        Print compiler version and location of standard library and exit
  -version                  Print version and exit
  -warn-help                Show description of warning numbers
  -warn-error               <list>  Enable or disable error status for warnings according
                            to <list>.  See option -w for the syntax of <list>.
                            Default setting is -a+5+6+101+109

Syntax

  • #432 bad error message for unterminated quote

Compiler

  • #5165 bad error message for uncurried type mistmatch
  • #5169 fix a code gen issue with user defined None
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