Skip to content

chore(web): upgrade to Node 26, TypeScript 7, Next 16.4 and pnpm 12 - #159

Merged
Yash Shrivastava (alephys26) merged 16 commits into
mainfrom
chore/web-node26-ts7-upgrade
Oct 28, 2026
Merged

Yash Shrivastava (alephys26) merged 16 commits into
mainfrom
chore/web-node26-ts7-upgrade

Conversation

@ryankshaw

@ryankshaw Ryan Shaw (ryankshaw) commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Upgrades the web toolchain and outdated dependencies.

this superseeds #155 and if we merge this we can close that

  • Node 26 in web/.nvmrc, CI, and both Docker stages
  • pnpm 12 Node 25+ doesn't bundle corepack, so pnpm is installed with the version read from web/package.json. That makes packageManager the only place the version is pinned.
    • CI uses pnpm/setup@v3, replacing the hand-rolled cache step.
    • ignoredBuiltDependencies became allowBuilds for pnpm 12. Because allowBuilds already blocks dependency scripts, --ignore-scripts was dropped from pnpm install.
    • Dropped the explicit minimumReleaseAge: 1440, since that is now pnpm's default.
  • TypeScript 7 TS 7 has no compiler API. Following the TS 7 announcement, typescript is aliased to @typescript/typescript6 for typescript-eslint and Next. @typescript/native is aliased to typescript@^7, so tsc and pnpm type-check run TS 7.
  • Type checking during next build. Removed ignoreBuildErrors, so every build (CI, Docker and local) fails on type errors.
  • @patterninc/pattern-ui tracks latest. It removed i18n-english-provider, so AppRoot now uses SimpleProvider, which also supplies TooltipProvider and PulseProvider.
  • GitHub Actions on their latest majors. Their breaking changes don't affect how these workflows use them.
  • CI builds on Go 1.27.3. #157 moved the Dockerfile to Go 1.27.3, but build.yml was still testing on 1.25.0. It now matches.

Next 16 cleanup

  • next.config.mjs was converted to typescript, which is what next would do by default for a new project.
  • type-check runs next typegen && tsc --noEmit, so it works on a fresh checkout.
  • Added web/AGENTS.md with the Next.js-managed block.
  • Removed the legacy .eslintrc.json (ESLint 10 ignores it), the unused web/index.html, and a duplicate web/src/app/public/favicon.png that was never served.
  • sharp is in ignoredOptionalDependencies, so it's never installed, because Heimdall doesn't use next/image optimization (makes docker image smaller).
  • The runtime image no longer installs pnpm. The entrypoint runs ./node_modules/.bin/next start.

Testing

  • pnpm lint, pnpm type-check (TS 7), pnpm prettier-check and ./build.sh --ui pass locally on Node 26 / pnpm 12.15.0.
  • Confirmed next build fails on a deliberate type error.
  • Built the full Docker image and ran it against the compose Postgres. The UI pages, favicon and API return 200 through the Go server.

- Node 26 in .nvmrc, the Docker images and CI; install pnpm directly since Node 25+ no longer bundles corepack
- pnpm 12.15.0, migrating ignoredBuiltDependencies to allowBuilds
- TypeScript 7 for tsc, aliased alongside @typescript/typescript6 so typescript-eslint keeps the TS 6 API
- next and eslint-config-next 16.4.3, eslint 10, @types/node 26, js-yaml 5, prettier-plugin-tailwindcss 0.8.1
- Track @patterninc/pattern-ui latest and replace the removed I18nEnglishProvider with SimpleProvider
- Regenerate the lockfile
Copilot AI balanced review requested due to automatic review settings October 27, 2026 15:54

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

The coordinated major-version upgrades need final human validation, particularly because the Docker build remains untested.

No open issues 🎉

What changed in this PR

Updates the web toolchain across local builds, CI, and Docker, and adapts the app’s providers to the latest Pattern UI package.

Changes:

  • Upgrades Node, pnpm, Next.js, and related dependencies, with separate TypeScript 7 compiler and TypeScript 6 tooling packages.
  • Replaces Corepack-based pnpm setup and updates CI caching and dependency-build settings.
  • Switches to SimpleProvider and applies a formatting-only change to filter types.
File Description
web/​src/​components/​FilterMenu/​filterTypes.ts Reformats a union type without changing behavior.
web/​src/​common/​ClientLayout/​AppRoot.tsx Replaces separate localization, tooltip, and pulse providers with SimpleProvider.
web/​pnpm-workspace.yaml Migrates dependency-build restrictions to allowBuilds.
web/​package.json Updates dependencies and configures compiler/tooling aliases.
web/​.nvmrc Selects Node 26 for local development and CI.
Dockerfile Updates Node images and installs pnpm directly through npm.
build.sh Installs the pinned pnpm version when pnpm is absent.
.github/​workflows/​build.yml Adds explicit Node and pnpm setup with caching.

Review effort: Balanced

- Build Next with output: 'standalone' and run its server.js in Docker, so the runtime image no longer needs pnpm or the full node_modules
- Build the web stage on the Pattern parent Node image (public.ecr.aws/patterninc/parent-image/nodejs:26)
- Skip the optional sharp dependency so the standalone output has no native binaries and runs on Debian after an Alpine build
- Convert next.config.mjs to next.config.ts and document why ignoreBuildErrors stays
- Run next typegen before tsc so type-check works on a fresh checkout, and type check before building
- Add the Next.js managed AGENTS.md block in web/ and link it from the root AGENTS.md
- Remove the legacy .eslintrc.json, the unused index.html, and the duplicate src/app/public/favicon.png
…one Node ARG

- The web builder installs the pnpm version named in web/package.json packageManager, so the version is pinned in one place
- One NODE_MAJOR build arg feeds both Node base images
- Allow pnpm's install script in npm 11's allowScripts so the native pnpm binary is set up
- Build the web stage on node:26-bookworm again and copy the full web app into the runtime image
- Start the UI with the installed next binary, so the runtime image still doesn't need pnpm
- Remove the NODE_MAJOR build arg
- Install sharp again now that the standalone output no longer has to avoid native binaries
- Build the web stage on node:26-bookworm-slim
- List sharp in ignoredOptionalDependencies since Heimdall doesn't use next/image
Comment thread web/.eslintrc.json Resolved
@alephys26
Yash Shrivastava (alephys26) merged commit a00b881 into main Oct 28, 2026
7 checks passed
@alephys26
Yash Shrivastava (alephys26) deleted the chore/web-node26-ts7-upgrade branch October 28, 2026 05:44
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.

4 participants