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

Feature request: add { allowNewer: true } option #13

Open
ronkorving opened this issue Aug 16, 2017 · 4 comments
Open

Feature request: add { allowNewer: true } option #13

ronkorving opened this issue Aug 16, 2017 · 4 comments

Comments

@ronkorving
Copy link
Collaborator

This option would allow users to break the semver range, but only by providing a package that is newer than the registered range (not older).

Users could then be greeted by a warning, which would depend on #12.

@stelcheck
Copy link
Member

Maybe "warn: boolean" would be better, or "error: boolean". I could see someone wanting to go to a lower version than recommended, for instance.

@ronkorving
Copy link
Collaborator Author

See #12 for warnings. I think I would like the options to be disconnected from warnings. If we also want to allow users to go older, that can be an option in and of itself. I don't mind being very verbose with our options.

@stelcheck
Copy link
Member

I see. It might be better to find a unified API for that then...

requirePeer('module', {
  error: [true|false|'newer'|'older']
})

Or something like that maybe?

@ronkorving
Copy link
Collaborator Author

Then I wouldn't know if it would throw or warn. In any case, if we add this feature, I would want it to be absolutely backwards compatible. Too many people use this library now for such a small addition to have such a big impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants