Repository navigation
[pull] main from pnpm:main - #473
Merged
Merged
Conversation
…pt CLI (#13597) Treat empty proxy values as unset. Every source that can configure a proxy (`.npmrc` keys, env vars, CLI flags, workspace YAML) can produce an empty string; previously only `parse_proxy_url` rejected it, surfacing as ERR_PNPM_INVALID_PROXY on every install. Filtering empty values only where the resolved ProxyConfig is parsed into the HTTP client (`for_installs_with_redirect`) stops the abort but leaves an empty value shadowing every lower-priority source. Empty proxy settings are now dropped as the .npmrc, pnpm-workspace.yaml, and CLI layers are applied, with the filter at the client-build site kept as the final normalization. An empty env var keeps shadowing the env vars below it, and what is left resolves to no proxy. The legacy `.npmrc` `proxy=` key was the one setting where the two config-reader paths disagreed: the trusted packageManagerNetworkConfig path ran it through `getProxyValue` and fell through on empty, while the main path kept `''` and let a project .npmrc suppress an environment-configured proxy. Both paths now use `getProxyValue`, and pacquet's cascade mirrors it. Also fix the workspace-yaml `noProxy` / `noproxy` aliases: an empty primary key consumed the alias's turn before being filtered, discarding a valid bypass list. Supersedes the branch of #13582, which had maintainer edits disabled. Fixes #13533.
Version tags were created in CI with `git tag "$tag" "$SHA"` — a lightweight tag, which has no tag object to carry a signature. Since v11.18.0 that made `git verify-tag` fail with "cannot verify a non-tag object of type commit", breaking downstream packagers who verify the tag before building. Signing those tags in CI would restore verify-tag but not the property that makes it worth verifying: the key would live in Actions secrets, inside the same trust boundary the signature is meant to attest independently of. Cut tags from a maintainer machine instead, and have release.yml verify the tag before any publish job runs. verify-release-tag imports the public keys committed under .github/release-keys into a throwaway GNUPGHOME and runs `git verify-tag` on the pushed tag. Every publish path descends from `plan` and `plan` descends from that job, so one edge gates all three products. Verified against a signed tag, a lightweight tag, an annotated unsigned tag, and a tag signed by a key outside the directory: only the first proceeds. The keyring is isolated so verification cannot succeed against a key already on the runner, and checkout sets fetch-tags because a tag push checks out the commit while the signature lives on the tag object. The non-tag verify_ts_release dispatch exits from inside the step rather than a job-level `if`, since a skipped job skips everything that needs it. This guards against unsigned tags, not against an actor who can push arbitrary ones: a tag push runs the workflow file and checks out the tree from the pushed tag. Restricting creation of v* and pnpr@* tags is a repository ruleset concern. RELEASING.md documents the manual procedure: tag an explicit commit, verify every tag before pushing, and retag at the fixed commit to retry a failed release. Related to #13578
pacquet's pnpm login / pnpm adduser honored scope only as the --scope command-line flag, ignoring it when configured. The TypeScript pnpm CLI resolves scope through the config chain, so pacquet was missing the pnpm-workspace.yaml, global config.yaml, and PNPM_CONFIG_SCOPE sources. Add a scope field to Config, populated from pnpm-workspace.yaml and the global config.yaml (via WorkspaceSettings) and from PNPM_CONFIG_SCOPE (via from_pnpm_config_env). The login CLI adapter falls back to the resolved config.scope when --scope is absent, with the flag still taking precedence. .npmrc is deliberately excluded: pnpm's readAndFilterNpmrc keeps only auth/registry keys (isNpmrcReadableKey), and scope is in neither NPM_AUTH_SETTINGS nor NETWORK_INI_KEYS, so pnpm drops a `scope=` line there. A test pins that pacquet ignores it too. Fixes #12893
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )