Skip to content

Commit

Permalink
update test ci to work around node 20 ts esm issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Dec 15, 2023
1 parent e6b3c9b commit 247e6e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fable": {
"version": "4.6.0",
"version": "4.9.0",
"commands": [
"fable"
]
Expand Down
2 changes: 1 addition & 1 deletion build/TestTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module RunMt =
let ts = BuildTask.create "runMtTs" [clean; build] {
let ts_folder_name = "ts"
run dotnet $"fable {rootPath} --lang ts -o {rootPath}/{ts_folder_name}" ""
run npx $"ts-node {rootPath}/{ts_folder_name}/Main.ts" ""
run node $"--loader ts-node/esm {rootPath}/{ts_folder_name}/Main.ts" ""
}

let net = BuildTask.create "runMtNet" [clean; build] {
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"strictNullChecks": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
},
"declaration": true
},
"ts-node": {
"esm": true, // «———— enabling ESM for ts-node
},
"esm": true // not working since node 20 https://stackoverflow.com/a/77458795/12858021
}
}

0 comments on commit 247e6e2

Please sign in to comment.