diff --git a/CHANGELOG.md b/CHANGELOG.md index 40452ce..bf46c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # main - Add bindings for `Response.json()`. https://github.com/zth/rescript-bun/pull/5 - - Return JSON data with `Response.makeWithJson` - - Return any data type with `Response.makeWithJsonUnsafe` +- Return JSON data with `Response.makeWithJson` +- Return any data type with `Response.makeWithJsonUnsafe` +- Upgrade to ReScript `>=11.1.0` and Core `>=1.3.0`. +- Fix issue with bigint type. # 0.4.1 diff --git a/README.md b/README.md index e86779c..86ef8a7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Use [Bun](https://bun.sh) with ReScript. **Template repo to get up and running quickly: https://github.com/zth/rescript-bun-starter** -You need to be on at least a recent RC of ReScript v11. This is designed for uncurried mode so you should use that as well (`"uncurried": true` in your bsconfig/`rescript.json`). +You need to be on ReScript v11 `>=11.1.0` and Core `>=1.3.0`. This is designed for uncurried mode so you should use that as well (`"uncurried": true` in your bsconfig/`rescript.json`). Install `rescript-bun` and `@rescript/core`: diff --git a/package-lock.json b/package-lock.json index ca81826..4e204d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,27 +9,27 @@ "version": "0.4.1", "license": "MIT", "devDependencies": { - "@rescript/core": "1.0.0", - "rescript": "11.1.0-rc.2" + "@rescript/core": "1.3.0", + "rescript": "11.1.1" }, "peerDependencies": { - "@rescript/core": ">=1.0.0", - "rescript": ">=11.0.0 || ^11.1.0-rc.2" + "@rescript/core": ">=1.3.0", + "rescript": ">=11.1.0" } }, "node_modules/@rescript/core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rescript/core/-/core-1.0.0.tgz", - "integrity": "sha512-F5HURYYx8Kp6h1KBiri2nFwGKR16o9/XTCNl2TEWfCwqR+MTzf/lpuPuB6ajnaYytsU0kTUBIFI0DOoLgkDxSg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@rescript/core/-/core-1.3.0.tgz", + "integrity": "sha512-wNZOZ63sYcaIYZCmTZeIPCeLa3HCGgPbIOR8zjyNkoBYUlxNV8Nb2ZyqlXR5Mb9ttvv8fTV56JbKhyVEZEYo8g==", "dev": true, "peerDependencies": { - "rescript": ">=11.0.0 || ^11.1.0-rc.2" + "rescript": "^11.1.0-rc.7" } }, "node_modules/rescript": { - "version": "11.1.0-rc.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.0-rc.2.tgz", - "integrity": "sha512-kCUtmsODEUF1Eth5ppc+yIK79HLI7CwRs1R4iopDek4FC58IqHSLT3K1XHGB39YCWuOuV9WMly+wksHRJcSLcw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.1.tgz", + "integrity": "sha512-FMELeoiR1n3LzBdBt+k7U4l0vsz5Xh0HBSHf+0NhyhzZkMRLkEKEDNrcqZc6RIux9bxmxoO+zEa9qFM01VOXAw==", "dev": true, "hasInstallScript": true, "bin": { diff --git a/package.json b/package.json index e5a90c4..fe49d9e 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "author": "Gabriel Nordeborn", "license": "MIT", "devDependencies": { - "@rescript/core": "1.0.0", - "rescript": "11.1.0-rc.2" + "@rescript/core": "1.3.0", + "rescript": "11.1.1" }, "peerDependencies": { - "rescript": ">=11.0.0 || ^11.1.0-rc.2", - "@rescript/core": ">=1.0.0" + "rescript": ">=11.1.0", + "@rescript/core": ">=1.3.0" } } diff --git a/rescript.json b/rescript.json index d60803d..9530186 100644 --- a/rescript.json +++ b/rescript.json @@ -14,7 +14,7 @@ } ], "package-specs": { - "module": "es6", + "module": "esmodule", "in-source": true }, "suffix": ".js", diff --git a/src/Bun.res b/src/Bun.res index 138cd38..cafa6ba 100644 --- a/src/Bun.res +++ b/src/Bun.res @@ -1189,11 +1189,11 @@ module Hash = { module Algorithms = { module WyHash = { - external hashString: (string, ~seed: BigInt.t=?) => BigInt.t = "Bun.hash.wyhash" - external hashArrayBufferView: (ArrayBufferView.t, ~seed: BigInt.t=?) => BigInt.t = + external hashString: (string, ~seed: bigint=?) => bigint = "Bun.hash.wyhash" + external hashArrayBufferView: (ArrayBufferView.t, ~seed: bigint=?) => bigint = "Bun.hash.wyhash" - external hashArrayBuffer: (ArrayBuffer.t, ~seed: BigInt.t=?) => BigInt.t = "Bun.hash.wyhash" - external hashSharedArrayBuffer: (SharedArrayBuffer.t, ~seed: BigInt.t=?) => BigInt.t = + external hashArrayBuffer: (ArrayBuffer.t, ~seed: bigint=?) => bigint = "Bun.hash.wyhash" + external hashSharedArrayBuffer: (SharedArrayBuffer.t, ~seed: bigint=?) => bigint = "Bun.hash.wyhash" } @@ -1224,12 +1224,12 @@ module Hash = { } module CityHash64 = { - external hashString: (string, ~seed: BigInt.t=?) => BigInt.t = "Bun.hash.cityHash64" - external hashArrayBufferView: (ArrayBufferView.t, ~seed: BigInt.t=?) => BigInt.t = + external hashString: (string, ~seed: bigint=?) => bigint = "Bun.hash.cityHash64" + external hashArrayBufferView: (ArrayBufferView.t, ~seed: bigint=?) => bigint = "Bun.hash.cityHash64" - external hashArrayBuffer: (ArrayBuffer.t, ~seed: BigInt.t=?) => BigInt.t = + external hashArrayBuffer: (ArrayBuffer.t, ~seed: bigint=?) => bigint = "Bun.hash.cityHash64" - external hashSharedArrayBuffer: (SharedArrayBuffer.t, ~seed: BigInt.t=?) => BigInt.t = + external hashSharedArrayBuffer: (SharedArrayBuffer.t, ~seed: bigint=?) => bigint = "Bun.hash.cityHash64" } @@ -1252,12 +1252,12 @@ module Hash = { } module Murmur64v2 = { - external hashString: (string, ~seed: BigInt.t=?) => BigInt.t = "Bun.hash.murmur64v2" - external hashArrayBufferView: (ArrayBufferView.t, ~seed: BigInt.t=?) => BigInt.t = + external hashString: (string, ~seed: bigint=?) => bigint = "Bun.hash.murmur64v2" + external hashArrayBufferView: (ArrayBufferView.t, ~seed: bigint=?) => bigint = "Bun.hash.murmur64v2" - external hashArrayBuffer: (ArrayBuffer.t, ~seed: BigInt.t=?) => BigInt.t = + external hashArrayBuffer: (ArrayBuffer.t, ~seed: bigint=?) => bigint = "Bun.hash.murmur64v2" - external hashSharedArrayBuffer: (SharedArrayBuffer.t, ~seed: BigInt.t=?) => BigInt.t = + external hashSharedArrayBuffer: (SharedArrayBuffer.t, ~seed: bigint=?) => bigint = "Bun.hash.murmur64v2" } } diff --git a/src/Cluster.js b/src/Cluster.js index 3f5b8a1..618be46 100644 --- a/src/Cluster.js +++ b/src/Cluster.js @@ -21,15 +21,6 @@ function classify(x) { TAG: "TcpV4", _0: x }; - case 0 : - case 1 : - case 2 : - case 3 : - case 5 : - return { - TAG: "Unknown", - _0: x - }; case 6 : return { TAG: "TcpV6", diff --git a/src/Process.res b/src/Process.res index 55cfdca..6d696c8 100644 --- a/src/Process.res +++ b/src/Process.res @@ -145,7 +145,7 @@ external nextTickApply5: (t, @uncurry ('a, 'b, 'c, 'd, 'e) => unit, 'a, 'b, 'c, "nextTick" @send external hrtime: t => (int, int) = "hrtime" @send @scope("hrtime") -external hrtimeBigInt: t => BigInt.t = "bigint" +external hrtimeBigInt: t => bigint = "bigint" @get external stderr: t => Stream.Writable.t = "stderr" @get external stdin: t => Stream.Readable.t = "stdin" @get external stdout: t => Stream.Writable.t = "stdout" diff --git a/test/Shell.test.js b/test/Shell.test.js index f420a6e..ef4f7ae 100644 --- a/test/Shell.test.js +++ b/test/Shell.test.js @@ -7,7 +7,7 @@ Buntest.describe("shell", (function () { Buntest.test("basic commands work", (async function () { var res = await $$Bun.$`echo "HELLO"`; Buntest.expect(res.stdout.toString()).toBe("HELLO\n"); - }), undefined); + })); })); export {