Skip to content

fix(ci): point _selftest at current repo and reject pnpm <10 consumers#49

Merged
fi3ework merged 2 commits into
mainfrom
fix/selftest-use-self-and-require-pnpm-10
May 25, 2026
Merged

fix(ci): point _selftest at current repo and reject pnpm <10 consumers#49
fi3ework merged 2 commits into
mainfrom
fix/selftest-use-self-and-require-pnpm-10

Conversation

@fi3ework
Copy link
Copy Markdown
Member

Summary

  • tests/rspack/_selftest.ts was copied verbatim from the legacy web-infra-dev/rspack-ecosystem-ci during the move into rstackjs/rstack-ecosystem-ci. The repo field, the cloned directory name, and the pkg.name assertion all still point at the legacy repo (last pushed 2026-04-28). Switch them to rstackjs/rstack-ecosystem-ci / rstack-ecosystem-ci so the selftest exercises the active repo.
  • The legacy repo still pins pnpm@9.15.2. applyPackageOverrides unconditionally writes a pnpm-workspace.yaml containing only overrides: + strictDepBuilds: into the consumer; pnpm <10 treats that file as a workspace definition and rejects it with ERROR packages field missing or empty. So the selftest was failing at pnpm install and never actually verified anything about the upstream rspack build (latest impact: run 26384019463, execute-all (_selftest)).
  • Add an up-front guard in applyPackageOverrides: if the consumer's packageManager field is pnpm@<10 (or ni reports pnpm@6), throw a clear "requires pnpm >= 10" error instead of producing the confusing install-time crash. Targets both the migrated selftest path (the new home pins pnpm@10.33.4 so this is a no-op) and any future consumer that regresses below 10.

Test plan

  • CI: _selftest suite under rspack-ecosystem-ci-from-commit.yml reaches pnpm run selftestscript (it currently fails at pnpm install).
  • CI: other rspack suites remain green (applyPackageOverrides change is additive; existing consumers all pin pnpm >=10).
  • Manual: temporarily edit a consumer's packageManager to pnpm@9.15.2 and confirm the new error fires before the pnpm install step.

fi3ework added 2 commits May 25, 2026 14:20
`tests/rspack/_selftest.ts` was copied verbatim from the legacy
`web-infra-dev/rspack-ecosystem-ci` when the rspack ecosystem CI moved
into `rstackjs/rstack-ecosystem-ci`. The `repo` / dir / name-assertion
were never updated, so every from-commit run was cloning the now-dormant
legacy repo (last pushed 2026-04-28). That repo still pins pnpm@9.15.2,
and `applyPackageOverrides` always writes a `pnpm-workspace.yaml`
containing only `overrides:` and `strictDepBuilds:` — pnpm <10 treats
that file as workspace-definition only and rejects it with
`ERROR  packages field missing or empty`, so the selftest never
actually verified anything about the upstream rspack build.

Switch the suite to clone this repo (which pins pnpm@10.33.4) and also
guard `applyPackageOverrides` to refuse pnpm <10 consumers up front
with an actionable message, instead of producing the confusing
install-time error if any other consumer regresses to pnpm 9.
…guard

The pnpm@6 branch was redundant — any consumer pinning pnpm <10 is caught
by the `packageManager` check below. Consumers without a `packageManager`
field aren't strictly pinned and may resolve to a modern pnpm anyway, so
falling back to the ni-agent shape would be unreliable.
@fi3ework fi3ework merged commit 974df0d into main May 25, 2026
21 checks passed
@fi3ework fi3ework deleted the fix/selftest-use-self-and-require-pnpm-10 branch May 25, 2026 06:31
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.

1 participant