Cover art by DALL-E.
Nx 16.4 introduces the @nx/dependency-checks ESLint rule to the @nx/linter package for verifying, adding, removing, and updat...
For further actions, you may consider blocking this person and/or reporting abuse
Nice write up, thank you for so many details.
I have a question about internal dependencies, by default lint --fix generate internal dependency (if library inside the workspace depends on the same workspace) with just wildcard, and wildcard in general are bad practices.
So do you know what is the best way to manage this?
Attaching an example, all with * are just libraries within this workspace
Are they buildable or publishable libraries?
They are both buildable and publishable libraries
Same here.
Hopefully not too late to the party and your case might relate to my experience...
I had a rather similar case with lib-a being an internal buildable only lib and lib-b, a publishable library depending on lib-a.
So the generated package.json looked rather similar until I changed :
The resulting package.json does not include lib-a as a dependency anymore but:
cool, thank you, didn't know it,
but my case is a bit different, I want it to set a correct version, and in a discord nx team already answered that the only option to do it, is to implement post target hook that will go by each library and update package.json manually before publishing, they said that they are doing the same for nx
I have a question, since it was mentioned that this is replacement for the updateBuildableProjectDepsInPackageJson.
updateBuildableProjectDepsInPackageJson - i use this to make sure that the dependencies for my library will be listed on the package.json of that publishable library, now without that option, it won't list the 3rd party package that my library requires.
It will not listed automatically for you.
It will luanch a linting error when you run the linting process, you would need to go and write the right version.
A way to automate the dependencies update is using the
--fixoption.nx lint YOUR_PROJECT --fixWorks as a charm ! Thank you.