Repository navigation
lib: prefer change-by-copy array methods over prior copy - #67473
Open
LiviaMedeiros wants to merge 3 commits into
Open
LiviaMedeiros wants to merge 3 commits into
LiviaMedeiros wants to merge 3 commits into
Conversation
Signed-off-by: LiviaMedeiros <livia@cirno.name>
Signed-off-by: LiviaMedeiros <livia@cirno.name>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67473 +/- ##
==========================================
- Coverage 90.70% 90.67% -0.03%
==========================================
Files 802 799 -3
Lines 282176 280244 -1932
Branches 54379 54124 -255
==========================================
- Hits 255934 254107 -1827
+ Misses 16365 16270 -95
+ Partials 9877 9867 -10
🚀 New features to boost your workflow:
|
jasnell
approved these changes
Nov 15, 2026
jasnell
reviewed
Nov 15, 2026
Signed-off-by: LiviaMedeiros <livia@cirno.name>
jasnell
approved these changes
Nov 16, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces two-pass copy-then-mutate with ES2023 one-pass change-by-copy methods.
The
array.slice().push(item)->array.toSpliced(array.length, 0, item)bit is partially inspired by #67456