Skip to content

chore: upgrade dependencies and fix compatibility - #58

Merged
l7wei merged 2 commits into
mainfrom
l7wei-update-dependencies
Sep 28, 2026
Merged

l7wei merged 2 commits into
mainfrom
l7wei-update-dependencies

Conversation

@l7wei

@l7wei l7wei commented Sep 28, 2026

Copy link
Copy Markdown
Member

The npm dependency set was behind current releases, and upgrading exposed UI and server-rendering compatibility issues. This updates the application and development toolchain while keeping clean installs and production builds working.

  • Refresh direct dependencies and the lockfile; remove redundant @types/bcryptjs and @types/uuid stubs.
  • Raise the required runtime to Node.js 22+ and use Node.js 24 in Docker. Keep @types/node on 24 to match the container.
  • Replace Lucide brand icons removed in 1.x with supported icons, retaining the social link labels and destinations.
  • Defer reading browser-only voting history until hydration, and keep Jest from scanning Next.js standalone build output.

TypeScript remains on the latest compatible 6.x because @typescript-eslint does not yet support 7.x; ESLint remains on 9.x because plugins supplied by eslint-config-next do not yet accept 10.x.

Verified with npm ci, the production build, lint, all 64 tests, and npm audit (zero reported vulnerabilities).

Update npm packages and lockfile, align Node and supported lint/toolchain versions, and fix UI/prerender compatibility after upgrades.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 28, 2026 14:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T14:27:33.176587Z 67c997b PR opened
🔒 Security Review ✅ Completed 2026-09-28T14:21:50.895243Z 67c997b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Address the completion-route hydration issue and update CI to validate Node.js 22+.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Upgrades dependencies and Node.js requirements while fixing icon compatibility, hydration safety, and Jest configuration.

Changes:

  • Refreshes dependencies and raises the runtime requirement to Node.js 22+.
  • Uses Node.js 24 in Docker and updates Jest exclusions.
  • Replaces removed Lucide icons and defers browser-only voting-history access.
File Summary
README.md Documents the Node.js 22+ requirement.
package.json Updates dependencies and runtime constraints.
jest.config.js Excludes build output and dependencies.
Dockerfile Uses Node.js 24 Alpine.
components/​Footer.tsx Replaces removed Lucide brand icons.
app/​vote/​certificate/​page.tsx Defers voting-history loading until hydration.

Two moderate issues remain: the completion route may still have a hydration mismatch, and CI continues to run on unsupported Node.js 20.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67c997bed4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
},
"engines": {
"node": ">=18.18.0",
"node": ">=22.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Run CI on Node.js 22 or newer

The test job in .github/workflows/ci.yml still configures node-version: '20', so it runs the upgraded project outside the minimum runtime declared here. In particular, the newly selected @testing-library/jest-dom@7.0.1 also declares Node.js 22 as its minimum, yet jest.setup.js imports it for every test; therefore the lint/type-check/test job installs and executes an unsupported toolchain and may fail or provide misleading validation. Update the workflow's Node version along with this engine bump.

Useful? React with 👍 / 👎.

@l7wei
l7wei merged commit dc24acc into main Sep 28, 2026
7 checks passed
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.

2 participants