Skip to content

Build script was Windows-only (cmd.exe) — made cross-platform in v4 onboarding; review #4

Description

@Shinrai

Filed per the standing "platform-specific → track it" rule.

What was found

The original build script used cmd.exe-only syntax and can't run on non-Windows:

rmdir /s /q dist
for %f in (dist\*.js) do ren "%f" "*.mjs"

The v4 flow runs npm run build (coverage-badge job) and npm run build:ci (publish) on Linux runners, so a Windows-only build breaks CI and publishing.

What was done (in PR #2, needs your review)

Made it cross-platform, minimally, with identical output layout:

  • clean → a node -e "fs.rmSync('dist', {recursive:true,force:true})" one-liner
  • one esbuild pass with --out-extension:.js=.mjs --outbase=src (dropped the now-unneeded rename-dist-js-to-mjs step)

Output matches the previous main/bin/exports (dist/*.mjs + dist/platform/*.mjs).

Ask

  • Confirm the cross-platform build is acceptable (or adjust if you preferred a different toolchain).
  • Sanity-check there are no other Windows-only assumptions in the build/dev scripts.

No product (src/) code changed. (Related: the source itself has intentional posix/win branches — those are correct cross-platform handling, not a portability bug.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions