fix: add Object.values polyfill for node <=6 #4274
Merged
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.
Tested in node 6 using the
jsdom.js
file (the tests don't run in node 6 but axe was able to load without erroring)Importing colorjs required that
Object.values
be defined ahead of time (it runs setup code that requires the function exist). Since I couldn't import and setObject.values
before importing colorjs, I had to move all the imported polyfill setup to it's own file that could be imported ahead of the colorjs import.Since I was doing that I figured I should move all the polyfills from the
utils
file to the new polyfill file so they were all located in the same place. However I couldn't delete the utils file completely as we export thepollyfillElementsFromPoint
function to utils. So I instead renamed the file to just be about the elements from point function. We should deprecate the function but in a different pr since we need this to be a fix.Closes: #4127