Monthly Dependency Updates — Design

Goal

A repeatable, human-executed monthly runbook that keeps the project's npm dependencies current and its dependency security advisories resolved, without breaking the build or the site's appearance.

Non-goals

Decisions (from brainstorm)

Question Decision
Automation approach Manual monthly checklist
Version range covered Everything incl. majors
Build verification npm run build + manual visual check
Branch workflow Branch then merge to main
Runbook format Markdown checklist, no scripts
Session structure Risk-tiered phases (patch batch → minor batch → each major individually → audit fix)

Deliverable

A single new file: docs/dependency-update-runbook.md. No code or config changes outside docs/.

Branch & commit conventions

Semver tiering rule (core mental model)

For each row in npm outdated, compare Current / Wanted (max version satisfying package.json range) / Latest (newest published):

Install command per phase:

Current project state, pre-categorized (from npm outdated at design time):

Dep Current Wanted Latest Patch Minor Major
@11ty/eleventy 3.1.2 3.1.6 3.1.6 →3.1.6
@11ty/eleventy-upgrade-help 3.0.1 3.0.2 3.0.2 →3.0.2
alpinejs 3.15.0 3.15.12 3.15.12 →3.15.12
tailwindcss 3.4.17 3.4.19 4.3.3 →3.4.19 →4.3.3
autoprefixer 10.4.21 10.5.4 10.5.4 →10.5.4
postcss 8.5.6 8.5.23 8.5.23 →8.5.23
postcss-preset-env 10.4.0 10.6.1 11.3.2 →10.6.1 →11.3.2

This table is illustrative; the runbook re-derives it from a fresh npm outdated each month.

Phased procedure

Phase 0 — Prep

  1. git checkout main && git pull --ff-only
  2. git checkout -b chore/dep-updates-YYYY-MM
  3. npm outdated → record Current / Wanted / Latest for every dep; tier each row per the rule above.
  4. npm audit --omit=dev → record open advisories (severity + advisories count).

Phase 1 — Patches

  1. For each patch-tier dep: npm install <pkg>@<Wanted>
  2. npm run build → must succeed with no errors.
  3. Commit: chore(deps): bump patch versions YYYY-MM

Phase 2 — Minors

  1. For each minor-tier dep: npm install <pkg>@<Wanted>
  2. npm run build → must succeed.
  3. Commit: chore(deps): bump minor versions YYYY-MM

Phase 3 — Majors (one dep at a time)

For each major-tier dep:

  1. npm install <pkg>@latest
  2. Consult the "Known tricky majors" appendix; apply listed migration steps.
  3. npm run build → must succeed.
  4. npm run dev → visual check across the pages listed below.
  5. Defer escape hatch: if the build or visual check fails and the fix is not quick, revert that dep only — git checkout package.json package-lock.json && npm ci — note the deferral with reason in the PR, and move on. Do not force a stuck major.
  6. Commit (only if not deferred): chore(deps)!: bump <pkg> to v<N>

Phase 4 — Security audit

  1. npm audit --omit=dev → see what remains.
  2. npm audit fix → apply safe fixes.
  3. npm run build → must succeed.
  4. Commit: chore(security): npm audit fix YYYY-MM
  5. Any remaining unfixable advisories (typically transitive deps awaiting an upstream release) → note in the PR. Do not force --force or hand-edit the lockfile.

Phase 5 — Final verification & merge

  1. npm run dev → full visual check across the pages below.
  2. git fetch origin && git rebase origin/main (CloudCannon may have pushed content meanwhile).
  3. npm run build → must pass after the rebase.
  4. Push branch; open PR titled chore(deps): monthly dependency updates YYYY-MM. PR body contains:
  5. Merge to main.

Visual check pages

After npm run dev, visit each of these and confirm layout, Tailwind styling, and Alpine interactions work:

Rollback

Known tricky majors (appendix)

tailwindcss v4

CSS-first config. Migration touches the current PostCSS-based setup:

The build will likely break the postcss.config.js / css/tailwind.css setup on first bump. This is realistic to defer to a dedicated session rather than attempt inside the monthly runbook. The runbook's defer escape hatch exists precisely for this case.

postcss-preset-env v11

Check the changelog at bump time for stage / preset / breaking option changes. Lower risk than Tailwind v4, but verify CSS output is unchanged by the visual check.

Cadence

Monthly, first week of the month. No calendar automation (manual by design).

Open questions

None.