Skip to content

Commit 4be9e36

Browse files
committed
Upgrade to ReScript 10 and Yarn 4
1 parent 8791c90 commit 4be9e36

17 files changed

+942
-42
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ node_modules/
77
/lib/js/src
88
/lib/js/tests/testHelpers.js
99
npm-debug.log
10+
.yarn/install-state.gz

.yarn/releases/yarn-4.0.2.cjs

Lines changed: 893 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.0.2.cjs

lib/js/examples/dom_example.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,17 @@ Belt_Option.map(Belt_Option.flatMap(Webapi__Dom__Document.asHtmlDocument(documen
3232
return Caml_option.nullable_to_opt(prim.body);
3333
})), (function (body) {
3434
body.appendChild(el);
35-
3635
}));
3736

3837
document.createElement("div").addEventListener("mousemove", (function (e) {
3938
console.log([
4039
e.screenX,
4140
e.screenY
4241
]);
43-
4442
}));
4543

4644
function handleClick(param) {
4745
console.log("clicked");
48-
4946
}
5047

5148
window.addEventListener("click", handleClick);

lib/js/examples/image_examples.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ function processImage(url) {
1414
var maybeImg = Curry._1(Webapi__Dom__HtmlImageElement.ofElement, e);
1515
maybeImg.src = url;
1616
maybeImg.addEventListener("load", (function ($$event) {
17-
return resolve($$event);
17+
resolve($$event);
1818
}));
1919
maybeImg.addEventListener("error", (function (error) {
20-
return reject(error);
20+
reject(error);
2121
}));
2222
var body = Belt_Option.flatMap(Webapi__Dom__Document.asHtmlDocument(document), (function (prim) {
2323
return Caml_option.nullable_to_opt(prim.body);
2424
}));
2525
body.appendChild(maybeImg);
2626
body.removeChild(maybeImg);
27-
2827
}));
2928
}
3029

@@ -33,7 +32,6 @@ var test = processImage(url).then(function ($$event) {
3332
var width = img.naturalWidth;
3433
var height = img.naturalHeight;
3534
console.log("width", width, "height", height);
36-
3735
});
3836

3937
exports.url = url;

lib/js/examples/webapi_example.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ var socket = new WebSocket("ws://localhost:8080");
55

66
socket.addEventListener("open", (function (param) {
77
socket.send("Hello Server!");
8-
98
}));
109

1110
socket.addEventListener("message", (function ($$event) {
1211
console.log("Message from server ", $$event.data);
13-
1412
}));
1513

1614
/* socket Not a pure module */

lib/js/tests/Webapi/Dom/Webapi__Dom__DomTokenList__test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var contains = tlist.contains("my-class");
1616

1717
tlist.forEach(function (item, param) {
1818
console.log(item);
19-
2019
});
2120

2221
tlist.remove("my-class");

lib/js/tests/Webapi/Dom/Webapi__Dom__EventTarget__test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var $$event = new Event("my-event");
88

99
function handleClick(param) {
1010
console.log("asd");
11-
1211
}
1312

1413
target.addEventListener("click", handleClick);

lib/js/tests/Webapi/Dom/Webapi__Dom__GlobalEventHandlers__test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ var Webapi__Dom__HtmlElement = require("../../../src/Webapi/Dom/Webapi__Dom__Htm
66

77
function handleSelection(param) {
88
console.log("change");
9-
109
}
1110

1211
var elm = document.createElement("strong");

lib/js/tests/Webapi/Dom/Webapi__Dom__NodeList__test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ var items = document.querySelectorAll(".item");
55

66
items.forEach(function (item, param) {
77
console.log(item);
8-
98
});
109

1110
exports.items = items;

0 commit comments

Comments
 (0)