Skip to content

docs: say what a token helper prints - #960

Closed
neonsid wants to merge 2 commits into
pnpm:mainfrom
neonsid:docs/token-helper-output
Closed

neonsid wants to merge 2 commits into
pnpm:mainfrom
neonsid:docs/token-helper-output

Conversation

@neonsid

@neonsid neonsid commented Sep 26, 2026 •

Copy link
Copy Markdown

Summary

Closes #847.

The tokenHelper section said the executable outputs an auth token, in the same words as _authToken. pnpm treats those differently.

A raw token from the helper is sent as Authorization: Bearer <token>. Output that starts with one or more letters and a space, such as Bearer my-token, Basic …, or Token abc, is used as the header value. _authToken is only the token, and pnpm always adds Bearer in front of it.

Test plan

  • Checked the behavior in executeTokenHelper on pnpm 11 and the matching helper in the Rust CLI
  • Docs site preview renders the tokenHelper section

Written by an agent (Cursor Grok 4.7, grok-4.7).

The npmrc page said a token helper outputs an auth token, which reads like _authToken. pnpm sends a raw token as Bearer and uses a scheme-prefixed line as the header value.

Co-authored-by: Cursor <[email protected]>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0c21d9e1-d8e8-4bb1-a2fb-47c01e85cd14

📥 Commits

Reviewing files that changed from the base of the PR and between d536b55 and a5756e1.

📒 Files selected for processing (1)
  • docs/npmrc.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 61c40ace-28af-44fd-815e-597695be5c0a

📥 Commits

Reviewing files that changed from the base of the PR and between 719c351 and d536b55.

📒 Files selected for processing (1)
  • docs/npmrc.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Greptile Review
🔇 Additional comments (1)
docs/npmrc.md (1)

133-133: LGTM!

Also applies to: 135-135


📝 Walkthrough

Walkthrough

The tokenHelper documentation now explains how pnpm handles helper output and distinguishes it from _authToken.

Changes

tokenHelper documentation

Layer / File(s) Summary
Document tokenHelper authorization behavior
docs/npmrc.md
The documentation describes helper output as either a complete authorization value or a raw token that pnpm sends as a Bearer token. It also notes that a helper can return a refreshed access token and contrasts this behavior with _authToken.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Severity of issue fixed: Low

Suggested reviewers: zkochan

Merge Risk: ⚪ Minimal · up to d536b

No actionable merge-blocking risk remains in this documentation-only change.

Architecture Summary

Architecture risk: 🔵 Low · up to d536b

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/npmrc.md: The description now states that a token helper prints a token to stdout and may return a refreshed access token. pnpm uses output beginning with an auth scheme and a space directly as the authorization header; otherwise it sends the output as a Bearer token. It contrasts this with _authToken, which is always prefixed with Bearer.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change satisfies issue #847. docs/npmrc.md now distinguishes _authToken values from tokenHelper output. It states that pnpm adds Bearer to a raw token and uses helper output directly when …
Out of Scope Changes check ✅ Passed The reported change is limited to docs/npmrc.md. The added text explains tokenHelper output and its difference from _authToken. This change directly supports issue #847. No unrelated implementat…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation change. It identifies that the pull request explains what a token helper prints.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the token flow,
Raw tokens wear Bearer coats,
Schemed output passes through,
Refreshed tokens join the notes,
Clear words help the helpers hop.

Comment @coderabbitai help to get the list of available commands.

@neonsid
neonsid marked this pull request as ready for review September 26, 2026 07:07
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Clarifies how token helpers format their output.

No new actionable issue was established, and the previous finding was manually resolved.

Reviews (2) · Last reviewed commit: "docs: say a token helper keeps any lette..."

Comment thread docs/npmrc.md Resolved
The helper docs read as if only Bearer and Basic were kept as a header value. Both CLIs keep any prefix of letters and a space.

Co-authored-by: Cursor <[email protected]>
@neonsid

neonsid commented Sep 26, 2026

Copy link
Copy Markdown
Author

@coderabbitai review


Written by an agent (Cursor Grok 4.7, grok-4.7).

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zkochan

zkochan commented Sep 29, 2026

Copy link
Copy Markdown
Member

The applicable documentation changes from this PR were incorporated, with adaptations for the current implementation and documentation paths, into pnpm/pnpm#16393, which is now merged. The documentation sources now live alongside the CLI code in pnpm/pnpm. Closing this PR as superseded. Thank you for the contribution!


Written by an agent (Codex, GPT-6).

@zkochan zkochan closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tokenHelper documentation unclear

2 participants