Repository navigation
Conversation
The global config.yaml is filtered through `isConfigFileKey(kebabCase(key))`, which accepts `state-dir`, and the settings that survive that gate are then picked up in camelCase only — so the key passed the check whose job is to report unsupported keys, and was dropped by the next one without a word. Report those keys, naming the spelling that works. The two spellings disagreed and only one of them said so. Closes #13650
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughGlobal configuration parsing now reports recognized kebab-case keys with their camelCase equivalents. A regression test verifies that kebab-case settings are ignored, valid camelCase settings remain applied, and the warning identifies the configuration file. ChangesGlobal configuration reporting
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This localized change reports ignored kebab-case global configuration keys while preserving the existing camelCase-only behavior; no actionable merge-blocking risk remains beyond normal checks and review. Assessment against linked issues
Possibly related issues
Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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. Comment |
PR Summary by QodoWarn on kebab-case keys in global config.yaml (suggest camelCase)
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Confidence Score: 4/5The PR appears safe to merge, with only the non-blocking cleanup of a narrative source comment recommended. The changed filtering and warning behavior is covered by a focused test, and no concrete runtime regression remains; the sole accepted concern is duplicated explanatory prose. Files Needing Attention: pnpm11/config/reader/src/index.ts Reviews (1): Last reviewed commit: "fix(config): report kebab-case keys in t..." | Re-trigger Greptile |
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm11/config/reader/test/index.ts`:
- Around line 3814-3823: Update the getConfig call in this test to pass an
isolated env object that clears both PNPM_CONFIG_STATE_DIR and
PNPM_CONFIG_STORE_DIR, preventing inherited values from overriding the YAML
settings while preserving the existing XDG_CONFIG_HOME setup and afterEach
restoration.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e4d3c4e6-e9a0-4b7c-8f22-7c6153078916
📒 Files selected for processing (3)
.changeset/quiet-pugs-invent.mdpnpm11/config/reader/src/index.tspnpm11/config/reader/test/index.ts
The three-line note re-narrated the branch below it; the non-obvious half is only that the gate is kebab-based while the surviving keys are read in camelCase.
|
Code review by qodo was updated up to the latest commit eda8533 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
#13862 added a third category to the global config.yaml warning block: keys that pass the kebab-based gate but are only read back in camelCase. This branch had split the same block's ignoredKeys into the ones a project manifest accepts and the ones it refuses. The two are disjoint, so the resolution keeps all three warnings.
Summary
A key written in kebab-case in the global
config.yamlpasses the gate whose job is to reject unsupported keys, and is then discarded by the next one without a word:getConfigfilters the file throughisConfigFileKey(kebabCase(key)), which is kebab-based and acceptsstate-dir. What survives is handed toaddSettingsFromWorkspaceManifestToConfig, whose loop drops every key failingisCamelCase. So the setting does nothing,warningsis empty, and the camelCase spelling of the same key in the same file works — the two spellings disagree and only one of them says so.The kebab spellings are now collected in the same pass and reported, naming the spelling that works:
Reporting rather than accepting the kebab spelling keeps the file camelCase-only, which is what
pnpm config set --globalwrites and what the docs describe.This is TypeScript-only. pacquet parses
config.yamlinto a typed struct that does not usedeny_unknown_fields, so serde drops a kebab key silently — it has no equivalent warning to extend, and none for theisConfigFileKeyrejections either. I'll file that parity gap separately rather than grow this fix into it.Closes #13650
Squash Commit Body
Checklist
already linked to it solves it.
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
config.yamlsettings written in kebab-case are now reported instead of silently ignored.Documentation