Repository navigation
refactor(npm): share the allowed tokenEnv names message - #3905
Merged
Merged
Conversation
install, add and doctor each spelled out which names tokenEnv may use. Move the text into one ALLOWED_NPM_TOKEN_ENV_NAMES_HINT constant next to isAllowedNpmTokenEnvName so the three cannot drift apart. Refs #3568 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
The add, npm-client and install-npm tests only matched "is not allowed". Check that the message also carries ALLOWED_NPM_TOKEN_ENV_NAMES_HINT. Refs #3568 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4
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.
Refs #3568
Summary
Resolves item 6, second bullet, of #3568: the text listing which names
tokenEnvmay use was written out separately inresolveNpmToken(install),add --token-envand thedoctorhint.ALLOWED_NPM_TOKEN_ENV_NAMES_HINTinsrc/lib/npm-client.ts, next toisAllowedNpmTokenEnvName.src/lib/npm-client.ts,src/lib/add.tsandsrc/lib/doctor.ts.The
installandadderror messages stay word for word the same. Thedoctorhint forconfig/token-env-not-allowednow uses the same wording as the other two (It must be "NPM_TOKEN", "NODE_AUTH_TOKEN", or end with "_NPM_TOKEN" ...).Remaining items in #3568 (not in this PR)
pnpm-workspace.yaml, and gray-matter's js-yaml 3 for npm consumers. These touch workspace/dependency config.reportIntegrityMismatch(sources) andassertFrozenSkillIntegrity(gh) use different policies today. The gh one skips hashes not written by rulesync and only checks under--frozen, so merging them needs a design decision.NPM_TOKENfallback needs a new doctor diagnostic first.Tests
doctor.test.ts: theconfig/token-env-not-allowedcase now also checks the hint.add/npm-client/install-npmtests that matchis not allowedstill pass.pnpm cicheck: everything passed except a timeout insrc/utils/glob.test.ts, which happens under load. That file passed when run alone.🤖 Generated with Claude Code
https://claude.ai/code/session_01JdNNKCxxrKAMDANMGDEGP4