mgit should use `package.json` if `mgit.json` was not found
It would be helpful not to define the same data twice.
For instance: if my project use fixed hashes, these hashes should be stored in both package.json (to let developers who won't contribute to dependencies use simple npm install) and in mgit.json (for developers who will contribute to dependencies to have proper versions by default).
I understand that there are cases where two separate configurations need to be defined, but for some cases, one is better. My proposal is that if mgit.json is not defined then mgit use package.json.
It makes sense as a feature. mgit.json could be optional, overriding options set in package.json.
mgit cannot install dependencies from npm. It means, we cannot use a version of a package as a repository URL. In this case, repository URL has to be generated based on package name.
I think that mgit should do nothing if there is a version instead of a repository path. It makes perfect sense: dependencies defined as an npm version I do not want to develop, only use. I want to work only with dependencies I get from git, and these should be handled by the mgit tool.
So, if the package has a version instead of the repository URL, mgit should skip the package. Do I understand?
Yep.
I wanted to implement this while working on https://github.com/cksource/mgit2/issues/30 but, as you both noticed, it's more work to filter correct stuff from package.json.
Is there a change that save-hashes will save them in the package.json if it is the config file?
I would say yes.
mgit could at least prompting No mgit.json found for now. But maybe it's only my problem that every time I'm trying to update ckeditor5-dev with mgit first :)
You can make a PR for this. It makes sense to log such an error clearly :)
Ok. I'll do it soon.
Can't wait :)