-
Notifications
You must be signed in to change notification settings - Fork 9
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(compat): replace matchAll to support iOS safari <= 12 #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turnaround here. Looks good to merge once we get those tests fixed!
.github/workflows/ci.yml
Outdated
#- name: Update regression test snapshots | ||
#if: ${{ failure() }} | ||
#run: npm run test.browser -- -u |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to update these visual snapshots in order to get tests to pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
@@ -6,7 +6,11 @@ const PropTypes = require('prop-types'); | |||
const MATCH_SCRIPT_TAGS = /<script\b[^>]*>([\s\S]*?)<\/script>\n?/gim; | |||
|
|||
const extractScripts = (html = '') => { | |||
const scripts = [...html.matchAll(MATCH_SCRIPT_TAGS)].map(m => m[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably polyfill missing native methods like this in the long run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand babel, but shouldn't it already be:
$ cat .babelrc
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": ["last 2 versions"]
}
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining"
]
}
This PR was released!🚀 Changes included in v6.27.2-next.2 |
This PR was released!🚀 Changes included in v6.27.2 |
🧰 Changes
matchAll
first came to iOS safari in version 13.🧬 QA & Testing