Goal
Propagate a Yarn Berry bump (e.g. rhdh-plugins#2918, RHIDP-16074) across:
| Repo | Notes |
|---|---|
redhat-developer/rhdh-plugins |
root workspace (+ Fullsend if hardcoded) |
redhat-developer/rhdh |
root + nested workspaces + Containerfile |
redhat-developer/rhdh-plugin-export-overlays |
many packageManager pins |
redhat-developer/rhdh-cli |
root packageManager / yarnPath (now Yarn 4.17.1) |
gitlab.cee.redhat.com/rhidp/rhdh |
distgit binary + ENV YARN= (copy binary from GH bump) |
gitlab.cee.redhat.com/rhidp/rhdh-plugin-catalog |
per-workspace pins + Containerfiles |
What actually changes
For each matching workspace:
yarn set version <to> # packageManager + yarnPath + .yarn/releases
chmod +x .yarn/releases/yarn-<to>.cjs
yarn install --mode=update-lockfile
Plus pins Yarn cannot see: ENV YARN=, Containerfile / Dockerfile / embedded yarn set version.
No binary download. Bump GitHub repos first (yarn set version produces yarn-<to>.cjs). For GitLab CEE midstream/distgit trees (gitlab.cee.redhat.com/rhidp/rhdh, …/rhdh-plugin-catalog) that only ship a checked-in release + ENV YARN=, copy that same yarn-<to>.cjs into .yarn/releases/ (and remove the old yarn-<from>.cjs), then run the script so text pins update. Use glab against gitlab.cee.redhat.com (not gitlab.com) when opening MRs for those roots.
Use an exact --to (not stable) so every repo matches the Renovate/reference PR.
Script
SKILL="skills/rhdh-bump-yarn"
# GH first (4.12/4.14 defaults), then GL CEE (after copying yarn-<to>.cjs into distgit if needed)
node "$SKILL/scripts/bump-yarn.js" --to 4.17.1 \
--root /path/to/rhdh-plugins \
--root /path/to/rhdh \
--root /path/to/overlays \
--root /path/to/rhdh-cli \
--root /path/to/rhdh-downstream \
--root /path/to/rhdh-plugin-catalog
Defaults:
--from 4.12.0,4.14.1— only those move (4.8.1/4.9.2/ dcm4.15.0stay). Repos already on--to(e.g. rhdh-cli at 4.17.1) are no-ops.- Lock refresh for every
yarn.lockunder--to(incl. inherited root pin); skipdist-dynamicand explicit older pins. Full multi-repo regen can take >45 minutes; use--no-refresh-locksto skip
node "$SKILL/scripts/bump-yarn.js" --scan --root /path/to/repo
node "$SKILL/scripts/bump-yarn.js" --to 4.17.1 --root /path/to/repo --dry-run
node "$SKILL/scripts/bump-yarn.js" --to 4.17.1 --root /path/to/repo --no-refresh-locks
Agent workflow
- Confirm
--to/--from. - Resolve local
--rootcheckouts; bump GitHub roots first. - For GitLab CEE midstream/distgit (
gitlab.cee.redhat.com/rhidp/rhdh,…/rhdh-plugin-catalog): copyyarn-<to>.cjsfrom a GH bump into.yarn/releases/(drop old--frombinary). --scan, then bump (--dry-runfirst if unfamiliar).- Summarize set-version dirs, extras, lock refresh.
- Commit / PR·MR only when the user asks (
jira-pr-mr-link).
Checklist
- Exact
--tomatches the reference bump -
--fromcovers intended versions only (default 4.12/4.14; add others only when needed) - GH bumped before GL CEE; distgit binary copied (no curl)
- Containerfile /
ENV YARN=extras checked - Lock refresh done (or
--no-refresh-locksintentional) - New
yarn-*.cjsbinaries executable (100755)