You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep the root npm package's published bin entries stable and extensionless: ./bin/aube, ./bin/aubr, and ./bin/aubx.
On Unix, continue copying or hardlinking the selected native binaries directly to those extensionless paths.
On Windows, copy or hardlink native binaries to sibling .exe files, then write the extensionless bin/<name> files as tiny shebang files pointing at those native .exe files. This gives npm's generated .cmd shims a stable target without adding a Node wrapper.
Normalize npm's Windows interpreter-shim argv shape in the native CLI, so aube.exe bin/aube ... parses as the intended aube ..., and aubr / aubx multicall dispatch still works.
Why
The current published npm package downloads/copies the platform binary during preinstall, then rewrites package.json from ./bin/aube to ./bin/aube.exe on Windows. npm/npx appear to resolve executable metadata before that rewrite matters, so global installs and fresh-cache npx installs can leave no runnable aube command.
This keeps the published bin paths stable for npm/npx while preserving extensionless command targets on Unix and keeping the runtime path native-only.
Validation
git diff --check
node -c npm/installArchSpecificPackage.js
rustup run 1.93.0 cargo test -p aube multicall_tests --bin aube
Windows global-prefix smoke using a temp root package and temp local @endevco/aube-win32-x64 package built from the updated debug binaries: npm.cmd install --global --prefix <tmp> --ignore-scripts=false <pkg>, then <tmp>\\aube.cmd --version, <tmp>\\aubr.cmd --version, and <tmp>\\aubx.cmd --version all printed 1.3.0-DEBUG windows-arm64 (2026-04-28).
Windows npx smoke using a fresh cache and temp local platform package: npx.cmd --yes --package <fixed local package> aube --version printed 1.3.0-DEBUG windows-arm64 (2026-04-28).
This PR fixes npm/npx global install failures on Windows by keeping the root package's bin entries as stable extensionless paths (./bin/aube, ./bin/aubr, ./bin/aubx) instead of rewriting package.json at preinstall time. On Windows, installArchSpecificPackage.js now writes a tiny shebang file at each extensionless path pointing at the sibling .exe, and the Rust binary's normalize_npm_interpreter_shim_argv strips the shebang-file argument that npm's .cmd shim injects so multicall dispatch still works correctly.
Confidence Score: 5/5
Safe to merge; the approach is well-reasoned, validated end-to-end on Windows, and the only finding is a minor style suggestion.
Both changed files are correct and the new tests cover the key shim-drop and multicall-dispatch paths. The sole comment is a P2 style suggestion (adding a #[cfg(windows)] guard) that does not affect correctness.
No files require special attention.
Important Files Changed
Filename
Overview
crates/aube/src/main.rs
Adds normalize_npm_interpreter_shim_argv to rewrite [aube.exe, bin/aube, ...] → [bin/aube, ...] before multicall dispatch; two new tests cover the shim-drop and multicall-dispatch cases. Logic is correct; minor style note about missing #[cfg(windows)] guard.
npm/installArchSpecificPackage.js
Removes the fragile package.json bin-rewrite on Windows and instead writes a tiny shebang shim (bin/<name>) pointing at the native bin/<name>.exe; root package.json bin paths stay stable and extensionless. Logic is correct and simplifies the install script.
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
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.
Summary
binentries stable and extensionless:./bin/aube,./bin/aubr, and./bin/aubx..exefiles, then write the extensionlessbin/<name>files as tiny shebang files pointing at those native.exefiles. This gives npm's generated.cmdshims a stable target without adding a Node wrapper.aube.exe bin/aube ...parses as the intendedaube ..., andaubr/aubxmulticall dispatch still works.Why
The current published npm package downloads/copies the platform binary during
preinstall, then rewritespackage.jsonfrom./bin/aubeto./bin/aube.exeon Windows. npm/npx appear to resolve executable metadata before that rewrite matters, so global installs and fresh-cachenpxinstalls can leave no runnableaubecommand.This keeps the published bin paths stable for npm/npx while preserving extensionless command targets on Unix and keeping the runtime path native-only.
Validation
git diff --checknode -c npm/installArchSpecificPackage.jsrustup run 1.93.0 cargo test -p aube multicall_tests --bin auberustup run 1.93.0 cargo build -p aube --bin aube --bin aubr --bin aubx@endevco/aube-win32-x64package built from the updated debug binaries:npm.cmd install --global --prefix <tmp> --ignore-scripts=false <pkg>, then<tmp>\\aube.cmd --version,<tmp>\\aubr.cmd --version, and<tmp>\\aubx.cmd --versionall printed1.3.0-DEBUG windows-arm64 (2026-04-28).npx.cmd --yes --package <fixed local package> aube --versionprinted1.3.0-DEBUG windows-arm64 (2026-04-28).