Skip to content
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 RegExp Issue in older versions of Safari #643

Merged
merged 6 commits into from
Mar 9, 2018

Conversation

swftvsn
Copy link
Contributor

@swftvsn swftvsn commented Mar 7, 2018

Error is: TypeError: Cannot supply flags when constructing one RegExp from another.

Discussion here: https://stackoverflow.com/questions/37919802/regex-created-with-constructor-not-working-with-safari

Error is: TypeError: Cannot supply flags when constructing one RegExp from another.  

Discussion here: https://stackoverflow.com/questions/37919802/regex-created-with-constructor-not-working-with-safari
@CaerusKaru
Copy link
Member

I just tested that expression on both Safari 10 and 11. The issue was opened in 2016 and looks like it's been resolved in the latest two versions of Safari, which is all we support.

Thanks for the contribution, but it hardly seems necessary now.

@CaerusKaru CaerusKaru closed this Mar 7, 2018
@swftvsn
Copy link
Contributor Author

swftvsn commented Mar 7, 2018

That's very unfortunate, as that is the single thing breaking safari 9 and older support :/ It's also a safe change, and the RegExp constructor does nothing but adds clutter and decreases performance. (As two regexps are constructed.)

@swftvsn
Copy link
Contributor Author

swftvsn commented Mar 7, 2018

Hmm, I probably then have to fork & support a separate version for us.

@CaerusKaru
Copy link
Member

Alright, you've convinced me. I'll run this up to @ThomasBurleson but if it's minimal code and allows for Safari 9 support to be added back, I'm for it.

@CaerusKaru CaerusKaru reopened this Mar 7, 2018
@CaerusKaru CaerusKaru added the pr: lgtm This PR has been approved by the reviewer label Mar 7, 2018
@CaerusKaru CaerusKaru added this to the v6.0.0-beta.14 milestone Mar 7, 2018
Copy link
Member

@CaerusKaru CaerusKaru left a comment

Choose a reason for hiding this comment

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

LGTM

@CaerusKaru CaerusKaru self-assigned this Mar 7, 2018
@CaerusKaru
Copy link
Member

@swftvsn please add a comment above the regex change explaining why it’s necessary

@swftvsn
Copy link
Contributor Author

swftvsn commented Mar 7, 2018

Is the comment I added enough?

@CaerusKaru
Copy link
Member

@swftvsn Looks good, but @ThomasBurleson might suggest edits before it gets merged

@CaerusKaru
Copy link
Member

@swftvsn Looks like you've got some linting errors that need to be resolved. Other than that, tests look good.

@swftvsn
Copy link
Contributor Author

swftvsn commented Mar 7, 2018

Fixed tslint errors.

@CaerusKaru
Copy link
Member

@swftvsn Pro tip: Just linking https://stackoverflow.com/questions/37919802 will resolve to the full URL

@swftvsn
Copy link
Contributor Author

swftvsn commented Mar 7, 2018

Thanks!

@ThomasBurleson
Copy link
Contributor

@swftvsn - please squash your commits. Thank you for this fix.

@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@googlebot googlebot removed the cla: yes label Mar 7, 2018
@googlebot googlebot added the cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ label Mar 7, 2018
@swftvsn
Copy link
Contributor Author

swftvsn commented Mar 7, 2018

Haha, seems that I don't know how to do a squash. If I understand correctly the user interface of github allows this as part of the merge. However, I'm not allowed to merge, so I tried to pull my branch, and then do

git rebase -i HEAD~4
git pull
git push

But I think it's worse now. So, can you provide any assistance what should I do with that branch next? And how do I provide CLA. The committer is me.

@CaerusKaru CaerusKaru merged commit 85e8aa2 into angular:master Mar 9, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: no PR author needs to sign Google's CLA: https://opensource.google.com/docs/cla/ pr: lgtm This PR has been approved by the reviewer pr: needs squash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants