-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Refactor usage of Array.from to address MooTools conflict #544
Merged
Conversation
This file contains 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
Asset Size ReportMerging this pull request will result in the following CDN asset size changes:
Merging this pull request will result in the following NPM package consumer size changes:
Other Standard CDN AssetsReleased Assets
Built Assets
Other Polyfill CDN AssetsReleased Assets
Built Assets
|
Codecov Report
@@ Coverage Diff @@
## main #544 +/- ##
=======================================
Coverage 20.03% 20.03%
=======================================
Files 132 132
Lines 4347 4347
Branches 1109 1109
=======================================
Hits 871 871
Misses 2745 2745
Partials 731 731
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
patrickhousley
approved these changes
May 25, 2023
Manual verification:
|
metal-messiah
approved these changes
May 26, 2023
bjfield
pushed a commit
that referenced
this pull request
May 26, 2023
* Capture metrics for usage of MooTools and certain polyfills (#539) (903a7e1) * Update agent internals in early preparation for new features (#532) (1ee675d) * Address "configurable" warnings arising from user-agent module (#546) (7a7dace) * Ensure runtime is preserved for late-configuration cases (#538) (229b8ed) * Refactor usage of Array.from to address MooTools conflict (#544) (f1e6336)
metal-messiah
pushed a commit
that referenced
this pull request
Jun 5, 2023
Co-authored-by: Patrick Housley <[email protected]>
metal-messiah
pushed a commit
that referenced
this pull request
Jun 5, 2023
* Capture metrics for usage of MooTools and certain polyfills (#539) (903a7e1) * Update agent internals in early preparation for new features (#532) (1ee675d) * Address "configurable" warnings arising from user-agent module (#546) (7a7dace) * Ensure runtime is preserved for late-configuration cases (#538) (229b8ed) * Refactor usage of Array.from to address MooTools conflict (#544) (f1e6336)
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.
To work around a conflict with some versions of the MooTools library that mutate the native Array.from method, the agent will now use alternative methods.
Overview
In the 1.232.1 release, we removed lodash.slice, which was being used to convert iterables to arrays—using Array.from instead. It was discovered that some older versions of the MooTools library mutate the Array.from method in a way that caused pages to break when both libraries were used in combination. This PR:
Array.from
with spread operators (which will be transpiled by babel as needed).Removes thecore-js/stable/array/from
polyfill (which was included only with polyfill builds of the agent).Related Issue(s)
NR-119295
Testing