Skip to content

Commit

Permalink
Upgrade dev to ReScript 11 now that RC8 fixes the last of my problems
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpyder committed Dec 19, 2023
1 parent ddd2c02 commit 09a2b92
Show file tree
Hide file tree
Showing 15 changed files with 122 additions and 109 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Node.js bindings for ReScript

[![npm](https://img.shields.io/npm/v/rescript-nodejs.svg)](https://npmjs.org/rescript-nodejs)

## Requirements

Works on ReScript 10 or above. Supports uncurried mode in ReScript 11.

## Installation

```shell
Expand Down Expand Up @@ -31,11 +35,12 @@ Help all ReScript Node.js apps and libraries to be built faster by reducing the
## Non-Goals

- Have 100% coverage of Node.js api surface - Due to lack of testing and time for maintenance, it should only have enough surface to cover all common use cases. But it should have enough coverage that developers only rarely have to write a custom binding.
- PRs welcome if there's something you use a lot and think others will too.
- This library should be as low-level as possible (i.e. zero-cost) to allow for minimal context switching between offical Node.js documentation and the ReScript equilvalent. Due to the dynamic nature of the JS API, bending it to be idiomatic ReScript will lead to a ton of bikeshedding in design as well as sacrificing maintainability.

## Principles

- When available, prefer binding to the promise version of the library instead of the callback version to reduce binding surface. `Js.Promise` can be a bit of a pain, try [the new Promise API](https://github.com/ryyppy/rescript-promise).
- When available, prefer binding to the promise version of the library instead of the callback version to reduce binding surface. `Js.Promise2` is the new improved API.
- Use subtyping only where the benefit is substantial. Subtyping is used for various APIs that implement Node Streams, such as HTTP Request and Response, FileSystem streams, Crypto streams, and etc. This provides a single set of functions to manipulate and combine streams across different modules. For example:

### Stream a file into stdout:
Expand Down
6 changes: 3 additions & 3 deletions lib/js/examples/ReadFileByLine.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions lib/js/src/BinaryLike.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions lib/js/src/Cluster.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions lib/js/src/Errors.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/js/src/Event.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions lib/js/src/StringBuffer.bs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 09a2b92

Please sign in to comment.