Skip to content

Fix npm test scripts on Windows - #4

Open
cedar323 wants to merge 1 commit into
BitgesellOfficial:mainfrom
cedar323:fix/windows-clean-script
Open

Fix npm test scripts on Windows#4
cedar323 wants to merge 1 commit into
BitgesellOfficial:mainfrom
cedar323:fix/windows-clean-script

Conversation

@cedar323

@cedar323 cedar323 commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • replace the POSIX-only rm -rf src clean command with a small Node cleanup script
  • use a double-quoted Prettier glob so Windows npm shells pass the TypeScript file pattern correctly
  • keep the build output and generated sources unchanged

Verification

  • Reproduced the original Windows failure: npm test stopped at rm -rf src with 'rm' is not recognized
  • After the change, npm test passes on Windows: build, format check, lint, and all 383 tape assertions
  • git diff --check reports no patch whitespace errors; Git only warns about local CRLF normalization

@MyTH-zyxeon

Copy link
Copy Markdown

Maintainer-facing review note for this Bitgesell maintenance PR:

  • Scope is tightly limited to package.json scripts plus a new util/clean.js; no dependency, wallet, address, mnemonic, or runtime library behavior changes are introduced by the diff.
  • The clean script change removes the POSIX-only rm -rf src command and uses Node filesystem APIs instead, which matches the PR goal of making npm test usable on Windows npm shells.
  • The Prettier glob switch from single to double quotes should preserve the literal ts_src/**/*.ts pattern for Prettier while avoiding the common Windows quoting failure.
  • Compatibility note: current Node versions take the fs.rmSync(..., { recursive: true, force: true }) branch; the fs.rmdirSync(..., { recursive: true }) fallback is deprecated on newer Node but only used when fs.rmSync is unavailable.

From the public diff/API state, this looks mergeable (mergeable_state=clean) and low risk after maintainer CI or a focused npm test confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants