-
Notifications
You must be signed in to change notification settings - Fork 13
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
Femto force user to explictly install a dependencies and not have it as transitive (from npm POV) #73
Comments
Hello @MangelMaxime, sorry for the delayed answer 😅
I don't think you need to specify
That won't be needed. Femto only installs packages that aren't already available but in case of transitive dependencies of libraries, they are there and Femto doesn't need to install anything else. Unless your binding requires a more recent version of |
Hey 👋, no problem I saw that you took a break and hope you enjoyed it :)
Indeed, we don't add the
I need to check again I though that Femto was reading the Thank you for your answer :) |
I think you are right here. I was just reading the code and Femto does this: reads top level packages from We can fix this behavior but using a better way to determine the currently installed npm packages using # using npm
npm list --json
# using yarn
yarn list --json Then parse and flatten the results into the list of all used packages, not just the top level ones. Do I smell the scent of a PR here? 😉 |
Indeed, it is not a problem from the "file system" POV (I don't have a better name for it sorry 😅). It can be more of a problem from the user POV because he needs to manage the version of a lot more package than they are used too. In our case, the transitive dependencies instead of just
That's possible indeed 😉 |
Correct me if I'm wrong but
this is a real thing and that's why pnpm had to add the last resort option of adding the |
I am working on binding
express
which have a bunch of API coming from other packages.For example, it use
mime
package. I did bind the Mime API but now I am unsure if I want to add the femto properties in it.In general, we just do
npm i express
but if I add the femto properties it will ask the user to install it manually in thepackage.json
and not have it as a transitive dependencies.Is this behaviour ok?
I am asking because in the end the user will probably have to install all the dependencies of express in it package.json which is not standard.
Should we find a way to say, Mime binding is included by Express bindings and so should not be explicitly required?
The text was updated successfully, but these errors were encountered: