Skip to content

fix(registry): accept the -- separator in the validate CLI - #826

Merged
urzeye merged 1 commit into
mainfrom
fix/registry-validate-cli-separator
Aug 14, 2026
Merged

fix(registry): accept the -- separator in the validate CLI#826
urzeye merged 1 commit into
mainfrom
fix/registry-validate-cli-separator

Conversation

@urzeye

@urzeye urzeye commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

pnpm registry:validate -- --registry-root <path> fails with TypeError: Missing value for --.

pnpm run forwards the -- separator to the script verbatim, so parseArguments sees -- as an option name and then treats the following --registry-root as its missing value. .github/workflows/registry-pr.yml invokes the validator exactly this way, so the Validate registry sources check fails on every registry PR before any manifest is even read.

Changes

  • registry/scripts/validate.mjs: skip a bare -- argument while parsing.
  • tests/registry/scripts/validate.test.mjs: regression test that spawns the CLI with the separator and asserts exit code 0.

Verification

  • pnpm test — 285 passed
  • pnpm lint:check, pnpm format:check, pnpm typecheck

This PR intentionally touches no files under registry/sites, registry/patches, registry/schema or registry/examples, so the registry workflow does not run on it. It must land on main first, because registry-pr.yml executes the base-branch copy of the validator.

The registry PR workflow invokes `pnpm registry:validate -- --registry-root
<path>`, and pnpm forwards the `--` separator to the script verbatim.
parseArguments treated it as a flag whose value was missing and threw
`Missing value for --`, so the job failed before validating anything.

This is the first PR touching registry/** since the workflow landed, which
is why it went unnoticed. Skip a bare `--` and cover the CLI form with a
regression test.
@urzeye
urzeye merged commit 7b875f3 into main Aug 14, 2026
1 check passed
@urzeye
urzeye deleted the fix/registry-validate-cli-separator branch August 14, 2026 12:45
@urzeye urzeye added the bug Something isn't working label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant