Description
In the last few days, i find out that many dependencies of angular-cli and then try to get my feet wet.
And I just find @hansl #3488 also updates some of the dependencies. But I think it's less perfect.
My opinions
As the repo is a host for several packages, what does the dependencies
means for the repo itself? It will not be published.
Let's say the repo is the host.
In fact, the host is responsible for linting, building and testing the real-world packages. Without tests, the host theoretically ought to have devDependencies
only.
However, in real development, developers need to run unit tests and write code with the power of Typescript and IDE. So, we have to install dependencies
of those packages. (Note: e2e tests don't require that because they install dependencies independently)
Therefore, it can be concluded that the dependencies
field in the package.json
of the host itself, should be the combination of the dependencies
of those several packages. And then, the update workflow of the dependencies should be:
- If they are the dependencies of those packages, developer should update them in those packages'
package.json
- then, make a join of the packages'
dependencies
and make a update in host'spackage.json
- one should not directly add dependencies into
dependencies
field of host'spackage.json
- then, make a join of the packages'
- If they are the
devDependencies
, of course they should be updated indevDependencies
inpackage.json
of repo itself. - If there is duplication between
dependencies
anddevDependencies
, I would perfer to remove it fromdevDependencies
The currents status is, lacking a util to sync the dependencies
from the packages and a note to warn contributor not to manually update dependencies in repo's package.json