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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
The cloudcost CLI could not start.dist/cli.js shipped with two #!/usr/bin/env node lines — one from src/cli.ts and one from the banner.js that tsup.config.ts injects into every bundle. Node strips only
a line-1 shebang, so the second parsed as code and the binary died with SyntaxError: Invalid or unexpected token. The shebang is now declared in
exactly one place (the tsup banner). This affected every published release up
to and including 1.2.0, so 1.2.0's --currency flag was unreachable in
practice. The MCP server entrypoint (cloudcost-mcp) was never affected — src/index.ts carried no shebang of its own.
Tests
test/unit/cli/shebang.test.ts guards the artifact users actually run: no
source entrypoint may declare a shebang, each built bin must contain exactly
one on line 1, and dist/cli.js must start under Node. The existing CLI
suites all execute src/cli.ts through the TypeScript loader, which is why a
build-output defect went unnoticed across six releases.