Update major deps

From makeup/makeup-js · View interactive version

Update major deps is an AI agent skill from the GitHub repository makeup/makeup-js. Perform major dependency updates one logical group at a time, assessing breakage risk, then build, test, and create a signed commit per group

How to use this skill

Skill file

You are performing major version updates of devDependencies in this monorepo, one logical group at a time. For each group you assess breakage risk, apply the bump, build, test, and — only when green — create a single signed commit. You never push; the user pushes themselves.

Input

Core principles


Process

1. Preflight

2. Detect and group major updates

Run a dry check:

npx --yes npm-check-updates --dep dev

Identify entries whose major version increases. Then group coupled packages that must move together:

Order the groups lowest risk first (see step 3) so cheap wins land before risky changes.

3. Assess breakage risk (per group)

Produce a risk level of none / low / medium / high with a short rationale, using these signals:

```

npm view <pkg>@<target> engines

node -v

```

State the level and rationale before touching anything.

4. Gate on risk

5. Apply the bump (lock-preserving)

Install the whole group to its new major in one command, e.g.:

npm install --save-dev @babel/core@^8 @babel/cli@^8 @babel/preset-env@^8

Confirm package.json reflects the new ranges.

Preserve the lockfile — never clean-nuke. Do not "fix" install problems with rm -rf node_modules package-lock.json && npm install. A lockfile-free resolve re-floats _unrelated_ deps to the latest in-range version, which can land on a release your registry/security proxy blocks (e.g. a 403 Forbidden on prettier@3.8.5 while the committed lock safely pinned 3.8.4). Keeping the lockfile as the baseline means only the group you target changes.

Handling ERESOLVE on coupled toolchains. Upgrading a coupled family (e.g. @babel/* core+cli+preset-env) against an existing lock can ERESOLVE because npm anchors on the _locked_ old version (Found: @babel/cli@7.29.7) while installing the new one — an incremental-resolver deadlock, not a real incompatibility. Both targeted (npm install pkg@^8) and full (npm install) forms can hit it. The lock-preserving fix:

npm install --legacy-peer-deps

With the lockfile present, this keeps every other dep pinned (so prettier stays at its safe version) while letting the babel subtree move to v8. After it completes, verify the resulting tree is self-consistent before trusting it:

npm ls @babel/core @babel/cli @babel/preset-env
npm ls babel-plugin-polyfill-corejs3   # must be a major that supports core 8 (1.x)
npm ls prettier                        # must be unchanged / safe version

6. Build and test

npm run build
npm test

7. Commit (signed, commit-only)

Stage exactly the files this group changed (package.json, package-lock.json, and any legitimately regenerated build artifacts). For compile-affecting groups like @babel/* this includes the regenerated docs/**/*.min.js(.map) bundles and packages/**/dist/cjs/index.js outputs — stage them explicitly (git add package.json package-lock.json docs packages). Review with git status --short first. Never git add -A and never sweep in unrelated working-tree changes (e.g. skill files under .claude/ or CLAUDE.md).

Use a Conventional Commits message (the repo enforces commitlint + a husky commit-msg hook). Examples:

build(deps-dev): bump @types/node from 25 to 26
build(deps-dev): bump @babel/core, @babel/cli and @babel/preset-env from 7 to 8

Commits are GPG-signed automatically (commit.gpgsign=true). Verify with:

git log -1 --format='%h %G? %an <%ae>'

%G? should print G (good signature). Do not push.

8. Repeat and report

Move to the next group. When done (or stopped), output a summary table — one row per group, ordered as processed:

| Group | Risk | Build/Test | Commit |

| ----------------------- | -------------------- | ---------- | ------------- |

| <pkg> <old>→<new> | none/low/medium/high | pass/fail | <short-sha> |

List any groups that were skipped (risk not confirmed) or failed (left uncommitted for follow-up).


Safety reminders

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.