Skip to content

Conversation

@roberttran-cc
Copy link
Member

@roberttran-cc roberttran-cc commented Jan 30, 2026

Closes #1656

What does this PR do?

  • Replaces [...arr].sort() with native arr.toSorted() across 12 files,
  • Removes findLastIndex polyfill from src/lib/utils.js in favor of native Array.prototype.findLastIndex(),
  • Removes associated polyfill tests.

How to review?

  • 1 reviewer should be enough for this one,
  • Not much to review apart from the mechanical refactoring.

Replace custom findLastIndex() with native Array.prototype.findLastIndex()
@roberttran-cc roberttran-cc force-pushed the refactor/es2023-migration branch from fe29add to bbf14f7 Compare January 30, 2026 09:23
@github-actions
Copy link
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/refactor/es2023-migration/index.html.

This preview will be deleted once this PR is closed.

@roberttran-cc roberttran-cc force-pushed the refactor/es2023-migration branch from bbf14f7 to afa48b0 Compare January 30, 2026 09:36
Replace copy-before-sort pattern with ES2023 toSorted() in 16 files
@github-actions
Copy link
Contributor

🧐 Visual tests report for PR #1664

The latest visual tests report is available. Please review the results.

1 components impacted
  • cc-overview,

This comment was generated automatically by the Visual tests workflow.

Copy link
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for handling @roberttran-cc

@roberttran-cc roberttran-cc merged commit 1fbe222 into master Jan 30, 2026
21 checks passed
@roberttran-cc roberttran-cc deleted the refactor/es2023-migration branch January 30, 2026 11:14
@github-actions
Copy link
Contributor

🧹 Visual Changes Report deleted

The report and its associated data have been deleted because this PR has been closed.

This comment was generated automatically by the Visual Changes workflow.

@github-actions
Copy link
Contributor

🔎 The preview has been automatically deleted.

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.

Migrate to Array.prototype.toSorted() (Baseline available)

2 participants