Skip to content

Make postpack cleanup cross-platform - #37

Draft
ryanduguid wants to merge 1 commit into
XeroAPI:mainfrom
ryanduguid:agent/cross-platform-postpack
Draft

Make postpack cleanup cross-platform#37
ryanduguid wants to merge 1 commit into
XeroAPI:mainfrom
ryanduguid:agent/cross-platform-postpack

Conversation

@ryanduguid

@ryanduguid ryanduguid commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Replaces the POSIX-only rm -f postpack command with Node's cross-platform fs.rmSync(..., {force: true}).

The package already requires Node, so this adds no dependency and changes only lifecycle cleanup.

Verification at 295d131e1805baab3d457ab5342b651a87dc11f4

  • npm ci;
  • focused tests and build passed;
  • npm pack --dry-run passed on Windows;
  • oclif.manifest.json was removed after packing.

Compatibility with #38

A detached composition of #38 exact head 8a1120a1787125afc3eb1cb80f063373cafe4baa plus this commit produced c2ff3ba locally; no combined branch was pushed.

On that composition:

  • clean npm ci audited 309 packages with zero vulnerabilities;
  • all 130 tests and the build passed;
  • npm pack --dry-run passed with 179 files (61.4 kB packed / 463.3 kB unpacked);
  • postpack removed the generated manifest, and no tarball or untracked file remained.

By contrast, #38 alone reaches postpack and reproduces the unchanged rm failure on Windows. This confirms this focused portability change supplies the missing lifecycle fix and composes cleanly with the dependency refresh.

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.

1 participant