Open sonikasharma1403 opened 1 year ago
@AgentEnder , @jaysoo, @Coly010
Following.
@AgentEnder - any update or workaround for this?
The same issue. My project uses a lot updateBuildableProjectDepsInPackageJson
and interesting to find how we can upgrade the project on NX 17 without removing updateBuildableProjectDepsInPackageJson
I did it via nx-dependency-checks
https://nx.dev/nx-api/eslint-plugin/documents/dependency-checks. had to turn off a couple of functionality to get the same output as before.. Also, instead of modifying the distribution's package.json, it modifies the root one.
We were already considering to declare all of our dependencies manually, because updateBuildableProjectDepsInPackageJson
would sometimes get it kinda wrong.
E.g. some devDependency imported in storybook file ended up in the dist package.json.
So the dependency-checks
eslint rule was very welcome.
However, for internal dependencies, it sets the version to *
, which ends up in the final package.json.
That is not ideal, as we loose the ability to tell which versions of our packages work together.
If you have many unrelated packages (differently from the nrwl/nx
repo), it doesn't make sense to release all packages on every release, so using semver's independent mode.
Edit: related to https://github.com/nrwl/nx/issues/20121
This seems to be fixed? Using --fix now seems to insert an exact dependency version for internal dependencies for me at least.
Close?
Current Behavior
As far as I understand, updateBuildableProjectDepsInPackageJson option modified the distribution's package.json. I tried the
@nx/dependency-checks
but it is not modifying my package.json post build instead it modifies thepackage.json
which was specified.I am looking for a way to restore the previous behavior.
Also, what if I am not using a third-party module? but still want to add it as my library's dependency.. can we do that with Nx 17 (used to work with NX 16)
Expected Behavior
Should work as with Nx 16
GitHub Repo
No response
Steps to Reproduce
@something/a
@something/b
build the project and notice the package.json. notice that the package.json has both
@something/a
and@something/b
.Repeat the same with NX 17..
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response