Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

fix: upgrade tsconfig target from ES5 to ES2017 for TypeScript 6 compatibility - #4677

Closed
GC Zhu (gc-skyscanner) wants to merge 2 commits into
mainfrom
gc-skyscanner/fix-pr-4445-ci-failure
Closed

fix: upgrade tsconfig target from ES5 to ES2017 for TypeScript 6 compatibility#4677
GC Zhu (gc-skyscanner) wants to merge 2 commits into
mainfrom
gc-skyscanner/fix-pr-4445-ci-failure

Conversation

@gc-skyscanner

Copy link
Copy Markdown
Contributor

Summary

Fixes the CI failure in #4445 (Dependabot bump of TypeScript 5.9.3 → 6.0.3).

Root cause

TypeScript 6.0 deprecated target=ES5 (error TS5107) and the build fails with:

tsconfig.json(3,15): error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0.

Fix

Updated target from ES5 to ES2017 in:

  • tsconfig.base.json
  • tsconfig.declaration.json

Why ES2017?

All supported browser targets (Chrome 109+, Edge 142+, Firefox 145+, Safari 16+, Samsung 29+) fully support ES2017. There's no reason to compile down to ES5. ES2017 preserves async/await syntax and modern class fields natively.

🤖 Generated with Claude Code

…atibility

TypeScript 6.0 deprecated target=ES5 (error TS5107). All supported browsers
(Chrome 109+, Edge 142+, Firefox 145+, Safari 16+) fully support ES2017.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 8, 2026 05:43
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Visit https://backpack.github.io/storybook-prs/4677 to see this build running in a browser.

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

ES2022 is fully supported by all browserslist targets (Chrome 109+, Safari 16+).
More accurate than ES2017 for type-checking built-in APIs, and safer than
ES2025 which has features not supported by Safari 16.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Visit https://backpack.github.io/storybook-prs/4677 to see this build running in a browser.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants