-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
parse-url at version 6 doesn't work on Safari #31
Comments
Hi @edenhermelin! I am not sure how this should be solved... Ideally, |
hey @IonicaBizau, thanks for the quick response! Thanks anyway! |
@IonicaBizau Sorry for commenting on the closed issue, but the README of I think that this commit that upgraded Maybe a prudent choice could even be to internalize the necessary parts of |
@freben I thought of that too, but would like to keep it modular...
Can you please send me a link a of that? I couldn't find it... |
Sure! It's near the top of the readme. Seems to be an intentional choice he made. He does not seem to respond to the issue about this problem either. |
Also made an attempt at contributing a fix: sindresorhus/normalize-url#148 |
@IonicaBizau Update: My contributed fix was merged! :) Version 7.0.1 of normalize-url is now released. However, the 7 series is using ESM; read here https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c Which means that as I bump the dep to ^7.0.1,
I'll take a break from digging through this right now, maybe you have the ability to continue getting this bubbling up all the way to |
hey @IonicaBizau , |
@edenhermelin Sorry for the late reply. I'm getting the following error when upgrading to the latest version: .../parse-url/lib/index.js:4
, normalizeUrl = require("normalize-url")
^
Error [ERR_REQUIRE_ESM]: require() of ES Module .../parse-url/node_modules/normalize-url/index.js from .../parse-url/lib/index.js not supported.
Instead change the require of .../parse-url/node_modules/normalize-url/index.js in .../parse-url/lib/index.js to a dynamic import() which is available in all CommonJS modules.
...
code: 'ERR_REQUIRE_ESM'
} I am wondering if there is any simple way to fix this. Is |
hey, @IonicaBizau thanks for getting back to me! I know that there are ways to convert the project to use ESM/ to dynamically import ESM dependencies like mentioned in this gist by I don't know if these are approaches that you want to do in your project though. I did clone the repo and tried to just take the |
Hey @IonicaBizau , I pushed a PR that should fix the issue. |
Hi,
since version 6 of the module it seems as it doesn't work anymore on safari.
probably because it used a positive lookahead regex which is not supported on Safari.
@IonicaBizau can we please adjust the regex in a way that will work on Safari?
the regex:
relevant other issue - #22
Thanks!
The text was updated successfully, but these errors were encountered: