-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bower version
doesn't update bower.json in 1.8.0
#2389
Comments
This is correct behavior. Bower completely ignores version in bower.json, even prior 1.8.0 Please remove "version" field from bower.json |
Cheers, thanks for clarification. |
@sheerun Kept on thinking about this as we use bower quite heavily at work to work with web components shared between different projects. So, this change means that if user A works on a bower component with version 1.0.0 and, using bower 1.8.0, runs Later, person B, using bower 1.7.9 works on the same component and now git tags say latest is 1.1.0 but bower.json says 1.0.0. After working on the component person B runs
Seems like this could create some confusion? Perhaps this change should have been put in a major update to bower? |
The solution is again to remove version from bower.json, isn't it? |
The idea to remove "version" field from bower.json in favor of git tags is a really good idea. BUT, It should have been released as a Major version because it's a breaking and dangerous change. Or at least you should warn users about the fact that version field is deprecated and the use of "bower version" won't update anything... |
Output of
bower -v && npm -v && node -v
:Additional environment details (proxy, private registry, etc.):
Steps to reproduce the issue:
bower version major/minor/patch
Describe the results you received:
Git tag is updated as expected to correct version
Describe the results you expected:
Git tag is updated.
bower.json is updated
Additional information:
I see that #2232 (Make bower version behavior consistent with spec) now calculates version based on git tags to which I have no objection. However, this PR also removed updating the bower.json file. This breaks bower for users not running 1.8.0 since bower.json and git tags will be inconsistent.
From looking at the commit, these two lines should perhaps have been left intact?
3fbca6d#diff-83bf2b02cc098876be2d25091d8f66cbL33
3fbca6d#diff-83bf2b02cc098876be2d25091d8f66cbL35
(that is, "old" line 33 and 35 before the commit 3fbca6d)
My suggestion is to still use the git tag for calculating the new version and create a new git tag, but still also update the bower.json file to keep bower non-breaking for pre-1.8.0 users.
The text was updated successfully, but these errors were encountered: