Skip to content

Commit 860d66c

Browse files
author
Roland Peelen
committed
⬆️ - Use Rescript 11
1 parent 0c3740d commit 860d66c

File tree

10 files changed

+25
-26
lines changed

10 files changed

+25
-26
lines changed

testrepo/packages/dep01/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"author": "",
1313
"license": "MIT",
1414
"dependencies": {
15-
"rescript": "*",
16-
"@testrepo/dep02": "*"
15+
"@testrepo/dep02": "*",
16+
"rescript": "*"
1717
}
1818
}

testrepo/packages/dep01/src/Dep01.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import * as Dep02 from "@testrepo/dep02/src/Dep02.mjs";
44

5-
function log(param) {
5+
function log() {
66
console.log("02");
7-
Dep02.log(undefined);
7+
Dep02.log();
88
}
99

1010
export {

testrepo/packages/dep02/src/Array.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ function filter(prim0, prim1) {
6262

6363
function reject(t, fn) {
6464
return t.filter(function (el) {
65-
return !Curry._1(fn, el);
65+
return !fn(el);
6666
});
6767
}
6868

6969
function sortBy(t, fn) {
7070
return Belt_SortArray.stableSortBy(t, (function (a, b) {
71-
var match = Curry._2(fn, a, b);
71+
var match = fn(a, b);
7272
if (match === "greater_than") {
7373
return 1;
7474
} else if (match === "less_than") {
@@ -104,7 +104,7 @@ function eqBy(_xs, _ys, fn) {
104104
if (match$1 === undefined) {
105105
return false;
106106
}
107-
if (!Curry._2(fn, Caml_option.valFromOption(match), Caml_option.valFromOption(match$1))) {
107+
if (!fn(Caml_option.valFromOption(match), Caml_option.valFromOption(match$1))) {
108108
return false;
109109
}
110110
_ys = Belt_Array.sliceToEnd(ys, 1);
@@ -125,7 +125,7 @@ function takeWhile(t, fn) {
125125
return ;
126126
}
127127
var item = t[idx];
128-
if (!Curry._1(fn, item)) {
128+
if (!fn(item)) {
129129
return ;
130130
}
131131
a.contents = Belt_Array.concat(a.contents, [item]);
@@ -150,7 +150,7 @@ function distinct(t, eq) {
150150
var y = t[idx];
151151
var acc$1 = Belt_Array.some(acc, (function(y){
152152
return function (x) {
153-
return Curry._2(eq, x, y);
153+
return eq(x, y);
154154
}
155155
}(y))) ? acc : Belt_Array.concat(acc, [y]);
156156
_idx = idx + 1 | 0;
@@ -176,7 +176,7 @@ function partition(t, fn) {
176176
}
177177
var item = t[idx];
178178
var idx$1 = idx + 1 | 0;
179-
if (Curry._1(fn, item)) {
179+
if (fn(item)) {
180180
_idx = idx$1;
181181
_a = Belt_Array.concat(a, [item]);
182182
continue ;
@@ -205,7 +205,7 @@ function indexOfBy(t, fn, value) {
205205
if (value$p === undefined) {
206206
return ;
207207
}
208-
if (Curry._2(fn, value, Caml_option.valFromOption(value$p))) {
208+
if (fn(value, Caml_option.valFromOption(value$p))) {
209209
return idx;
210210
}
211211
_idx = idx + 1 | 0;

testrepo/packages/dep02/src/Dep02.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as $$Array from "./Array.mjs";
44
import * as NS_alias$$atNewNamespace from "@testrepo/new-namespace/src/NS_alias.mjs";
55

6-
function log(param) {
6+
function log() {
77
$$Array.forEach([
88
"a",
99
"b"
@@ -12,7 +12,7 @@ function log(param) {
1212
}));
1313
}
1414

15-
console.log(NS_alias$$atNewNamespace.hello_world(undefined));
15+
console.log(NS_alias$$atNewNamespace.hello_world());
1616

1717
export {
1818
log ,

testrepo/packages/main/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"author": "",
1313
"license": "MIT",
1414
"dependencies": {
15-
"rescript": "*",
16-
"@testrepo/dep01": "*"
15+
"@testrepo/dep01": "*",
16+
"rescript": "*"
1717
}
1818
}

testrepo/packages/main/src/Main.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as Dep01 from "@testrepo/dep01/src/Dep01.mjs";
44

55
console.log("01");
66

7-
Dep01.log(undefined);
7+
Dep01.log();
88

99
var $$Array;
1010

testrepo/packages/new-namespace/src/NS_alias.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import * as Other_module$$atNewNamespace from "./Other_module.mjs";
44

5-
function hello_world(param) {
5+
function hello_world() {
66
return "Hello world";
77
}
88

9-
Other_module$$atNewNamespace.bla(undefined);
9+
Other_module$$atNewNamespace.bla();
1010

1111
export {
1212
hello_world ,

testrepo/packages/new-namespace/src/Other_module.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generated by ReScript, PLEASE EDIT WITH CARE
22

33

4-
function bla(param) {
4+
function bla() {
55
console.log("bla");
66
}
77

testrepo/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44

55
rescript@*:
6-
version "10.1.2"
7-
resolved "https://registry.yarnpkg.com/rescript/-/rescript-10.1.2.tgz#ed3b8c762d6e22139803c16e765356685693e38c"
8-
integrity sha512-PPdhOiN+lwqxQ0qvzHc1KW0TL12LDy2X+qo/JIMIP3bMfiH0vxQH2e/lXuoutWWm04fGQGTv3hWH+gKW3/UyfA==
6+
version "11.0.0"
7+
resolved "https://registry.yarnpkg.com/rescript/-/rescript-11.0.0.tgz#9a0b6fc998c360543c459aba49b77a572a0306cd"
8+
integrity sha512-uIUwDZZmDUb7ymGkBiiGioxMg8hXh1mze/2k/qhYQcZGgi7PrLHQIW9AksM7gb9WnpjCAvFsA8U2VgC0nA468w==

tests/snapshots/remove-file.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
The module or file Dep02 can't be found.
1818
- If it's a third-party dependency:
19-
- Did you list it in bsconfig.json?
20-
- Did you run `rescript build` instead of `rescript build -with-deps`
21-
(latter builds third-parties)?
22-
- Did you include the file's directory in bsconfig.json?
19+
- Did you add it to the "bs-dependencies" or "bs-dev-dependencies" in bsconfig.json?
20+
- Did you include the file's directory to the "sources" in bsconfig.json?
21+
2322

0 commit comments

Comments
 (0)