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

Version the spec itself #48

Open
cvrebert opened this issue Jul 23, 2015 · 5 comments
Open

Version the spec itself #48

cvrebert opened this issue Jul 23, 2015 · 5 comments

Comments

@cvrebert
Copy link
Contributor

The spec itself ought to be versioned, and a field should be added to bower.json indicating at least the major (and perhaps also the minor) version of the bower.json spec that it claims to conform to.
This would allow for an easier migration/upgrade path when backward-incompatible changes need to be made to the spec. If a bower.json lacks a bower.json-spec-version-number, it should default to version "0" of the spec, for backward compatibility with old packages. Version 0 should be tagged retroactively as some commit circa the current version of the spec as of when this issue was filed. A bower.json using an outdated major version of the spec should at least emit a warning, and at most fail with an error if it's so old that supporting it is too burdensome for Bower or is bad public policy for Bower.

@sheerun
Copy link
Contributor

sheerun commented Jul 28, 2015

I think instead of that we could introduce engines field, just like in npm.

"engines" : { "bower" : "~1.4.0" }

@cvrebert
Copy link
Contributor Author

To clarify, are you suggesting using the Bower CLI tool's version number in engines or a spec-specific version number?

The problem with the former is there's (vexingly) no good correspondence between the Bower CLI tool and the spec. Also, e.g. if the Bower CLI tool added a bunch of wizards for doing things, that would necessitate a minor version bump, but bumping the engines version would be unnecessary busy work.

@sheerun
Copy link
Contributor

sheerun commented Jul 28, 2015

I mean version of bower used (not the spec). As you said, there's not enough correspondence between bower and spec, so it's safer to require given bower version than the version of spec. Spec could define what bower version implements what (if any version implements it at all).

I don't think we need wizards for that.

@cvrebert
Copy link
Contributor Author

"bower" would be the only valid key in engines, correct?

@sheerun
Copy link
Contributor

sheerun commented Jul 28, 2015

I'm working on custom resolvers feature, so I guess we could include them as well..

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

No branches or pull requests

3 participants