npm: unblock Windows install path in wrapper (#15)#18
Merged
MasonStation merged 1 commit intomainfrom Apr 22, 2026
Merged
Conversation
The npm wrapper actively refused to install on Windows: - package.json os filter: ["darwin", "linux"] → EBADPLATFORM - getPlatformTarget had no win32 branch → exit 1 - Extract used tar xzf + chmod +x (Unix only) → would fail Changes: - Add "win32" to os array - Map win32-x64 to x86_64-pc-windows-msvc target - Download .zip on Windows (release already produces it), .tar.gz otherwise - Extract via PowerShell Expand-Archive on Windows, tar xzf elsewhere - Skip chmod +x on Windows - Fix .exe suffix check in install.js existsSync path Requires a v0.5.0+ release tag before `npm publish` — the wrapper fetches `phantom-x86_64-pc-windows-msvc.zip` which the Rust release workflow already builds but no published tag exposes yet. Closes #15 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tier 3 of #1 (Windows support). Independent of Tier 2 (#17) — separate branch off main.
Summary
The npm wrapper actively refused to install on Windows. This PR unblocks the Windows install path so
npx phantom-secrets initworks on Windows after a release bump.Changes
package.json— add"win32"toosarray (was blocking install withEBADPLATFORM)bin/cli.js— mapwin32-x64tox86_64-pc-windows-msvc, download.zipon Windows (Rust release workflow already builds it), extract via PowerShellExpand-Archive, skipchmod +xinstall.js— respect.exesuffix in the existing-binary checkRelease coordination
Must not publish this to npm until a
v0.5.0+tag exists with Windows binaries. Today the latest published tag isv0.4.0which has no Windows artifacts; if this wrapper shipped now, Windows installs would fetch a 404. Tier 4 of #1 handles the coordinated release.Test plan
npx [email protected] initon a Windows machine'' -> ''')Closes #15