-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
SyntaxError: Invalid regular expression: invalid group specifier name #105
Comments
@muuvmuuv Look here for details |
Oh... what a shame. Thought it says >4 not =4 but okay will fix the version tho. Can we leave this open until browsers will add support for negative lookbehinds? Browser support: |
Note that this also impacts Gatsby projects in "develop" mode on firefox 74 (current) - negative lookbehinds work for building a site, but when developing it also rebuilds pages in the browser. |
The latest version doesn't work on Safari and Firefox. See here: sindresorhus/normalize-url#105
The latest version doesn't work on Safari and Firefox. See here: sindresorhus/normalize-url#105
The latest version doesn't work on Safari and Firefox. See here: sindresorhus/normalize-url#105
The latest version doesn't work on Safari and Firefox. See here: sindresorhus/normalize-url#105
It's critical issue! Page that uses normalize-url version 5 can't be opened in iOS nor macOS! |
It is getting some support from browsers now. Maybe some more month and v5 will be working in all major browsers as well. I'm using it in a Ionic app. Need to try if v5 works for it. |
Alternative would be to use this package. Just as long as browsers are not fully support it. Sandbox: https://codesandbox.io/s/normalize-url-issues-105-sex88?file=/src/index.js |
I confirm that installing v4 package solves the problem on WkWebview (iOS)
|
Not worked version 6 and version 4 on iOS react-native. Crashed with error: TypeError: Attempted to assign to readonly property.
|
Hey, I'm coming from Gatsby, thanks a lot for this issue. And this has been open for a while. Any Idea why there hasn't been any progress on something that seems like a simple syntax error? Thanks |
I also got burned by this issue. I don't see how it's good to release new versions that are known to be broken in Safari. There must be another regex that doesn't use negative lookbehinds. @gcox ? |
@gregdingle Not sure if you meant to reference me, but I don't see how to avoid the negative lookbehinds. I'm certainly no regex expert so I can't say it's impossible. I don't use this in a browser either, so I'm not motivated to try to work around an annoying browser limitation. |
any updates on that? or it is not planned to implement a workaround for the regex? |
Still no native support for Safari... @edenhermelin I mentioned a workaround in an earlier comment but it seems it wont be implemented. |
@loynoir I have not touched my portfolio a long time, I will try to. No promise. |
@muuvmuuv I tried to port But unfortunatly seems at least two bugs, make browser-
|
Did any one test v4 in real browser? So I don't have to test again myself. |
1. [test] Move `ava` to `mocha+chai` to test in real browser. (sindresorhus#105) (sindresorhus#140) (sindresorhus#142) 2. [test] seprate non special-protocol-schemes(sindresorhus#147) 3. [doc] Update readme
I think, this error raise from normalize-url@v7.0.0 should be fixed in pull/146. If anyone see this, with browser not support js-regexp-lookbehind, You can also build that bundle using |
@muuvmuuv and any who volunteer to test browser version of normalize-url@7 I publish tests in git repo, so you can visit thru rawgit https://ghcdn.rawgit.org/loynoir/normalize-url/main/browser-test/index.html PS: just ignore title with |
@loynoir here is the result from iPad, Safari: |
Got the same as above from Windows 10 Microsoft Edge latest release |
This is because of the test regexp is hard-coded, I push a commit allow less strict checking.
|
@loynoir, so after this commit (https://ghcdn.rawgit.org/loynoir/normalize-url/f9f36c8f22b9649f0eac7219c31a9da2beef7896/browser-test/index.html), you expect to fix the invalid url test fail? It did not work for me - I still get the same two failed tests on iPad (checked on Safari and Chrome). I have also checked the Windows Chrome and Android Chrome now, and I have a different result than on iPad - it is the same as yours. EDIT: actually there is a small change with Invlaid URL test - previously it failed with |
Folded as outdated
duplicate slashes
I can reproduce that after I run into that fallback v4 logic.
I just so trust the v4 code, I didn't comment out the default logic to reproduce. Sorry for waste your time. For sake of testing, I think But, as v4 fallback logic not pass v7 test.js ADDED test, I write new logic using
|
@JKrol |
New Browser Test LinkTest Status(32/32) Test passed with
|
@loynoir FYI, 1 test fails in Safari 14.1.2 (16611.3.10.1.3) on macOS 11.5 |
New Browser Test LinkTest Status(31/31) Test passed with
|
@gcox Can you please test this? I tried to bring it back to old browser. I tested on a 2017 browser which seems ok, but i lack of a safari env. |
@loynoir All the tests pass |
Thanks very much! 😘 |
Hey, I'm getting this error here on iOS and macOS Safari:
It comes from here:
My code: https://github.com/muuvmuuv/portfolio/blob/master/src/elements/Link.jsx
Live error: https://portfolio-git-development.muuvmuuv.now.sh/
I am using version 5.x
The text was updated successfully, but these errors were encountered: