Skip to content

[wasm] Rename module file to .mjs #2597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/articles/guides/console-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,6 @@ dotnet run -c Release -- --filter * --runtimes netcoreapp2.0 netcoreapp2.1 --sta
* `--runOncePerIteration` run the benchmark exactly once per iteration.
* `--buildTimeout` build timeout in seconds.
* `--wasmEngine` full path to a java script engine used to run the benchmarks, used by Wasm toolchain.
* `--wasmMainJS` path to the test-main.js file used by Wasm toolchain. Mandatory when using \"--runtimes wasm\"
* `--wasmMainJS` path to the test-main.mjs file used by Wasm toolchain. Mandatory when using \"--runtimes wasm\"
* `--expose_wasm` arguments for the JavaScript engine used by Wasm toolchain.
* `--customRuntimePack` specify the path to a custom runtime pack. Only used for wasm currently.
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Toolchains/MonoWasm/WasmExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static ExecuteResult Execute(BenchmarkCase benchmarkCase, BenchmarkId be
private static Process CreateProcess(BenchmarkCase benchmarkCase, ArtifactsPaths artifactsPaths, string args, IResolver resolver)
{
WasmRuntime runtime = (WasmRuntime)benchmarkCase.GetRuntime();
string mainJs = runtime.RuntimeMoniker < RuntimeMoniker.WasmNet70 ? "main.js" : "test-main.js";
string mainJs = runtime.RuntimeMoniker < RuntimeMoniker.WasmNet70 ? "main.js" : "test-main.mjs";

var start = new ProcessStartInfo
{
Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Toolchains/MonoWasm/WasmGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public WasmGenerator(string targetFrameworkMoniker, string cliPath, string packa
{
Aot = aot;
CustomRuntimePack = customRuntimePack;
MainJS = (targetFrameworkMoniker == "net5.0" || targetFrameworkMoniker == "net6.0") ? "main.js" : "test-main.js";
MainJS = (targetFrameworkMoniker == "net5.0" || targetFrameworkMoniker == "net6.0") ? "main.js" : "test-main.mjs";
}

protected override void GenerateProject(BuildPartition buildPartition, ArtifactsPaths artifactsPaths, ILogger logger)
Expand Down
2 changes: 1 addition & 1 deletion tests/BenchmarkDotNet.IntegrationTests/WasmTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void WasmIsSupported()
var dotnetVersion = "net8.0";
var logger = new OutputLogger(Output);
var netCoreAppSettings = new NetCoreAppSettings(dotnetVersion, null, "Wasm");
var mainJsPath = Path.Combine(AppContext.BaseDirectory, "AppBundle", "test-main.js");
var mainJsPath = Path.Combine(AppContext.BaseDirectory, "AppBundle", "test-main.mjs");

var config = ManualConfig.CreateEmpty()
.AddLogger(logger)
Expand Down
Loading