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

[RegExp] Incomplete sticky flag support implementation / [email protected]+ breaks [email protected] patterns on IE11 #810

Open
psmyrdek opened this issue Apr 13, 2020 · 13 comments

Comments

@psmyrdek
Copy link

psmyrdek commented Apr 13, 2020

Related to: angular/angular-cli#17375

There are two issues with XRegExp and core-js I noticed recently:

1) On [email protected] this script causes endless loop:

import 'core-js/features/regexp';
import XRegExp from 'xregexp';
window['XRegExp'] = XRegExp; // only to test some patterns in dev tools console

When using [email protected] everything works fine.

2) Pattern that is working fine in [email protected] now breaks (the \s, whitechar range, is gone)

I'm trying to test the following code:

import XRegExp from 'xregexp';
window['XRegExp'] = XRegExp;

console.log(XRegExp('(^((?=[uuuuuuuuu\\sxxxxxxxxx\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}/])[^;\\\\<>{}])*$)|(^$)'))
console.log(XRegExp('(^((?=[uuuuuuuuu\\sxxxxxxxxx\\p{L}\\p{N}\\p{P}\\p{S}\\p{M}/])[^;\\\\<>{}])*$)|(^$)').test('test me'));

Both uuu... and xxx... added only to see effects in the browser)

And I see two different regexp patterns that got built by xregexp:

[email protected] - spaces work fine
image

[email protected] - spaces break the pattern (notice lack of x chars and \s at the beginning)
image

@kassenov
Copy link

We experienced the described issue on IE11 with version 3.6, when reverted to 3.5.0 it works.

@psmyrdek
Copy link
Author

One solution may be to use https://www.npmjs.com/package/babel-plugin-transform-xregexp and build patterns in build time. Haven't tested it properly yet - feedback welcomed.

@walkerdb
Copy link

Seeing the same issue as well

@steveworkman
Copy link

Looks like a duplicate of #751

@kabbany
Copy link

kabbany commented Jun 29, 2020

Still having the same issues. Any updates regarding the issue ?

@zloirock
Copy link
Owner

zloirock commented Nov 5, 2020

Seems on xregexp side added a workaround, but it should be fixed on core-js side.

@zloirock
Copy link
Owner

zloirock commented Nov 5, 2020

#754 related

@zloirock zloirock changed the title [email protected] breaks xregexp patterns on IE11 Incomplete sticky RegExp flag support implementation / [email protected]+ breaks [email protected] patterns on IE11 Nov 5, 2020
@zloirock zloirock added the es label May 30, 2021
@zloirock zloirock changed the title Incomplete sticky RegExp flag support implementation / [email protected]+ breaks [email protected] patterns on IE11 [RegExp] Incomplete sticky flag support implementation / [email protected]+ breaks [email protected] patterns on IE11 Jun 8, 2021
@gtranter
Copy link

gtranter commented Aug 5, 2021

I'm facing the same issue as part of Stencil JS development which currently includes [email protected]. When will this bug be fixed?

@zloirock
Copy link
Owner

zloirock commented Aug 5, 2021

@gtranter when someone will fix it. Working on it is not in my plans.

@Yevgeniy-C
Copy link

Update:
The retired, out-of-support Internet Explorer 11 desktop application has been permanently disabled through a Microsoft Edge update on certain versions of Windows 10.

IE11 visual references, such as the IE11 icons on the Start Menu and taskbar,
will be removed by the June 2023 Windows security update (“B” release) scheduled for June 13, 2023.

https://techcommunity.microsoft.com/t5/windows-it-pro-blog/internet-explorer-11-desktop-app-retirement-faq/ba-p/2366549

Probably time to close this issue since they killed IE11 this month with new update.

@zloirock
Copy link
Owner

@Yevgeniy-C here this approach does not work - a couple of times a month someone writes me even about IE6 support. In core-js@4 will be removed IE8- support - but most likely IE9-11 still will be supported. Also, it's related to other old engines.

@Yevgeniy-C
Copy link

Yevgeniy-C commented Feb 26, 2023 via email

@zloirock
Copy link
Owner

zloirock commented Feb 26, 2023

@Yevgeniy-C it's problematic to delete it from PCs that do not receive actual updates - I'm pretty sure that it's most IE users. 0.7% according to current data is a fairly large share of users. A share of other ancient engines (iOS, Android, etc) without the support of this feature is comparable. CanIUse shows that it's about 4.17% at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants