Skip to content

Automated npm dependency updates

Problem

Dependabot only covered GitHub Actions. npm dependencies were manually updated, risking stale packages with known vulnerabilities and missing performance/security patches.

Proposal

Extend .github/dependabot.yml to include package-ecosystem: npm with:

  • Weekly schedule
  • Grouped updates: dev deps (minor+patch) and prod deps (patch) in separate PRs
  • Ignore framework-level deps managed via root overrides (react, next, typescript, plus zod, tailwindcss, vitest)
  • 10 open PR limit to avoid PR flood

Acceptance criteria

  • .github/dependabot.yml includes npm ecosystem
  • Dev dependency minor/patch updates grouped
  • Production dependency patch updates grouped
  • React, Next.js, TypeScript excluded (managed via overrides)
  • Open PR limit set to 10

Out of scope

  • Auto-merge for patch updates (requires branch protection rule changes)
  • Renovate evaluation (Dependabot is sufficient for current scale)
  • npm audit CI step (existing npm install warnings surface vulnerabilities)

Notes / decisions log

  • 2026-07-07: Proposed. Dependabot remains preferred over Renovate for simplicity because GH Actions updates already run there. Major version bumps should remain individual PRs for deliberate review.
  • 2026-07-09: Deferred — moved to tickets/deferred/; no active implementation planned.
  • 2026-08-03: Implemented. npm ecosystem added to .github/dependabot.yml with weekly schedule, grouped dev (minor+patch) and prod (patch) updates, open-pull-requests-limit: 10, and ignore list for override-managed stacks (react, react-dom, next, typescript, zod, tailwindcss, vitest). Ticket moved out of deferred/.
  • 2026-08-30: Expanded the npm ignore list to every root overrides key (next-intl, lucide-react, react-hook-form, kysely, better-sqlite3, pg, happy-dom, @playwright/test, @types/react, @types/react-dom, hono, undici, minimatch, brace-expansion, tar, tailwind-merge) so Dependabot does not fight coordinated monorepo bumps.
  • 2026-08-30: Held @vitejs/plugin-react at 6.0.5 (exact). ^6.1.1 fails npm install with ERESOLVE: optional peer @rolldown/plugin-babel pulls @babel/plugin-transform-runtime@8 (@babel/core@^8) while the tree still has Babel 7. This repo does not use React Compiler or that optional Babel path.
  • 2026-08-30: Dropped the nested jsdom.undici ^7.28.0 override. jsdom 30.0.1 depends on undici ^8.9.0. Keep the global undici ^6.28.0 pin for Next/Auth.js, and override jsdom.undici to ^8.9.0 so jsdom can nest undici 8. Declared tldts@7.4.11 on CMS (and an override) so HTML→Portable Text import tests resolve tough-cookie's public-suffix helper.
  • 2026-08-30: Pinned several root overrides to exact versions (next 16.3.3, lucide-react 1.37.0, react-hook-form 7.87.0, next-intl 4.14.1, zod 4.5.4, kysely 0.29.5, pg 8.23.0, better-sqlite3 13.0.3). Caret overrides did not force lockfile upgrades (Next stayed 16.3.0 because @react-email/ui pins next@16.3.0). Keep caret overrides only where they match a root devDependency range (vitest, happy-dom, tailwindcss) to avoid npm EOVERRIDE.
  • 2026-08-30: Bumped root vercel to ^59.10.0 (CLI 59.10.0). App vercel.json build commands and scripts/vercel-db.mjs are unchanged (no blob CLI --access flags, no @vercel/client agent option). hono stays on override 4.13.5. CI does not invoke the Vercel CLI.
  • 2026-08-30: TypeScript 7.0.2 no-go. npx tsc --version reports 7.0.2, but import("typescript") only exposes version / versionMajorMinor (no createSourceFile / ScriptTarget). npm run check:route-config crashes (ts.ScriptTarget.Latest is undefined) because scripts/check-route-config.mjs uses the TS 6 compiler API. Pinned "typescript": "6.0.3" exact in root devDependencies and overrides until 7.1 ships a stable programmatic API. Dependabot already ignores typescript.
  • 2026-09-01: Catch-up after the 30 Aug inventory freeze. Bumped exact overrides that were pins for lockfile forcing, not product holds: next 16.3.4 (AVIF image optimization re-enabled after 16.3.3), lucide-react 1.39.0, next-intl 4.14.2. Also took in-range patches/minors: @portabletext/editor 8.1.1, @portabletext/toolbar 9.0.5, OTEL experimental family 0.222.0 + resources 2.11.0, posthog-js 1.424.0, posthog-node 5.51.6, nodemailer 9.1.0, shadcn 4.19.1 (CLI only), vercel 59.11.0. Left held: TypeScript 6.0.3, @vitejs/plugin-react 6.0.5, global undici 6, next-auth v5 beta.
  • 2026-10-23: Coordinated bump. In-range patches and minors moved together with their root overrides (Biome 2.6.2, Playwright 1.64.1, Zod 4.6.7, next-intl 4.14.9, and the rest of that set). LMS yaml is a devDependency, matching CMS. Biome 2.6 schema URLs were migrated; markdown stays on Prettier; noComponentHookFactories is off because the shadcn adapter factories close over injected host primitives. Playwright describe(title, options, callback) and locator.innerText() keep targeted ignores.
  • 2026-10-23: lucide-react 1.61.0 in CMS, LMS, UI, widget-renderers, and the exact override. No renamed icon imports failed typecheck.
  • 2026-10-23: React and react-dom 19.3.1, with peer floors ^19.3.1. Pulled forward with the Portable Text bump because @portabletext/editor 8.2.7 and @portabletext/toolbar 9.0.21 peer react@^19.3.1. One React copy.
  • 2026-10-23: Next 16.4.3 with react-email and exact @react-email/ui 6.11.3. The UI package still pins next@16.4.1; the root exact next override is what selects 16.4.3, and npm 11 only applies that pin on a clean resolve. src/proxy.ts still registers as Proxy. Default image formats remain image/webp (AVIF is allowed, not the default). AGENTS.md baseline is Next.js 16.4. Root engines.node is >=24.11.0 for tsup 9.
  • 2026-10-23: OpenTelemetry log bridge moved to the stable SDK: sdk-logs 3.0.0, exporter-logs-otlp-http 0.300.0, resources 3.0.0, api-logs 0.223.0. Exact override @opentelemetry/api 1.10.0 (Dependabot ignores it) so Next, posthog-node, and Vitest do not hoist API 1.9 beside the SDK's >=1.10 <1.11 peer. The log-sink public API is unchanged; the existing LoggerProvider options typecheck on SDK 3.
  • 2026-10-23: Vitest and @vitest/coverage-v8 5.0.5 with happy-dom 21.0.4. npm run test:coverage passed. The widget-renderers happy-dom disableChildFrameNavigation setting still applies. tsup 9.0.0 builds portable-text and widget-renderers (npm run build:packages). @apidevtools/swagger-parser 13.1.0. Vercel CLI ^65.2.0; scripts/vercel-db.mjs and the docs build script do not call the CLI, so no flag migration. nodemailer 10.2.1; dropped @types/nodemailer because 10 ships its own declarations and the email package typechecks without them.
  • 2026-10-23: Held @vitejs/plugin-react at exact 6.0.5 again. 6.1.2 still ERESOLVEs: optional @rolldown/plugin-babel pulls Babel 8 while the tree has Babel 7. Do not use --legacy-peer-deps.
  • 2026-10-23: Held @hookform/resolvers at 5.9.2 (CMS, LMS, UI peer and dev, exact override). 6.0.0 ERESOLVEs because optional peer effect@^4 conflicts with effect@3 already in the tree via @typeschema. Call sites only use zodResolver.
  • 2026-10-23: undici stays split after the CLI 65 bump. Requirers still disagree: @vercel/blob wants 6, the Vercel CLI pins 5.29.0, jsdom 30 wants 8, and shadcn / @vercel/sandbox want 7. Global override undici@^6.28.0 resolves 6.29.1; jsdom.undici stays ^8.9.0 (lockfile 8.12.3). Do not collapse to one version.
  • 2026-10-23: npm stays packageManager npm@11.12.1 and engines.npm >=11.0.0. npm 12.2.1 did not change resolved versions, but it rewrote thousands of lockfile lines and blocked install scripts (better-sqlite3, esbuild, @swc/core, and others) under the new allowScripts default. That install-behavior change is enough to keep npm 11.
  • 2026-10-23: Holds unchanged. TypeScript stays exact 6.0.3 (typescript@latest 7.0.2 still does not expose createSourceFile / ScriptTarget). next-auth stays 5.0.0-beta.32 (newest beta tag; the latest tag is still Auth.js v4).
  • 2026-10-29: CMS and LMS now declare "type": "module", matching the ten workspace packages. Vitest 5 was warning that their configs are ESM syntax loaded as CommonJS. Bare require("better-sqlite3") in the CMS database client, reset script, and seed script now goes through createRequire so the SQLite driver stays lazy. node:fs and node:path in the database client are static imports. import.meta.dirname replaced bare __dirname in the CMS OpenAPI writer, Playwright config, and CMS e2e support files. Vitest still injects __dirname inside test files, so those eight tests were left as they are after both app coverage suites passed. npm run check, CMS and LMS coverage, scratch-database migrate and seed, both OpenAPI generators, both Next builds, and the CMS Playwright suite (412 passed) all succeeded.
  • 2026-10-30: Coordinated bump of everything that was behind registry latest, except the standing holds below. In-range: Portable Text editor 8.2.9 and toolbar 9.0.23, marked 18.1.2, nodemailer 10.3.1, posthog-js 1.442.1, posthog-node 5.60.1, shadcn 4.23.0, Vercel CLI 65.8.0, @types/node 26.6.6, react-resizable-panels 4.15.2 (CMS, LMS, UI peer and dev), @upstash/redis 1.40.0. @upstash/ratelimit and @upstash/redis were removed from the LMS manifest; only @open-learning-hub/server imports them. React Email and exact @react-email/ui moved together to 6.11.6; npm ls next is still a single 16.4.3. lucide-react 1.64.0 across the exact override, CMS, LMS, UI, and widget-renderers; typecheck found no renamed icons. react-hook-form 7.91.0 across the exact override, CMS, LMS, and UI. hono override is 4.13.14. Vercel CLI 65.8 no longer depends on @modelcontextprotocol/sdk, which was the only hono parent, so the lockfile has no hono package until something requires it again. @hookform/resolvers 6.0.2 now installs (CMS, LMS, UI peer and dev, exact override). The 23 Oct Effect 4 conflict is gone; effect is not in the tree, and call sites still use zodResolver. npm run check, npm run test:coverage, and npm run build (both Next apps on 16.4.3, plus tsup for portable-text and widget-renderers) passed.
  • 2026-10-30: Standing holds, do not float these to the registry latest tag. TypeScript stays exact 6.0.3 (latest is 7.0.2 and does not export createSourceFile / ScriptTarget; 7.1 is still beta, stable target 24 Nov 2026, and scripts/check-route-config.mjs still uses the TypeScript 6 compiler API). Biome stays exact 2.6.3 (registry latest is 2.6.4); all 11 biome.json schemas point at 2.6.3, and Dependabot ignores @biomejs/biome. next-auth stays 5.0.0-beta.32 (newest beta; latest is still Auth.js v4). minimatch stays 10.2.6 (newest 10.x; 11 breaks glob@^10). undici stays split: global ^6.28.0 resolves 6.29.1, jsdom.undici resolves 8.12.3. npm stays packageManager npm@11.12.1. @vitejs/plugin-react stays exact 6.0.5; 6.1.2 still ERESOLVEs because optional @rolldown/plugin-babel pulls Babel 8. Do not use --legacy-peer-deps. Next stays 16.4.3 (16.5 is canary). Hono 5 stays out (5.0.0-rc.1).