Skip to content

feat(typescript)!: change base target and lib to es2025 - #247

Merged
jhnns merged 1 commit into
mainfrom
feat/typescript-es2025
Sep 24, 2026
Merged

jhnns merged 1 commit into
mainfrom
feat/typescript-es2025

Conversation

@jhnns

@jhnns jhnns commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Why

The ESLint presets enable unicorn/prefer-iterator-to-array and unicorn/prefer-iterator-helpers, which suggest ES2025 Iterator helpers (Iterator#toArray(), Iterator#some(), …). typescript/base.json still sets lib: ["es2024"], so every fix they suggest is a type error in a project that extends both, and consumers end up turning the rules off (leitstand does today).

What

  • typescript/base.json: target and lib es2024 → es2025 (TypeScript 6 ships lib.es2025.*)
  • Root tsconfig.json and typescript/README.md follow along
  • lib.json / js-lib.json stay on es2022 on purpose (library targets)

BREAKING CHANGE: @peerigon/configs/typescript now sets target and lib to es2025 (was es2024). The type checker now accepts ES2025 APIs that not every runtime covered by engines: ">=22" implements: Iterator helpers and the new Set methods work in Node 22, but RegExp.escape, Float16Array and Promise.try need Node 24 or a recent browser. Projects targeting older runtimes should pin lib back to ["es2024"] in their own tsconfig.json. Projects that override lib (e.g. ["es2024", "dom"]) keep their value and should bump it to es2025 to use the new APIs.

Verification

  • npm run build && npm test passes (and passes on main as a baseline)

🤖 Generated with Claude Code

The ESLint presets enable unicorn/prefer-iterator-to-array and
unicorn/prefer-iterator-helpers, which suggest ES2025 Iterator helpers
(`Iterator#toArray()`, `Iterator#some()`, ...). With `lib: ["es2024"]` every
suggested fix is a type error in a project that uses both presets, so
consumers have to turn the rules off. es2025 also brings the new Set methods,
Promise.try and RegExp.escape types.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@peerigon/configs@247

commit: eae1105

@jhnns jhnns changed the title feat(typescript): change base target and lib to es2025 feat(typescript)!: change base target and lib to es2025 Sep 24, 2026
@jhnns
jhnns merged commit 183c081 into main Sep 24, 2026
2 checks passed
@jhnns
jhnns deleted the feat/typescript-es2025 branch September 24, 2026 09:19
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 26.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant