-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 exception to transpile normalize-url mode to es5 when bundled into the DLL #35804
Add exception to transpile normalize-url mode to es5 when bundled into the DLL #35804
Conversation
Pinging @elastic/kibana-operations |
Is |
💚 Build Succeeded |
@joshdover the chain of dependencies is |
@elastic/code is it possible to swap this package out with one that supports the browser? Or, could we remove our usage of this in the browser, maybe return the parsed URL in an API call? |
sounds good to me, how urgent is this? |
@zfy0701 that is a blocker for 7.1.0 feature freezing on May 7th so I think it is urgent 😃 |
@zfy0701 I tried solve the problem in the upstream dependencies but that won't be possible as the maintainers didn't want to transpile their libraries before the npm publish step. That way I think we only have 2 solutions:
We can also keep the resolution for now to unblock, but I think we should really fix that quickly for the long term. |
it's not that easy to make them all as server side call because we parse url a lot in client we used to use regex to do a lot of the url parsing but during the review process we switch to the same library with server, at the time we think it's valid suggestion, without any knowledge of this issue. so option 1, swap out the package would mean revert we can try to find a replacement but I don't feel they are very promising. option 2 would be keep this PR option 3 would be fork this package and put it as I'm leaning towards 2 or 3, I would hear @spalger's opinion |
Well over that info I would say that the best option would be trying to found something else to use than this library, so option 1. In case that is not easy to do, I would say we should follow option 3. |
Assuming all that would be necessary is transpiling this one module, I'm good with adding something like https://gist.github.com/spalger/af3dd51b25ffcb259624558136ced757 to the optimizer config as a one-time exception. The opinions expressed in sindresorhus/ama#446 resonate with me. That said, if this turns out to be the tip of an iceberg and tons of other modules are going to start doing the same thing, I think we would need a more appropriate solution. Hopefully we can drop support for IE11 or get fully transitioned to the new platform if that future is headed for us soon. I feel like it's fine to start with a little exception for now. |
💚 Build Succeeded |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…o the DLL (elastic#35804) * chore(NA): add resolution to prevent unsupported normalize-url path. * chore(NA): resolutions for create package json task. * chore(NA): extend dll compiler config with normalize url module. * chore(NA): add exclusion for normalize-url node_modules.
7.x: 517a07c |
That PR closes #35759
Basically
git-url-parse
was updated to11.1.2
which in dependencies of dependencies updates ends up with a[email protected]
in the browser. That dependency is a node_module that is not distributed with ES5 so unsupported ES6 code endups inside the DLL which causes troubles in IE 11.