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

Add support to ie11 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add support to ie11 #1

wants to merge 3 commits into from

Conversation

ironicnet
Copy link

Description

As we need to fix an issue with an existent package that seems unmantained, we forked the repo.
We had an issue where the current syntax wasn't being supported in ie11 or inside a webview from WPF.

Proposed changes

  • Update the package.json to use it in tactivos
  • Fix the code so it can run in ie11

Copy link

@mfgea mfgea left a comment

Choose a reason for hiding this comment

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

lgtm

## Source

Forked from [url-regex](https://github.com/kevva/url-regex) so we can improve the compability with IE11 or other browsers.
Needed for consuming it from surface hubs or windows app.

Choose a reason for hiding this comment

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

Why we need this for the hubs and windows app ?

Copy link

@mfgea mfgea Jun 7, 2021

Choose a reason for hiding this comment

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

url-regex was imported as a regular dependency (meaning that it would not run through Babel), and it was recently upgraded because of security reasons. The thing is that in the upgrade, some non-ie11 compliant features were introduced (like arrow functions and const declarations) and it broke our windows apps.

The other option was to change the build process to include url-regex in the babel run, but this option is safer (and the lib is simple enough)

var ip = ipRegex.v4().source;
var host = '(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)';
var domain = '(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*';
var tld = `(?:\\.${options.strict ? '(?:[a-z\\u00a1-\\uffff]{2,})' : `(?:${tlds.sort(function (a, b) {

Choose a reason for hiding this comment

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

Could be useful to list in the description the two changes that you make here:

  1. const to var
  2. remove arrow functions

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

Successfully merging this pull request may close these issues.

3 participants