Skip to content

Commit

Permalink
fix module url platform affinity (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
elringus authored Jan 6, 2024
1 parent 118d47f commit 33e9742
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion samples/trimming/cs/Trimming.csproj
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
<PackageReference Include="Bootsharp" Version="*-*"/>
</ItemGroup>

<Target Name="CompressBuild" AfterTargets="BootsharpBuild">
<Target Name="CompressBuild" AfterTargets="BootsharpPack">
<RemoveDir Directories="$(BootsharpPublishDirectory)/bro"/>
<Exec Command="npx gzipper compress bin bro --brotli"
WorkingDirectory="$(BootsharpPublishDirectory)"/>
Original file line number Diff line number Diff line change
@@ -6,9 +6,10 @@ namespace Bootsharp.Publish;
[ExcludeFromCodeCoverage(Justification = "How to merge coverage from multiple OS?")]
internal sealed class InternalPatcher (string dotnet, string runtime, string native)
{
private readonly string url = Environment.OSVersion.Platform == PlatformID.Win32NT
? "\"file://dotnet.native.wasm\""
: "\"file:///dotnet.native.wasm\"";
private const string url =
"""
((typeof window === "object" && "Deno" in window && Deno.build.os === "windows") || (typeof process === "object" && process.platform === "win32")) ? "file://dotnet.native.wasm" : "file:///dotnet.native.wasm"
""";

public void Patch ()
{
2 changes: 1 addition & 1 deletion src/cs/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.1.2</Version>
<Version>0.1.3</Version>
<Authors>Elringus</Authors>
<PackageTags>javascript typescript ts js wasm node deno bun interop codegen</PackageTags>
<PackageProjectUrl>https://bootsharp.com</PackageProjectUrl>

0 comments on commit 33e9742

Please sign in to comment.