Skip to content

Commit

Permalink
up versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Sep 11, 2024
1 parent 98eb2e8 commit 2cdaedf
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 43 deletions.
33 changes: 9 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"src/**/*.mjs"
],
"peerDependencies": {
"rescript": "^11.1.0-rc.7"
"rescript": ">=11.1.0"
},
"devDependencies": {
"@babel/code-frame": "7.18.6",
"@rescript/tools": "^0.5.0",
"rescript": "^11.1.0-rc.7"
"@rescript/tools": "0.6.4",
"rescript": "11.1.4"
}
}
2 changes: 1 addition & 1 deletion rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"suffix": ".mjs",
"package-specs": {
"module": "es6",
"module": "esmodule",
"in-source": true
},
"bs-dev-dependencies": ["@rescript/tools"],
Expand Down
17 changes: 16 additions & 1 deletion scripts/DocTests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,21 @@ function getExamples(param) {
Core__List.fromArray(match.items)
]);
continue ;
case "moduleType" :
_acc = {
hd: {
id: match.id,
kind: "moduleType",
name: match.name,
docstrings: match.docstrings
},
tl: acc
};
_items = Belt_List.concatMany([
items.tl,
Core__List.fromArray(match.items)
]);
continue ;
case "moduleAlias" :
_acc = {
hd: {
Expand Down Expand Up @@ -306,7 +321,7 @@ async function main() {
var id = example.id.replaceAll(".", "_");
var codes = getCodeBlocks(example);
var results = await Promise.all(codes.map(async function (code, $$int) {
var id$1 = id + "_" + $$int.toString(undefined);
var id$1 = id + "_" + $$int.toString();
return await testCode(id$1, code);
}));
return [
Expand Down
5 changes: 5 additions & 0 deletions scripts/DocTests.res
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ let getExamples = ({items}: Docgen.doc) => {
list{...rest, ...List.fromArray(items)},
list{{id, name, docstrings, kind: "module"}, ...acc},
)
| list{ModuleType({id, name, docstrings, items}), ...rest} =>
loop(
list{...rest, ...List.fromArray(items)},
list{{id, name, docstrings, kind: "moduleType"}, ...acc},
)
| list{ModuleAlias({id, name, docstrings, items}), ...rest} =>
loop(
list{...rest, ...List.fromArray(items)},
Expand Down
2 changes: 1 addition & 1 deletion test/TypedArrayTests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function assertWillThrow(message, f) {
}

function areSame(x, y) {
return x.toString(undefined) === y.toString(undefined);
return x.toString() === y.toString();
}

assertTrue("fromArray", (function () {
Expand Down
6 changes: 3 additions & 3 deletions test/intl/Intl__CollatorTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ console.log("---");

console.log("Intl.Collator");

new Intl.Collator(undefined, undefined);
new Intl.Collator();

new Intl.Collator(["en-US"], undefined);
new Intl.Collator(["en-US"]);

var _collator = new Intl.Collator([
"en-US",
"en-GB"
], undefined);
]);

var collator = new Intl.Collator(["en-US"], {
sensitivity: "base",
Expand Down
2 changes: 1 addition & 1 deletion test/intl/Intl__DateTimeFormatTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var formatter$6 = new Intl.DateTimeFormat(undefined, (newrecord$4.timeZoneName =

console.log(formatter$6.format(new Date(Date.now())));

var resolvedOptions = new Intl.DateTimeFormat(undefined, undefined).resolvedOptions();
var resolvedOptions = new Intl.DateTimeFormat().resolvedOptions();

var timeZone = resolvedOptions.timeZone;

Expand Down
4 changes: 2 additions & 2 deletions test/intl/Intl__ListFormatTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ console.log("---");

console.log("Intl.ListFormat");

new Intl.ListFormat(undefined, undefined);
new Intl.ListFormat();

new Intl.ListFormat([
"en-US",
"en-GB"
], undefined);
]);

var _formatter = new Intl.ListFormat([
"en-US",
Expand Down
2 changes: 1 addition & 1 deletion test/intl/Intl__LocaleTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ console.log("---");

console.log("Intl.Locale");

var _locale = new Intl.Locale("en-US", undefined);
var _locale = new Intl.Locale("en-US");

var locale = new Intl.Locale("en-US", {
calendar: "hebrew",
Expand Down
4 changes: 2 additions & 2 deletions test/intl/Intl__PluralRulesTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ console.log("---");

console.log("Intl.PluralRules");

new Intl.PluralRules(undefined, undefined);
new Intl.PluralRules();

new Intl.PluralRules([
"en-US",
"en-GB"
], undefined);
]);

var _formatter = new Intl.PluralRules(undefined, {
type: "ordinal",
Expand Down
4 changes: 2 additions & 2 deletions test/intl/Intl__RelativeTimeFormatTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Intl.RelativeTimeFormat.supportedLocalesOf([
localeMatcher: "lookup"
});

new Intl.RelativeTimeFormat(undefined, undefined);
new Intl.RelativeTimeFormat();

new Intl.RelativeTimeFormat([
"en-US",
"en-GB"
], undefined);
]);

var _formatter = new Intl.RelativeTimeFormat(undefined, {
numeric: "always",
Expand Down
4 changes: 2 additions & 2 deletions test/intl/Intl__SegmenterTest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Intl.Segmenter.supportedLocalesOf([
localeMatcher: "lookup"
});

new Intl.Segmenter(undefined, undefined);
new Intl.Segmenter();

new Intl.Segmenter([
"en-US",
"en-GB"
], undefined);
]);

var _formatter = new Intl.Segmenter(undefined, {
granularity: "word"
Expand Down

0 comments on commit 2cdaedf

Please sign in to comment.