fix(npm): add npm to cg update methods, normalize repository.url#29
Merged
Conversation
- cg update now detects npm installs (path contains node_modules/@coingecko/cg-) and runs `npm install -g @coingecko/cg@latest`. npm check runs before homebrew so Homebrew-installed Node doesn't misclassify. - Add git+ prefix to repository.url in all 7 npm/*/package.json templates so npm stops auto-correcting on publish. - Document npm distribution + cg update method ordering in CLAUDE.md.
irisyann
approved these changes
May 14, 2026
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
cg updatenow detects npm installs (executable path undernode_modules/@coingecko/cg-) and runsnpm install -g @coingecko/cg@latest. Previously it fell through to thescriptbranch and curl-installed a secondcgbinary to/usr/local/bin/, shadowing the npm copy./opt/homebrew/lib/node_modules/, which would otherwise match the homebrew rule.git+prefix torepository.urlin all 7npm/*/package.jsontemplates. Silences thenpm warn publish "repository.url" was normalized to ...warning seen on every release (e.g. run 25838686514).cg updatemethod ordering inCLAUDE.mdand the npm method override in README.Test plan
make test(addedTestClassifyInstallPath_Npmcovering macOS/Linux/Homebrew-Node/Windows paths; updatedTestDetectInstallMethod_ReturnsValidMethodto includenpm)make lintrepository.url was normalizedwarningscg updateon a node_modules-installed binary runsnpm install -g @coingecko/cg@latestinstead ofinstall.sh