Skip to content

Commit 64ea2c8

Browse files
committed
Update test scripts to 9.0.2
1 parent 94b730e commit 64ea2c8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

compilers/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compilers/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "index.js",
66
"license": "MIT",
77
"dependencies": {
8+
"rescript-902": "npm:[email protected]",
89
"rescript-820": "npm:[email protected]"
910
}
1011
}

scripts/test-examples.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let tempFileNameRegex = /_tempFile\.res/g
99
// TODO: In the future we need to use the appropriate rescript version for each doc version variant
1010
// see the package.json on how to define another rescript version
1111
let compilersDir = path.join(__dirname, "..", "compilers")
12-
let bsc = path.join(compilersDir, 'node_modules', 'rescript-820', process.platform, 'bsc.exe')
12+
let bsc = path.join(compilersDir, 'node_modules', 'rescript-902', process.platform, 'bsc.exe')
1313

1414
const prepareCompilers = () => {
1515
if (fs.existsSync(bsc)) {
@@ -76,7 +76,8 @@ glob.sync(__dirname + '/../pages/docs/manual/latest/**/*.mdx').forEach((file) =>
7676
if (parsedResult != null) {
7777
fs.writeFileSync(tempFileName, parsedResult)
7878
try {
79-
child_process.execFileSync(bsc, ['-i', tempFileName], {stdio: 'pipe'})
79+
// -109 for suppressing `Toplevel expression is expected to have unit type.`
80+
child_process.execFileSync(bsc, ['-i', tempFileName, '-w', '-109'], {stdio: 'pipe'})
8081
} catch (e) {
8182
process.stdout.write(postprocessOutput(file, e))
8283
success = false

0 commit comments

Comments
 (0)