Skip to content

Conversation

TrevorBurnham
Copy link
Contributor

This PR updates the build target from ES2015 to ES2021, the newest ECMAScript version supported by all target browsers. This reduces the bundle size by 3.7%, with the potential for further improvement if code is updated to take advantage of newly-supported language features, including:

  • async/await
  • Object.assign, Array.includes, String.startsWith/endsWith
  • const/let block scoping
  • arrow functions
  • template literals
  • Optional chaining (?.)
  • Nullish coalescing (??)
  • Logical assignment operators** (&&=, ||=, ??=)

Here's the corresponding PR to bump the ECMAScript target in the components repo: cloudscape-design/components#3801


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@TrevorBurnham TrevorBurnham requested a review from a team as a code owner September 11, 2025 00:33
@TrevorBurnham TrevorBurnham requested review from just-boris and removed request for a team September 11, 2025 00:33
Copy link
Member

@just-boris just-boris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, but it will require an internal sanity check as well.

Let's finish the resize observer story first and then get on this one

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.32%. Comparing base (86f1d80) to head (62c2f84).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #163   +/-   ##
=======================================
  Coverage   99.32%   99.32%           
=======================================
  Files          36       36           
  Lines         893      893           
  Branches      248      235   -13     
=======================================
  Hits          887      887           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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