chore: update all dependencies to latest versions#45
Conversation
- React 18 → 19, react-dom 18 → 19, react-leaflet 4 → 5 - Tailwind CSS 3 → 4 with @tailwindcss/postcss, remove autoprefixer - @types/node 22 → 25, @types/supertest 6 → 7, @types/react 18 → 19 - chalk 5.3 → 5.6, portos-ai-toolkit 0.1 → 0.8, zustand 5.0.9 → 5.0.11 - actions/setup-node v4 → v6 in all GitHub Actions workflows - Fix React 19 compat: useRef initial values, JSX namespace, event types
The PostCSS plugin conflicts with Vite's CSS handling, causing @layer base errors. The Vite plugin is the recommended approach for Vite projects in Tailwind 4.
There was a problem hiding this comment.
Pull request overview
This PR updates the repo’s JS/TS dependencies (notably React 19, Tailwind CSS 4, react-leaflet 5, and portos-ai-toolkit 0.8) and applies a small set of migration edits needed to keep the client building and type-checking.
Changes:
- Bumped core frontend dependencies (React/React DOM, react-leaflet, react-router-dom, zustand, lucide-react) and related type packages.
- Migrated Tailwind CSS setup to v4 (
@tailwindcss/postcss,@import "tailwindcss",@config,@source) and removed autoprefixer usage. - Updated GitHub Actions workflows to
actions/setup-node@v6and applied a few React 19 typing fixes (React.JSX.Element, explicit event type).
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/package.json | Updates server deps (cors, portos-ai-toolkit) and bumps @types/node. |
| package.json | Bumps root deps/devDeps (chalk, @types/supertest). |
| package-lock.json | Lockfile updates reflecting React 19/Tailwind 4/portos changes and new transitive deps. |
| client/package.json | Bumps React 19 + ecosystem deps; adds @tailwindcss/postcss; removes autoprefixer. |
| client/postcss.config.js | Switches PostCSS plugin to @tailwindcss/postcss. |
| client/tailwind.config.js | Removes content/safelist in favor of Tailwind 4 scanning setup. |
| client/src/index.css | Migrates to Tailwind 4 directives (@import, @config, @source). |
| client/src/components/ui/CopyButton.tsx | React 19 useRef init change for timeout ref. |
| client/src/components/ancestry-tree/FamilyUnitCard.tsx | React import rework + React.JSX.Element typing. |
| client/src/components/ancestry-tree/ConnectionLine.tsx | Adds React import + React.JSX.Element[] typing. |
| client/src/components/ai/AiDiscoveryModal.tsx | Adds explicit click event typing and React import. |
| .github/workflows/validate-mocks.yml | Updates setup-node action to v6. |
| .github/workflows/release.yml | Updates setup-node action to v6. |
| .github/workflows/ci.yml | Updates setup-node action to v6 across jobs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "react-hot-toast": "^2.6.0", | ||
| "react-leaflet": "^4.2.1", | ||
| "react-router-dom": "^7.1.1", | ||
| "react-leaflet": "^5.0.0", | ||
| "react-router-dom": "^7.13.1", |
There was a problem hiding this comment.
Upgrading to react-router-dom@7.13.1 (and Tailwind 4’s tooling) brings an effective minimum Node.js version of 20 (per package engines). Since the repo currently doesn’t declare an engines.node constraint, developers on Node 18 may see install/build failures. Consider adding an explicit Node >=20 engine requirement (and aligning docs) as part of this upgrade.
| "react": "^18.3.1", | ||
| "react-dom": "^18.3.1", | ||
| "lucide-react": "^0.577.0", | ||
| "portos-ai-toolkit": "^0.8.0", |
There was a problem hiding this comment.
portos-ai-toolkit is upgraded here alongside React 19, but the toolkit’s published peer range in the lockfile is still React 18. Given the client imports portos-ai-toolkit/client, this is likely to result in multiple React versions in the dependency tree and runtime hook errors. Please ensure the toolkit version used has React 19-compatible peer ranges before merging.
| "portos-ai-toolkit": "^0.8.0", | |
| "portos-ai-toolkit": "^1.1.0", |
server/package.json
Outdated
| "@types/cors": "^2.8.17", | ||
| "@types/express": "^5.0.0", | ||
| "@types/node": "^22.10.2", | ||
| "@types/node": "^25.3.5", |
There was a problem hiding this comment.
CI/workflows run Node 20, but @types/node is bumped to v25. This can make TypeScript believe newer Node APIs exist and mask runtime incompatibilities on Node 20. Consider pinning @types/node to the major that matches the supported runtime (or explicitly documenting/enforcing a higher Node runtime).
| "@types/node": "^25.3.5", | |
| "@types/node": "^20.0.0", |
| export function CopyButton({ text, label = 'Copied!', size = 14, className = '' }: CopyButtonProps) { | ||
| const [copied, setCopied] = useState(false); | ||
| const timeoutRef = useRef<ReturnType<typeof setTimeout>>(); | ||
| const timeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined); |
There was a problem hiding this comment.
useRef<ReturnType<typeof setTimeout>>(undefined) makes the ref type exclude undefined while initializing it with undefined. This can lead to an incorrect timeoutRef.current type and may fail type-checking under strict settings. Consider typing the ref as ReturnType<typeof setTimeout> | undefined (or null) to match the initial value and subsequent assignments.
- Revert React 19 / react-leaflet 5 (portos-ai-toolkit@0.8.0 needs ^18.3.1) - Pin @types/express-serve-static-core@~5.0.7 to avoid breaking ParamsDictionary change - Move @testing-library/react to client workspace to prevent React duplication - Revert React 19-specific code changes (JSX namespace, useRef, event types)
Summary
Updates all dependencies to latest compatible versions, closing 8 of 11 open dependabot PRs.
Updated
@tailwindcss/viteplugin (removed postcss.config.js, autoprefixer)Not Updated (blocked by portos-ai-toolkit requiring React ^18.3.1)
Tailwind 4 Migration
@tailwind base/components/utilitieswith@import "tailwindcss"@configfor backward-compatible JS config loading@tailwindcss/viteplugin instead of PostCSS (recommended for Vite projects)autoprefixerandpostcss(built into TW4)contentandsafelistfrom JS config (handled by TW4 auto-detection +@source)Closes Dependabot PRs
Closes #28 (actions/setup-node 4 → 6)
Closes #29 (@types/supertest 6 → 7)
Closes #31 (zustand 5.0.9 → 5.0.11)
Closes #32 (autoprefixer — removed, built into TW4)
Closes #34 (tailwindcss 3 → 4)
Closes #36 (portos-ai-toolkit 0.1 → 0.8)
Closes #37 (chalk 5.3 → 5.6)
Remaining (blocked on React 19 support in portos-ai-toolkit)
Test plan
npm run buildpasses (shared, server, client)npm run test:unit— 62 tests passnpm run test:integration— 37 tests pass