fix(publish): align package metadata and harden npm publish flow#47
Merged
synsoftworksdev merged 1 commit intomainfrom Apr 15, 2026
Merged
Conversation
Make the npm publish path more reliable by aligning package metadata with the real GitHub repository and adding small publish workflow safeguards. Also: - update `repository.url` to `git+https://github.com/synsoftworksdev/gitrole.git` - update `bugs.url` to `https://github.com/synsoftworksdev/gitrole/issues` - normalize `bin.gitrole` to `dist/cli/index.js` - add publish diagnostics for package name, version, and repository URL - add an npm preflight that skips publish when the exact version already exists - keep tag/version verification, release-confidence tests, dry-run pack, and trusted publishing intact - update package-smoke expectations for the normalized bin path Verified with: - npm run build - npm test - npm run test:release - npm pack --dry-run
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
Make the npm publish path more reliable by aligning package metadata with the
real GitHub repository and adding small publish workflow hardening.
Changed
package.jsonto point at the real repo:repository.url->git+https://github.com/synsoftworksdev/gitrole.gitbugs.url->https://github.com/synsoftworksdev/gitrole/issuesbin.gitroletodist/cli/index.js.github/workflows/publish.ymlwithout changing the release strategyrepository.urlnpm publishcleanly when the version already existsnpm run test:releasenpm pack --dry-runnpm publish --provenance --access publictest/e2e/package-smoke.test.tsso the assertion matches the normalized bin pathVerification
npm run buildnpm testnpm run test:releasenpm pack --dry-runNotes
npm pack --dry-runneeded a temporary npm cache because the default~/.npmcache had a permissions issue