Skip to content

chore(deps): bump sanitize-html to 2.17.7 and move to node 24 - #784

Closed
rickstaa wants to merge 1 commit into
mainfrom
chore/sanitize-html-node-24
Closed

chore(deps): bump sanitize-html to 2.17.7 and move to node 24#784
rickstaa wants to merge 1 commit into
mainfrom
chore/sanitize-html-node-24

Conversation

@rickstaa

@rickstaa rickstaa commented Sep 3, 2026

Copy link
Copy Markdown
Member

Re-lands #777, which was reverted in #782.

sanitize-html 2.17.7 depends on htmlparser2 v12, which is ESM-only. Loading it from CommonJS failed at runtime on the Vercel 22.x function runtime, so /api/ens-data/[address] returned 500 and search stopped working. Node 24 runs it fine, and it is Vercel's current default, so this moves every Node pin to 24: engines, .nvmrc, .tool-versions, both CI workflows, and the Dockerfile. Since engines overrides the Vercel project setting, this is what actually switches the runtime.

Before merging, open the Vercel preview and check /api/ens-data/0x597ad7f7a1c9f8d0121a9e949cca7530f2b25ef6 returns JSON and that search works. Production stays on 22 until this merges.

Verified locally on Node 24.11: production build, then GET /api/ens-data and /api/ens-data/[address] on the built server return 200 with sanitized payloads; 363 jest tests and typecheck pass.

sanitize-html 2.17.7 loads the ESM-only htmlparser2 v12 from CommonJS,
which failed at runtime on the Vercel 22.x functions and broke every
ENS lookup. Node 24 is Vercel's current default and runs the route, so
align engines, .nvmrc, .tool-versions, CI and the Dockerfile with it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 16:03
@rickstaa
rickstaa requested a review from ECWireless as a code owner September 3, 2026 16:03
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
explorer-arbitrum-one Ready Ready Preview Sep 5, 2026 11:55am UTC

Request Review

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.

🔵 Needs a closer look

It changes the production runtime baseline (Node upgrade + ESM dependency chain) and should be manually validated on the Vercel preview per the PR’s deployment checklist.

Pull request overview

This PR re-lands the sanitize-html upgrade (to 2.17.7) and resolves the prior Vercel runtime ERR_REQUIRE_ESM failure by moving all Node.js pins in the repo to Node 24, aligning with Vercel’s current default runtime.

Changes:

  • Bump sanitize-html to ^2.17.7 (bringing in htmlparser2@12, which is ESM-only).
  • Update all Node version pins to Node 24 across package.json engines, local dev version files, CI workflows, and Docker images.
File summaries
File Description
pnpm-lock.yaml Updates lockfile to sanitize-html@2.17.7 and new transitive dependencies (including htmlparser2@12).
package.json Bumps sanitize-html dependency and sets engines.node to 24.x (affects Vercel runtime selection).
Dockerfile Switches builder and runtime images from node:22 to node:24.
.tool-versions Updates asdf Node pin to 24.11.0.
.nvmrc Updates nvm Node major to 24.
.github/workflows/lighthouse-vercel-preview.yml Updates CI setup-node version from 22 to 24 for Lighthouse preview job.
.github/workflows/ci.yml Updates CI setup-node version from 22 to 24 for lint/typecheck/test.
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 6/7 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

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