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

XRegExp pattern fails when using IE11 (polyfills-es5) #17375

Closed
psmyrdek opened this issue Apr 2, 2020 · 4 comments
Closed

XRegExp pattern fails when using IE11 (polyfills-es5) #17375

psmyrdek opened this issue Apr 2, 2020 · 4 comments
Labels
Milestone

Comments

@psmyrdek
Copy link

psmyrdek commented Apr 2, 2020

🐞 bug report

Affected Package

@angular/core

Is this a regression?

Yes - works fine on 8.x

Description

🔬 Minimal Reproduction

Create a fresh project (Angular 9.1) and replace main.ts with the following content:
https://gist.github.com/psmyrdek/a32ed781830f1c69472c0580123330ef

It works on Chrome, Firefox, etc. but it doesn't work on IE11. Everything is fine if we're on 8.x

🔥 Exception or Error

image

🌍 Your Environment

Angular Version:


Angular CLI: 9.1.0
Node: 12.16.1
OS: darwin x64

Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.0
@angular-devkit/build-angular     0.901.0
@angular-devkit/build-optimizer   0.901.0
@angular-devkit/build-webpack     0.901.0
@angular-devkit/core              9.1.0
@angular-devkit/schematics        9.1.0
@ngtools/webpack                  9.1.0
@schematics/angular               9.1.0
@schematics/update                0.901.0
rxjs                              6.5.4
typescript                        3.8.3
webpack                           4.42.0

we're also relying on xregexp@4.3.0

@psmyrdek
Copy link
Author

psmyrdek commented Apr 2, 2020

I'm aware that it probably has nothing with Angular itself, but rather with Angular build pipe (babel, core-js, etc.). All in all, we noticed it right after upgrading to 9.1 so I want to ask for some guidance.

@pkozlowski-opensource pkozlowski-opensource transferred this issue from angular/angular Apr 2, 2020
@psmyrdek
Copy link
Author

psmyrdek commented Apr 13, 2020

Testing the same pattern using "@angular/cli": "8.0.6" () and "@angular/cli": "9.1.0" and for sure there are some changes in RegExp polyfill.

In both cases, I'm trying to translate the same pattern and I see a different output in console:

Works fine -"@angular/cli": "8.0.6" with core-js@3.0.1 and @babel/runtime-corejs3@7.9.2:
image

Breaks on -"@angular/cli": "9.1.6" with core-js@3.6.4 and @babel/runtime-corejs3@7.9.2:
image

And the base is:

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

(u and x chars introduced only to see how the \s behaves)

UPDATE: Can confirm that "@angular/cli": "9.1.6" with core-js@3.0.1 works fine 🤔

@alan-agius4
Copy link
Collaborator

Closing as this is ok it actionable by the Angular tooling team.

We’ll consume the fix once the core-ha team addressed the problem.

@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 Nov 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants