feature: using semvar or user provided function for expectedPackageIdentifier
Closed this issue · 4 comments
Use case:
if my package updates and changes the interface it provides to plugins package.js has no way of throwing or notifying users that they are using outdated plugins that will conflict.
It is possible to use the interface itself to do version checking but it would be neat if either package.js used semvar instead of matching strings or was able to take in a function to run during checking.
I think a user defined function as expectedPackageIdentifier
is a great idea.
Let me drink a cup of tea and think about this :)
Guess you saw this already, but may be interesting for others...
So far there exist loadedPlugins
which I am using in this test. Each plugin contains a meta
object which holds the package.json content including version.
Well to create an out of date alarm you have to know which version is the newest one. I am still impressed about the solution by wbond at https://github.com/wbond/package_control_channel. Maybe this is an inspiration for you too.
Feel free to keep me up to date with your ideas!
@BerkeleyTrue I have created a a new branch at https://github.com/s-a/package.js/tree/identify. Maybe you want to check this out before I will merge this to master and publish to NPM registry.
Since I ' ve marked expectedPackageIdentifier
as obsolete and introduced identify
method this will be a breaking change. I think the new solution is much more elegant.
Sweet. Will take a look later today.
Just increased semantic MAJOR version to 1.0.0
because of incompatible API changes. Take a look at the main tests to explore the new behavior.