-
Notifications
You must be signed in to change notification settings - Fork 7
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
express
is transitively pulled by dependents of web-ext
#115
Comments
From my limited understanding I don't see the express functionality used in |
Interesting side effect that we didn't anticipate, sorry about that! I am not so sure about what to do, though. We started to use this package in addons-linter to avoid duplicate code and consolidate a few things. We don't really want to maintain too many repos but this is clearly a problem so we might have no other choice... @rpl WDYT? |
I'm not sure of your use case exactly, but maybe this is a good use case for peerDependencies here? Especially if the project where you use this also depends on express explicitely! |
Ouch, yeah... this seems a quite unfortunate side-effect (thanks @julienw for reporting it, I usually give a look to the renovatebot PRs in the web-ext repo to double-check nothing unexpected is being introduced in the package-lock.json file, but I honestly missed to notice this one). From a quick look to the sources in this repo it seems that express is being used only by the
@willdurand how do the strategies briefly described above sound to you? is there any additional approach that you did think of during the past few days that may be also worth to be evaluated? |
I do have a quick question: is the code in |
The peer dependency approach does not sound too bad to me.
It is indeed used in different internal projects (more than one). The |
@willdurand May I ask you to add some additional details about this part of your last comment? (The one about |
Running |
ah, that was actually what I was guessing that functions.js module was related to. ok, then, that sounds like something we should do as part of npm package separate from the addons-linter one, so that dependents npm packages like web-ext that do not need that wouldn't need to pull express just to be able to import the addons linting module. |
Alrighty, so we released a new major version (4.0.0) of this lib to fix this issue: https://github.com/mozilla/addons-scanner-utils/releases/tag/4.0.0. This new version is now used in The problem in |
Hey,
While updating to a new version of
web-ext
I was surprised that this pulled all ofexpress
. So I looked closer and noticed that this comes from this tool. This seems a bit too much that express is transitively pulled to all addons that would depend on web-ext, as it's a pretty big dependency.Do you think this would be possible to remove this dependency? Maybe extract the functionality that needs
express
to a different package?Thanks
The text was updated successfully, but these errors were encountered: