Skip to content

chore: gradual dependency upgrade (P0–P5)#59

Open
jamby77 wants to merge 8 commits intomasterfrom
chore/deps-gradual-upgrade
Open

chore: gradual dependency upgrade (P0–P5)#59
jamby77 wants to merge 8 commits intomasterfrom
chore/deps-gradual-upgrade

Conversation

@jamby77
Copy link
Collaborator

@jamby77 jamby77 commented Mar 24, 2026

Closes #57

Summary

Phased dependency upgrade across the monorepo, targeting all actionable outdated packages while deferring items blocked on upstream ecosystem support.

P0 — Low-risk bumps

  • Patch/minor version bumps across all packages (shared, agent, mcp, semantic-cache)

P1 — API

  • @fastify/static 8 → 9, class-validator 0.14 → 0.15, @types/supertest 6 → 7
  • typescript-eslint patch, ESLint migrated to flat config (eslint.config.mjs)

P2 — CLI

  • commander 12 → 14, esbuild 0.25 → 0.27

P3 — Entitlement (breaking upgrades)

  • Prisma 5 → 7: driver adapters (@prisma/adapter-pg), prisma.config.ts, removed url from schema, updated all import paths to generated client
  • Stripe 14 → 20: removed apiVersion from constructor, current_period_start/end moved to subscription.items.data[0]
  • Jest 29 → Vitest 4: migrated test runner, eliminated ts-jest/@types/jest, native ESM/TS support
  • Nest CLI 10 → 11, reflect-metadata 0.1 → 0.2, @types/node 20 → 22
  • ESM: added "type": "module", updated tsconfig.json (module: ESNext, moduleResolution: bundler)
  • Added integration tests for entitlement validation flow (6 tests against real Postgres)
  • Added scripts/run-integration-tests.sh (Docker checks, schema push, test runner)

P4 — Web

  • Vite 6 → 8 (Rolldown), @vitejs/plugin-react 4 → 6, lucide-react 0.x → 1.x
  • React 18 → 19 types (useRef explicit init, Recharts Tooltip formatter arity)

P5 — Tailwind + ESLint

  • Tailwind CSS 3 → 4: CSS-first config (@import "tailwindcss", @theme directives), @tailwindcss/vite plugin, removed postcss.config.js + tailwind.config.js
  • globals 15 → 17, eslint-plugin-react-hooks flat config fix

Deferred (blocked on upstream)

Package Blocker
@lancedb/lancedb 0.23 → 0.27 apache-arrow peer conflict (needs ≤18.1.0, have 21.x)
@inquirer/prompts 7 → 8 ESM-only; CLI bundles it as CJS external
typescript 5.9 → 6.0 typescript-eslint + ts-jest (api) lack TS 6 support
@types/node 22 → 25 Aligned with TS 6 wave

Verification

  • pnpm build — all packages/apps build clean (Turbo)
  • tsc --noEmit — no type errors in api, web, entitlement, cli
  • pnpm --filter @betterdb/semantic-cache test — passes
  • pnpm --filter @app/entitlement test — 18 tests pass (12 unit + 6 integration)
  • ESLint — clean for web and api
  • Integration tests verified against Docker Postgres (Prisma 7 CRUD, entitlement flow)

Made with Cursor

@jamby77 jamby77 requested a review from KIvanow March 24, 2026 10:32
@jamby77
Copy link
Collaborator Author

jamby77 commented Mar 24, 2026

image

Dev instance after the updates

jamby77 added 8 commits March 24, 2026 20:25
- Upgraded various dependencies in package.json files, including TypeScript, ESLint, Prettier, and several NestJS packages.
- Replaced the old ESLint configuration files with new ones using the modern ES module format.
- Removed outdated ESLint configuration files from apps/api and apps/web.
- Added new tsconfig.eslint.json files for better TypeScript integration with ESLint.
- Updated lock files to reflect the changes in dependencies.
- Enhanced linting commands for improved code quality checks.
- Added peer dependency rules for eslint-plugin-react-hooks in package.json.
- Updated @types/react and @types/react-dom versions to 19.2.14 and 19.2.3 respectively.
- Adjusted globals version to 15.15.0 across multiple package.json files.
- Introduced parser options in ESLint configuration for better TypeScript support.
- Refactored useRef initialization in useVersionCheck.ts for improved type safety.
- Enhanced KeyAnalytics component with better formatting and tooltip handling for charts.
- Updated devDependencies in multiple packages to ensure compatibility with the latest TypeScript and Node types.
- Upgraded lucide-react to version 1.0.1 in apps/web.
- Updated @vitejs/plugin-react to version 6.0.1 in apps/web.
- Bumped typescript-eslint to version 8.57.2 in apps/web, apps/api, and packages/cli.
- Updated class-validator to version 0.15.1 in proprietary/entitlement and apps/api.
- Upgraded @fastify/static to version 9.0.0 in apps/api.
- Updated @types/supertest to version 7.2.0 in apps/api.
- Upgraded commander to version 14.0.3 in packages/cli.
- Updated esbuild to version 0.27.4 in packages/cli.
- Added new peer dependency rule for @nestjs/mapped-types in the root package.json.
- Updated `globals` version to 17.4.0 in apps/api and apps/web.
- Added `@tailwindcss/vite` dependency in apps/web.
- Removed outdated PostCSS and Tailwind configuration files from apps/web.
- Integrated Tailwind CSS into the Vite configuration for apps/web.
- Updated ESLint configuration to use `vitest` instead of `jest` for testing in proprietary/entitlement.
- Refactored tests to utilize `vitest` and updated related imports.
- Added new integration tests for entitlement functionality.
- Updated Prisma client and related configurations for better compatibility.
The entitlement package migrated from Jest to Vitest, but the API's
Jest config includes `../../proprietary` in its roots, causing it to
pick up Vitest-based specs that can't run under Jest/CJS.

Made-with: Cursor
Runs Vitest for entitlement specs (excluding integration tests that
require a running Postgres) alongside the existing API Jest suite.

Made-with: Cursor
Adds vitest ^4.1.1 as devDependency and "test": "vitest run" script.
The 2 existing test files already import from vitest — this just makes
them runnable via pnpm test.

Made-with: Cursor
@jamby77 jamby77 force-pushed the chore/deps-gradual-upgrade branch from c4bd62b to a70ddc8 Compare March 24, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review and update outdated npm packages (check dependabot and security recommendations, resolve the ones that are going to be handled by that)

1 participant