Repository navigation
Publish the CLI to npm so npx major works - #198
Merged
Merged
Conversation
Each release publishes the GoReleaser binaries as @major-tech/major-<os>-<arch> packages, plus a `major` launcher package that picks the right one through optionalDependencies (no install scripts). Publishing uses npm trusted publishing (GitHub OIDC), so no npm token is stored. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoJ5NB4XUb8U8zKQyrAeH8
A binary inside node_modules came from the npm package, so update via `npm install -g major@latest` (or tell npx users it already runs latest) instead of re-running install.sh. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoJ5NB4XUb8U8zKQyrAeH8
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.
Summary
npm/major/is themajorpackage: a small Node launcher that runs the binary for the user's platform. The binaries come from@major-tech/major-<os>-<arch>packages listed asoptionalDependencies, so npm installs only the matching one. No install scripts, which npm 12 no longer runs by default.npm/publish.shpackages GoReleaser'sdist/binaries, stamps the tag version, and publishes the four platform packages and thenmajor. Versions already on npm are skipped, somake rereleaseis safe.release.ymlpublishes through npm trusted publishing (GitHub OIDC): it addsid-token: write, uses Node 24 with the latest npm, and stores no npm token. This avoids the 2FA-bypass token deprecation.major updatedetects npm installs (binary undernode_modules): global installs runnpm install -g major@latest, npx runs just get a note, instead of re-runninginstall.sh.Setup already done
major(owned by jmgironn) and the four@major-tech/major-*packages exist on npm as 0.0.0.major-technology/cliandrelease.ymlfor trusted publishing.Test plan
publish.shwithnpm packin place ofnpm publish, installed the tarballs, andnpx major --versionprinted the stamped versiongo test ./...passes, including a newnpmInstallMethodpath test;major updatefrom a simulated_npxpath reports npxnpx major --versionworks🤖 Generated with Claude Code
https://claude.ai/code/session_01LoJ5NB4XUb8U8zKQyrAeH8
Made with Orca 🐋