You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2026. It is now read-only.
pnpm v11 reads almost all configs from pnpm-workspace.yaml and reserves .npmrc for auth and network keys. The split lives in isNpmrcReadableKey and the YAML loader is workspace-manifest-reader.
Pacquet already reads pnpm-workspace.yaml:
crates/npmrc/src/workspace_yaml.rs defines WorkspaceSettings mirroring the pnpm‑11 camelCase key set (storeDir, nodeLinker, hoist family, lockfile, fetchRetries*, verifyStoreIntegrity, …).
Npmrc::current walks up from cwd to find the nearest pnpm-workspace.yaml and layers its overrides on top of the .npmrc-derived registry.
crates/npmrc/src/npmrc_auth.rs keeps only registry from .npmrc; project-structural keys there are silently ignored.
Existing tests already exercise this: pnpm_workspace_yaml_registry_overrides_npmrc_registry, pnpm_workspace_yaml_found_by_walking_up, non_auth_keys_in_npmrc_are_ignored, fetch_retry_keys_in_npmrc_are_ignored, plus the suite in workspace_yaml/tests.rs.
The remaining divergence from pnpm is on the error path. Upstream's readManifestRaw returns undefined only for ENOENT and propagates every other failure (read failure, invalid yaml). Pacquet swallowed all of them via if let Ok(Some(...)), so a typo in pnpm-workspace.yaml silently fell through to defaults — leaving the user uncertain which install settings were actually in effect.
Tasks
Make Npmrc::current return Result<Self, LoadWorkspaceYamlError>. find_and_load keeps Ok(None) for the missing-file case (is_file() gate), while read and parse failures bubble up.
Wrap the new error with miette::Diagnostic so the CLI prints a clean message including the offending path. Box the variant payloads to keep the Result small (clippy result_large_err).
Update CLI call sites and StoreCommand::run to thread the new fallible signature.
Add a regression test (invalid_workspace_yaml_propagates_error) asserting invalid yaml surfaces as ParseYaml { .. } instead of being silently dropped.
Requirements
Mirror pnpm v11.
Carefully read and comply with AGENTS.md, CONTRIBUTING.md, and CODE_STYLE_GUIDE.md before writing code. Also, after writing code, carefully double check whether the written code complies with these files.
Carefully read the DI issue and abide by it IF applicable.
Written by an agent (Claude Code, claude-opus-4-7).
Background
pnpm v11 reads almost all configs from
pnpm-workspace.yamland reserves.npmrcfor auth and network keys. The split lives inisNpmrcReadableKeyand the YAML loader isworkspace-manifest-reader.Pacquet already reads
pnpm-workspace.yaml:crates/npmrc/src/workspace_yaml.rsdefinesWorkspaceSettingsmirroring the pnpm‑11 camelCase key set (storeDir,nodeLinker, hoist family,lockfile,fetchRetries*,verifyStoreIntegrity, …).Npmrc::currentwalks up from cwd to find the nearestpnpm-workspace.yamland layers its overrides on top of the.npmrc-derivedregistry.crates/npmrc/src/npmrc_auth.rskeeps onlyregistryfrom.npmrc; project-structural keys there are silently ignored.pnpm_workspace_yaml_registry_overrides_npmrc_registry,pnpm_workspace_yaml_found_by_walking_up,non_auth_keys_in_npmrc_are_ignored,fetch_retry_keys_in_npmrc_are_ignored, plus the suite inworkspace_yaml/tests.rs.The remaining divergence from pnpm is on the error path. Upstream's
readManifestRawreturnsundefinedonly forENOENTand propagates every other failure (read failure, invalid yaml). Pacquet swallowed all of them viaif let Ok(Some(...)), so a typo inpnpm-workspace.yamlsilently fell through to defaults — leaving the user uncertain which install settings were actually in effect.Tasks
Npmrc::currentreturnResult<Self, LoadWorkspaceYamlError>.find_and_loadkeepsOk(None)for the missing-file case (is_file()gate), while read and parse failures bubble up.miette::Diagnosticso the CLI prints a clean message including the offending path. Box the variant payloads to keep theResultsmall (clippyresult_large_err).StoreCommand::runto thread the new fallible signature.invalid_workspace_yaml_propagates_error) asserting invalid yaml surfaces asParseYaml { .. }instead of being silently dropped.Requirements
Mirror pnpm v11.
Carefully read and comply with
AGENTS.md,CONTRIBUTING.md, andCODE_STYLE_GUIDE.mdbefore writing code. Also, after writing code, carefully double check whether the written code complies with these files.Carefully read the DI issue and abide by it IF applicable.
Written by an agent (Claude Code, claude-opus-4-7).