Avoid automatic installation of dependencies when running generators? #15324
comatory
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The monorepo I'm working on is using renovate bot. This bot tries to automatically upgrade dependencies (in somewhat smart way).
Using this has been a good thing in general as it keeps having dependencies up-to-date without too much effort. However I noticed when I run generators such as
@nrwl/storybook:configuration
or@nrwl/nx-plugin:generator
, Nx makes changes to mypackage.json
and install those dependencies as well.I understand the motivation behind it, you want to make sure those generators have required dependencies for their functionality. In practice what often happens to us is that renovate will keep updating the codebase but Nx will try to downgrade the dependencies. So running these generators becomes somewhat frustrating as one has to watch what happens to
package.json
and we end up ignoring those changes anyway.There is a way to configure renovate to have dependencies pinned but that's also not very smart because it is not fulfilling its purpose. If we could get information about what dependencies those generators are using and at what versions, we could perhaps set up rules in renovate automatically but at the moment this information is not exposed.
We noticed that generator
@nrwl/react:lib
has optionskipPackageJson
(which by the way doesn't work properly in v15.0.0 but it's fixed in later versions) which does not do any changes topackage.json
. Perhaps if all generators provided by@nrwl
had this in their schema, it would not be an issue for us.Is anyone using renovate with Nx succesfully? I'd like to hear your ideas.
Beta Was this translation helpful? Give feedback.
All reactions