diff --git a/package-lock.json b/package-lock.json index a55033b..509165a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5754,9 +5754,9 @@ } }, "node_modules/rescript": { - "version": "12.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-12.0.0-alpha.8.tgz", - "integrity": "sha512-I2YQ0vECymKY29j+/h51Z2A//0DgLf7g9mx5sNaWwR5fwrwTNzHS0MGIKiGfix+xJwLRteh4ighAqKeMWVQdjg==", + "version": "12.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-12.0.0-alpha.9.tgz", + "integrity": "sha512-h1RHv3AGge/td+4s3mufCyJkBQ+/OcQtu3RyvQjR0c3SZJNB87G/0LESoa7FLlKokwjtX+fpcIoQP9WK2PDAqQ==", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { @@ -10502,9 +10502,9 @@ } }, "rescript": { - "version": "12.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-12.0.0-alpha.8.tgz", - "integrity": "sha512-I2YQ0vECymKY29j+/h51Z2A//0DgLf7g9mx5sNaWwR5fwrwTNzHS0MGIKiGfix+xJwLRteh4ighAqKeMWVQdjg==" + "version": "12.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/rescript/-/rescript-12.0.0-alpha.9.tgz", + "integrity": "sha512-h1RHv3AGge/td+4s3mufCyJkBQ+/OcQtu3RyvQjR0c3SZJNB87G/0LESoa7FLlKokwjtX+fpcIoQP9WK2PDAqQ==" }, "retext": { "version": "9.0.0", diff --git a/tests/DOMAPI/AddEventListener__test.js b/tests/DOMAPI/AddEventListener__test.js index 3abccd6..4657ca4 100644 --- a/tests/DOMAPI/AddEventListener__test.js +++ b/tests/DOMAPI/AddEventListener__test.js @@ -1,6 +1,6 @@ // Generated by ReScript, PLEASE EDIT WITH CARE -import * as Int from "rescript/lib/es6/Int.js"; +import * as Stdlib_Int from "rescript/lib/es6/Stdlib_Int.js"; import * as Primitive_option from "rescript/lib/es6/Primitive_option.js"; let button = document.querySelector("button"); @@ -15,7 +15,7 @@ if (button !== null && h2 !== null) { h2.textContent = "1"; return; } - let number = Int.fromString(text, undefined); + let number = Stdlib_Int.fromString(text, undefined); if (number !== undefined) { h2.textContent = (number + 1 | 0).toString(); } else { diff --git a/tests/DOMAPI/HTMLElement__test.js b/tests/DOMAPI/HTMLElement__test.js index ff3085e..b9687e0 100644 --- a/tests/DOMAPI/HTMLElement__test.js +++ b/tests/DOMAPI/HTMLElement__test.js @@ -1,9 +1,9 @@ // Generated by ReScript, PLEASE EDIT WITH CARE -import * as Option from "rescript/lib/es6/Option.js"; +import * as Stdlib_Option from "rescript/lib/es6/Stdlib_Option.js"; import * as Primitive_option from "rescript/lib/es6/Primitive_option.js"; -Option.forEach(Primitive_option.fromNull(document.querySelector("form")), form => { +Stdlib_Option.forEach(Primitive_option.fromNull(document.querySelector("form")), form => { form.scrollIntoView({ behavior: "smooth" }); diff --git a/tests/ServiceWorkerAPI/ServiceWorker__test.js b/tests/ServiceWorkerAPI/ServiceWorker__test.js index be7eb20..d3e2f39 100644 --- a/tests/ServiceWorkerAPI/ServiceWorker__test.js +++ b/tests/ServiceWorkerAPI/ServiceWorker__test.js @@ -1,6 +1,6 @@ // Generated by ReScript, PLEASE EDIT WITH CARE -import * as Option from "rescript/lib/es6/Option.js"; +import * as Stdlib_Option from "rescript/lib/es6/Stdlib_Option.js"; import * as Primitive_option from "rescript/lib/es6/Primitive_option.js"; self.addEventListener("push", event => { @@ -9,7 +9,7 @@ self.addEventListener("push", event => { let match; if (data !== undefined) { let match$1 = Primitive_option.valFromOption(data).json(); - if (typeof match$1 === "object" && !Array.isArray(match$1)) { + if (typeof match$1 === "object" && match$1 !== null && !Array.isArray(match$1)) { let title = match$1.title; if (typeof title === "string") { let body = match$1.body; @@ -59,7 +59,7 @@ self.addEventListener("push", event => { self.addEventListener("notificationclick", event => { console.log("notification clicked: " + event.action); event.notification.close(); - Option.forEach(Option.flatMap(event.notification.data, data => { + Stdlib_Option.forEach(Stdlib_Option.flatMap(event.notification.data, data => { if (typeof data === "number") { return data.toString(); } diff --git a/tests/WebStorageAPI/Storage__test.js b/tests/WebStorageAPI/Storage__test.js index ca08ebb..657e6b9 100644 --- a/tests/WebStorageAPI/Storage__test.js +++ b/tests/WebStorageAPI/Storage__test.js @@ -1,12 +1,12 @@ // Generated by ReScript, PLEASE EDIT WITH CARE -import * as Null from "rescript/lib/es6/Null.js"; +import * as Stdlib_Null from "rescript/lib/es6/Stdlib_Null.js"; for (let i = 0, i_finish = localStorage.length; i < i_finish; ++i) { - console.log(Null.getOr(localStorage.key(i), "nothing")); + console.log(Stdlib_Null.getOr(localStorage.key(i), "nothing")); } -let item1 = Null.getOr(localStorage.getItem("foo"), "nothing"); +let item1 = Stdlib_Null.getOr(localStorage.getItem("foo"), "nothing"); localStorage.setItem("bar", "...");