Skip to content

Commit 1895f4d

Browse files
Add back fable-libray/package.json
1 parent f4d2ee7 commit 1895f4d

File tree

11 files changed

+159
-227
lines changed

11 files changed

+159
-227
lines changed

.vscode/launch.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
{
2828
"args": [
2929
"${workspaceFolder}/build/tests",
30-
"-r",
31-
"esm",
3230
"--reporter",
3331
"dot",
3432
"--timeout",
@@ -64,7 +62,7 @@
6462
"request": "launch",
6563
"name": "Run bench-compiler JS tests",
6664
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
67-
"args": ["out-tests", "-r", "esm"],
65+
"args": ["out-tests"],
6866
"cwd": "${workspaceRoot}/src/fable-standalone/test/bench-compiler"
6967
},
7068
{

build.fsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module Util =
6262
runFableWithArgs projectDir []
6363

6464
let runMocha testDir =
65-
runNpmScript "mocha" [$"{testDir} -r esm --reporter dot -t 10000"]
65+
runNpmScript "mocha" [$"{testDir} --reporter dot -t 10000"]
6666

6767
let resolveDir dir =
6868
__SOURCE_DIRECTORY__ </> dir
@@ -131,8 +131,7 @@ let buildLibraryWithOptions (opts: {| watch: bool |}) =
131131
runInDir baseDir "npm install"
132132
makeDirRecursive buildDir
133133

134-
// package.json is causing issues so disable it for now #2549
135-
// copyFile (projectDir </> "package.json") buildDir
134+
copyFile (projectDir </> "package.json") buildDir
136135

137136
if opts.watch then
138137
Async.Parallel [
@@ -191,7 +190,7 @@ let testJsFast() =
191190
let fableJs = "./src/fable-compiler-js/src/app.fs.js"
192191
let testProj = "tests/Main/Fable.Tests.fsproj"
193192
let buildDir = "build/tests-js"
194-
run $"node --eval \"require('esm')(module)('{fableJs}')\" {fableJs} {testProj} {buildDir}"
193+
run $"node {fableJs} {testProj} {buildDir}"
195194
runMocha buildDir
196195

197196

@@ -414,7 +413,7 @@ let testRepos() =
414413
let repos = [
415414
"https://github.com/alfonsogarciacaro/FsToolkit.ErrorHandling:update-fable-3", "npm i && npm test"
416415
"https://github.com/fable-compiler/fable-promise:master", "npm i && npm test"
417-
"https://github.com/alfonsogarciacaro/Thoth.Json:nagareyama", "dotnet paket restore && npm i && dotnet fable tests -o tests/bin --run mocha -r esm tests/bin"
416+
"https://github.com/alfonsogarciacaro/Thoth.Json:nagareyama", "dotnet paket restore && npm i && dotnet fable tests -o tests/bin --run mocha tests/bin"
418417
"https://github.com/alfonsogarciacaro/FSharp.Control.AsyncSeq:nagareyama", "cd tests/fable && npm i && npm test"
419418
"https://github.com/alfonsogarciacaro/Fable.Extras:nagareyama", "dotnet paket restore && npm i && npm test"
420419
"https://github.com/alfonsogarciacaro/Fable.Jester:nagareyama", "npm i && npm test"

0 commit comments

Comments
 (0)