From 0f787db37208ca5547c7a9f2df00d1c82bd0967a Mon Sep 17 00:00:00 2001 From: nojaf Date: Tue, 3 Jun 2025 21:23:21 +0200 Subject: [PATCH 1/3] Use latest rewatch --- .github/workflows/ci.yml | 5 ----- package-lock.json | 2 +- package.json | 4 ++-- src/CanvasAPI/FillStyle.res | 1 - src/FetchAPI/Headers.res | 1 - src/FetchAPI/URLSearchParams.res | 1 - 6 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d9a23e..fe2fc64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,6 @@ jobs: - name: Install dependencies run: npm ci - # There is a bug in the ReScript compiler where it tries to compile the test files before finishing the source files - - name: Build ReScript code - run: npm run build - continue-on-error: true - - name: Rebuild ReScript code run: npm run build diff --git a/package-lock.json b/package-lock.json index ff14e4b..759d4fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "rescript": "^12.0.0-alpha.9" + "rescript": "^12.0.0-alpha.13" }, "devDependencies": { "@astrojs/starlight": "0.34.3", diff --git a/package.json b/package.json index 9bf952b..c23b825 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "type": "module", "scripts": { "test": "node tests/index.js", - "build": "rescript", + "build": "rewatch --dev", "format": "rescript format -all && prettier --write ./tests/index.js ./package.json ./docs/pages", "docs": "astro dev", "prebuild:docs": "node docs/llm.js", @@ -36,7 +36,7 @@ }, "license": "MIT", "dependencies": { - "rescript": "^12.0.0-alpha.9" + "rescript": "^12.0.0-alpha.13" }, "devDependencies": { "@astrojs/starlight": "0.34.3", diff --git a/src/CanvasAPI/FillStyle.res b/src/CanvasAPI/FillStyle.res index fdf4be2..cd71c4d 100644 --- a/src/CanvasAPI/FillStyle.res +++ b/src/CanvasAPI/FillStyle.res @@ -1,6 +1,5 @@ open Prelude open CanvasAPI -open DOMAPI external fromString: string => fillStyle = "%identity" external fromCanvasGradient: canvasGradient => fillStyle = "%identity" diff --git a/src/FetchAPI/Headers.res b/src/FetchAPI/Headers.res index ed70403..8880792 100644 --- a/src/FetchAPI/Headers.res +++ b/src/FetchAPI/Headers.res @@ -1,5 +1,4 @@ open FetchAPI -open Prelude /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Headers) diff --git a/src/FetchAPI/URLSearchParams.res b/src/FetchAPI/URLSearchParams.res index a09c66a..4f98df6 100644 --- a/src/FetchAPI/URLSearchParams.res +++ b/src/FetchAPI/URLSearchParams.res @@ -1,5 +1,4 @@ open FetchAPI -open Prelude /** [Read more on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams) From cdd42b9351be287e63ba73c7e77787ed9d80d567 Mon Sep 17 00:00:00 2001 From: nojaf Date: Tue, 3 Jun 2025 21:31:42 +0200 Subject: [PATCH 2/3] Use rewatch in tests --- tests/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/index.js b/tests/index.js index ab8ad15..63369f4 100644 --- a/tests/index.js +++ b/tests/index.js @@ -9,7 +9,7 @@ const repoRoot = path.resolve(currentDir, ".."); const testsDir = path.join(repoRoot, "tests"); // Compile all tests -execSync("npx rescript", { cwd: repoRoot, stdio: "inherit" }); +execSync("npm run build", { cwd: repoRoot, stdio: "inherit" }); const successGreen = "\x1b[32m"; const warningYellow = "\x1b[33m"; From 46740dcc4363c79239aa3386c79ad2fd1c32b0bf Mon Sep 17 00:00:00 2001 From: nojaf Date: Tue, 3 Jun 2025 21:44:51 +0200 Subject: [PATCH 3/3] Use open Global --- tests/WebStorageAPI/Storage__test.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/WebStorageAPI/Storage__test.res b/tests/WebStorageAPI/Storage__test.res index 4a7d2dc..a430b94 100644 --- a/tests/WebStorageAPI/Storage__test.res +++ b/tests/WebStorageAPI/Storage__test.res @@ -1,4 +1,4 @@ -open WebAPI.Global +open Global open WebAPI.Storage for i in 0 to localStorage.length - 1 {