Repository navigation
Source the CLI version from package.json and fix the bundle shebang - #11
Merged
Merged
Conversation
tod --version now reports the version imported from package.json at build time, so releases only bump one place. Bun.build carries the entry file's bun shebang into the node-target bundle, so the installed bin required bun on unix machines; the build script now replaces any leading shebang with the node one, and the package test asserts it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes two release-correctness issues found while preparing the first npm publish, and bumps to 0.1.1.
Changes
src/run.tsimports the version frompackage.json(inlined at build time) instead of a hardcoded constant, so a release bumps one place. The existing package test already comparedtod --versionagainstpackage.json; this removes the second bump site it guarded.Bun.buildcarries the#!/usr/bin/env bunshebang fromsrc/cli.tsinto the node-target bundle, and the build script's prepend guard never fired. A global install on macOS or Linux would have executed the bin via bun, failing on machines without it. The build script now replaces any leading shebang with the node one, and the package test asserts the shebang line directly (the previous test invokednode dist/cli.jsexplicitly, which bypasses the shebang and hid the bug).Why
Non-technical operators install with
npm i -g tod-aiand will not have bun. The shebang was the difference between the published package working and failing on every default install, and nothing on the check suite could catch it without asserting the shebang line itself.🤖 Generated with Claude Code