Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgit should use package.json if mgit.json was not found #29

Open
pjasiun opened this issue Jan 22, 2017 · 12 comments
Open

mgit should use package.json if mgit.json was not found #29

pjasiun opened this issue Jan 22, 2017 · 12 comments

Comments

@pjasiun
Copy link

pjasiun commented Jan 22, 2017

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.

@Reinmar
Copy link
Member

Reinmar commented Jan 23, 2017

It makes sense as a feature. mgit.json could be optional, overriding options set in package.json.

@pomek
Copy link
Member

pomek commented Jan 23, 2017

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.

@pjasiun
Copy link
Author

pjasiun commented Jan 23, 2017

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.

@pomek
Copy link
Member

pomek commented Jan 23, 2017

So, if the package has a version instead of the repository URL, mgit should skip the package. Do I understand?

@pjasiun
Copy link
Author

pjasiun commented Jan 23, 2017

Yep.

@Reinmar
Copy link
Member

Reinmar commented Jan 23, 2017

I wanted to implement this while working on #30 but, as you both noticed, it's more work to filter correct stuff from package.json.

@pjasiun
Copy link
Author

pjasiun commented Feb 1, 2017

Is there a change that save-hashes will save them in the package.json if it is the config file?

@pomek
Copy link
Member

pomek commented Feb 1, 2017

I would say yes.

@ma2ciek
Copy link
Contributor

ma2ciek commented Mar 16, 2017

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 :)

@Reinmar
Copy link
Member

Reinmar commented Mar 17, 2017

You can make a PR for this. It makes sense to log such an error clearly :)

@ma2ciek
Copy link
Contributor

ma2ciek commented Mar 17, 2017

Ok. I'll do it soon.

@pjasiun pjasiun mentioned this issue Mar 21, 2017
@pjasiun
Copy link
Author

pjasiun commented Mar 21, 2017

Can't wait :)

@Mgsy Mgsy added this to the next milestone Jul 16, 2019
@pomek pomek removed this from the nice-to-have milestone Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants