Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions lib/js/src/Cluster.bs.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"changie": "^1.18.0",
"onchange": "^7.1.0",
"pta": "^1.2.0",
"rescript": "^11.0.1",
"rescript": "^11.1.0",
"zora": "^5.2.0"
},
"files": [
Expand Down
File renamed without changes.
21 changes: 19 additions & 2 deletions src/Buffer.res
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,25 @@ external readUintBE: (t, ~offset: int, ~length: int) => float = "readUintBE"
@send
external readUintLE: (t, ~offset: int, ~length: int) => float = "readUintLE"

@send external slice: (t, ~start: int, ~end_: int) => t = "slice"
@send external sliceToEnd: (t, ~start: int) => t = "slice"
@send
external readBigInt64BE: (t, ~offset: int) => bigint = "readBigInt64BE"
Copy link
Contributor Author

@muqiuhan muqiuhan Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI says there are compilation errors here:

   We've found a bug for you!
  /home/runner/work/rescript-nodejs/rescript-nodejs/src/Buffer.res:276:47-52

  274275 │ @send
  276external readBigInt64BE: (t, ~offset: int) => bigint = "readBigInt64BE
      │ "
  277278 │ @send

  This type constructor, `bigint`, can't be found.
  If you wanted to write a recursive type, don't forget the `rec` in `type rec`

But rescript 11.1 already treats bigint as primitive type: Primitive Types | Big Integer.


Maybe it's because the rescript version in the devDependencies of the current project is 11.0.1:

  "devDependencies": {
    "rescript": "^11.0.1",
  },

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this repo is quite out of date, feel free to upgrade.


@send
external readBigInt64LE: (t, ~offset: int) => bigint = "readBigInt64LE"

@send
external readBigUint64BE: (t, ~offset: int) => bigint = "readBigUInt64BE"

@send
external readBigUint64LE: (t, ~offset: int) => bigint = "readBigUInt64LE"

@deprecated("Use `subarray` instead") @send
external slice: (t, ~start: int, ~end_: int) => t = "slice"
@deprecated("Use `subarrayToEnd` instead") @send
external sliceToEnd: (t, ~start: int) => t = "slice"

@send external subarray: (t, ~start: int, ~end_: int) => t = "subarray"
@send external subarrayToEnd: (t, ~start: int) => t = "subarray"

@send external swap16: t => t = "swap16"
@send external swap32: t => t = "swap32"
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -971,19 +971,19 @@ __metadata:
changie: "npm:^1.18.0"
onchange: "npm:^7.1.0"
pta: "npm:^1.2.0"
rescript: "npm:^11.0.1"
rescript: "npm:^11.1.0"
zora: "npm:^5.2.0"
languageName: unknown
linkType: soft

"rescript@npm:^11.0.1":
version: 11.0.1
resolution: "rescript@npm:11.0.1"
"rescript@npm:^11.1.0":
version: 11.1.4
resolution: "rescript@npm:11.1.4"
bin:
bsc: bsc
bstracing: lib/bstracing
rescript: rescript
checksum: a37dc757a14c57a15fe75a12df52f3d564cc6ef5cacc8356fe70a7d4ab9692736c0fbb56456dff090d8b5b18935a09aed066c623e6764f4c76bed61187e611b7
checksum: 7f12186a84209f586457a60e65755fcdfbcbb503ac805c60ab5132ce4c927bc264c3b851419ed5498ba7dc4066723377bb7453f893f482a0ccd424986d02beba
languageName: node
linkType: hard

Expand Down