Skip to content

⬆️ Switch from Yarn to npm and upgrade Node to 26 LTS - #1427

Merged
0x46616c6b merged 1 commit into
mainfrom
chore/npm-node-26
Nov 3, 2026
Merged

0x46616c6b merged 1 commit into
mainfrom
chore/npm-node-26

Conversation

@0x46616c6b

Copy link
Copy Markdown
Member

Summary

npm instead of Yarn: We still use Yarn 1 (Classic), which is frozen. Symfony does not pin a package manager for Webpack Encore. Flex picks one by lockfile and the Encore docs use npm install, so a fresh Symfony 7.4 install today ends up with npm and package-lock.json. This PR follows that default.

  • package-lock.json was generated from the existing yarn.lock, so the resolved versions stay the same.
  • Yarn ignored a peer conflict: Encore 7.2 declares typescript ^5 || ^6 as an optional peer, but we use TypeScript 7. Encore compiles TypeScript through Babel and does not use the typescript package, so a scoped overrides entry makes Encore accept the root TypeScript version. This avoids a global legacy-peer-deps.
  • Makefile, both Dockerfiles, CI and the development docs now use npm ci / npm run / npx encore.

Node 26 instead of 22: Node 26 (Lithium) has been the Active LTS since 2026-10-28 and is supported until 2029-04-30. Node 22 reaches EOL on 2027-04-30. All JS dependencies support Node 26. This reverses the Node 22 pin from #1424 / #1426 on purpose. The Dependabot rule now keeps us on Node 26.

Debian trixie instead of bookworm for the release image: The release image copies the Node binary into the PHP image, so both stages must use the same Debian release. Bookworm is now oldstable, so both stages move to the current stable, trixie. The images are still pinned by multi-arch digest.

🤖 Generated with Claude Code

Replace Yarn 1 (Classic) with npm, which is what a fresh Symfony install
with Webpack Encore uses today, and upgrade Node from 22 to 26, the
current Active LTS (EOL 2029-04-30). The release image moves from
Debian bookworm to trixie for both the Node and PHP stages.

The lockfile was migrated from yarn.lock, keeping the resolved versions.
An npm override lets Encore accept TypeScript 7 as its optional peer, as
Encore only uses Babel for TypeScript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0x46616c6b 0x46616c6b added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code technical debt docker Pull requests that update docker code labels Nov 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@0x46616c6b
0x46616c6b marked this pull request as ready for review November 3, 2026 19:28
@0x46616c6b
0x46616c6b merged commit 036001c into main Nov 3, 2026
13 checks passed
@0x46616c6b
0x46616c6b deleted the chore/npm-node-26 branch November 3, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docker Pull requests that update docker code javascript Pull requests that update Javascript code technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant