From 84e232a58ad5550d1b5ccce8c1a50a3cfe05cb46 Mon Sep 17 00:00:00 2001 From: chrisjwalk-bot <268224883+chrisjwalk-bot@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:41:27 -0400 Subject: [PATCH 1/5] chore: add update-packages skill for Copilot CLI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/skills/update-packages/SKILL.md | 104 ++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 .github/skills/update-packages/SKILL.md diff --git a/.github/skills/update-packages/SKILL.md b/.github/skills/update-packages/SKILL.md new file mode 100644 index 00000000..16549c14 --- /dev/null +++ b/.github/skills/update-packages/SKILL.md @@ -0,0 +1,104 @@ +--- +name: update-packages +description: > + Update all npm packages to their latest versions using the update-packages + script. Use this when asked to update, upgrade, or consolidate dependencies, + or to close dependabot PRs. +--- + +## Update Packages Workflow + +Follow these steps in order. + +### 1. Create a GitHub issue (as `chrisjwalk`) + +```bash +gh issue create --title "chore: update all packages to latest" --body "..." +``` + +Note the issue number (e.g. #42). + +### 2. Create a branch off main + +```bash +git checkout main && git pull +git checkout -b feat/consolidate-deps- +``` + +### 3. Run the update-packages script + +Always omit `typescript` — upgrading TypeScript is a breaking change that +requires a dedicated branch and tsconfig work (see issue #101 for context). + +```bash +npx ts-node ./tools/update-packages/src/main.ts --omit typescript --interactive false +``` + +The script will: + +- Detect all outdated packages via `pnpm outdated` +- Run `nx migrate @latest` for each one +- Merge any generated migrations into `migrations.json` +- Print next steps (install + run migrations if needed) + +### 4. Install updated packages + +```bash +pnpm install --no-frozen-lockfile +``` + +If the install fails, check for postinstall build errors (e.g. tsconfig +issues in `tools/builders/dotnet-builder`). + +### 5. Run migrations (only if migrations.json was updated) + +```bash +npx nx migrate --run-migrations +``` + +### 6. Run all tests + +```bash +nx reset +nx run-many -t build,test +``` + +All 9 projects must pass before committing. + +### 7. Commit + +```bash +git add -A +git commit -m "chore: update all packages to latest (closes #) + +Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" +``` + +### 8. Push and open PR as `chrisjwalk-bot`, then switch back + +```bash +gh auth switch --user chrisjwalk-bot +git push origin feat/consolidate-deps- +gh pr create --title "chore: update all packages to latest" --body "Closes # ..." +gh auth switch --user chrisjwalk +``` + +### 9. Close stale dependabot PRs + +Close any open dependabot PRs that are now covered by this update: + +```bash +gh pr list --author "app/dependabot" --json number,title +gh pr close --comment "Covered by consolidated update PR" --delete-branch +``` + +Leave open any dependabot PRs for packages that were intentionally omitted +(e.g. TypeScript major version bumps). + +## Notes + +- `typescript` is always omitted — track TS upgrades separately in issue #101 +- If a package is a transitive dep not shown by `pnpm outdated`, use + `pnpm.overrides` in `package.json` to force the version +- After merging, watch for new dependabot PRs — dependabot may recreate stale + ones; close them if the package was already updated From cada383e560c3e8e0816109dd74860d872f20fde Mon Sep 17 00:00:00 2001 From: chrisjwalk-bot <268224883+chrisjwalk-bot@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:51:06 -0400 Subject: [PATCH 2/5] chore: move update-packages skill to .claude/skills Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- {.github => .claude}/skills/update-packages/SKILL.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.github => .claude}/skills/update-packages/SKILL.md (100%) diff --git a/.github/skills/update-packages/SKILL.md b/.claude/skills/update-packages/SKILL.md similarity index 100% rename from .github/skills/update-packages/SKILL.md rename to .claude/skills/update-packages/SKILL.md From 8ade9c684743559a87e8dd2b7bc19a817d1a8bef Mon Sep 17 00:00:00 2001 From: chrisjwalk-bot <268224883+chrisjwalk-bot@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:55:27 -0400 Subject: [PATCH 3/5] chore: remove repo-specific workflow from update-packages skill Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .claude/skills/update-packages/SKILL.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.claude/skills/update-packages/SKILL.md b/.claude/skills/update-packages/SKILL.md index 16549c14..517cd1c8 100644 --- a/.claude/skills/update-packages/SKILL.md +++ b/.claude/skills/update-packages/SKILL.md @@ -10,7 +10,7 @@ description: > Follow these steps in order. -### 1. Create a GitHub issue (as `chrisjwalk`) +### 1. Create a GitHub issue to track the update ```bash gh issue create --title "chore: update all packages to latest" --body "..." @@ -27,8 +27,7 @@ git checkout -b feat/consolidate-deps- ### 3. Run the update-packages script -Always omit `typescript` — upgrading TypeScript is a breaking change that -requires a dedicated branch and tsconfig work (see issue #101 for context). +Optionally omit any packages you want to track separately (e.g. `typescript`) or that may have dependency conflicts. ```bash npx ts-node ./tools/update-packages/src/main.ts --omit typescript --interactive false @@ -74,13 +73,11 @@ git commit -m "chore: update all packages to latest (closes #) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" ``` -### 8. Push and open PR as `chrisjwalk-bot`, then switch back +### 8. Push and open PR ```bash -gh auth switch --user chrisjwalk-bot git push origin feat/consolidate-deps- gh pr create --title "chore: update all packages to latest" --body "Closes # ..." -gh auth switch --user chrisjwalk ``` ### 9. Close stale dependabot PRs @@ -97,7 +94,7 @@ Leave open any dependabot PRs for packages that were intentionally omitted ## Notes -- `typescript` is always omitted — track TS upgrades separately in issue #101 +- `typescript` major upgrades are best tracked in a dedicated branch due to tsconfig breaking changes - If a package is a transitive dep not shown by `pnpm outdated`, use `pnpm.overrides` in `package.json` to force the version - After merging, watch for new dependabot PRs — dependabot may recreate stale From 8c505ba540277f856e862d762d872e6359243ab5 Mon Sep 17 00:00:00 2001 From: chrisjwalk-bot <268224883+chrisjwalk-bot@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:56:29 -0400 Subject: [PATCH 4/5] chore: remove Copilot co-author trailer from skill example Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .claude/skills/update-packages/SKILL.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.claude/skills/update-packages/SKILL.md b/.claude/skills/update-packages/SKILL.md index 517cd1c8..31d49e76 100644 --- a/.claude/skills/update-packages/SKILL.md +++ b/.claude/skills/update-packages/SKILL.md @@ -68,9 +68,7 @@ All 9 projects must pass before committing. ```bash git add -A -git commit -m "chore: update all packages to latest (closes #) - -Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" +git commit -m "chore: update all packages to latest (closes #)" ``` ### 8. Push and open PR From 9de5bd1da3c52089d69de25df7aa8f0770b733e9 Mon Sep 17 00:00:00 2001 From: chrisjwalk-bot <268224883+chrisjwalk-bot@users.noreply.github.com> Date: Sat, 4 Apr 2026 13:58:50 -0400 Subject: [PATCH 5/5] chore: generalize major version omit guidance in update-packages skill Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .claude/skills/update-packages/SKILL.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.claude/skills/update-packages/SKILL.md b/.claude/skills/update-packages/SKILL.md index 31d49e76..fb8b88a5 100644 --- a/.claude/skills/update-packages/SKILL.md +++ b/.claude/skills/update-packages/SKILL.md @@ -27,7 +27,9 @@ git checkout -b feat/consolidate-deps- ### 3. Run the update-packages script -Optionally omit any packages you want to track separately (e.g. `typescript`) or that may have dependency conflicts. +Use `--omit` to skip any packages with known breaking changes or major version +bumps that need separate handling. Major version upgrades should be omitted by +default unless you've verified they are safe. ```bash npx ts-node ./tools/update-packages/src/main.ts --omit typescript --interactive false @@ -92,7 +94,8 @@ Leave open any dependabot PRs for packages that were intentionally omitted ## Notes -- `typescript` major upgrades are best tracked in a dedicated branch due to tsconfig breaking changes +- Omit packages with major version bumps by default — run them separately once + you've confirmed they are safe (e.g. no breaking changes affecting the codebase) - If a package is a transitive dep not shown by `pnpm outdated`, use `pnpm.overrides` in `package.json` to force the version - After merging, watch for new dependabot PRs — dependabot may recreate stale