Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Simplify install command, add note on versioning. #1488

Merged
merged 3 commits into from
Mar 2, 2016

Conversation

arthurevans
Copy link

No description provided.

@arthurevans
Copy link
Author

@robdodson @ebidel PTAL.

{
"name": "my-project",
"version": "0.0.0",
"dependencies": {
"polymer": "Polymer/polymer#^1.2.0"
"polymer": "Polymer/polymer#~<var>currentVersion</var>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this do magical stuff and insert the latest version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's just an HTML <var> tag, indicating replacement text. The paragraph below explains it. Rather than using template magic, I was just going to do this, to explain that the version will vary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you simplify it to:

"polymer": "Polymer/polymer#~1.X.X" maybe?

@robdodson
Copy link
Contributor

LGTM if those variable tags do what they seem to do :D

@arthurevans
Copy link
Author

OK, changed to 1.X.X and updated the comment. Better?

@robdodson
Copy link
Contributor

Does it still need the var tags and explanation? I think it's implied that 1.x.x means a version range.

@ebidel
Copy link
Contributor

ebidel commented Jan 10, 2016

Should we stick with ^ instead so people get minor updates.

On Sun, Jan 10, 2016, 12:51 PM Rob Dodson notifications@github.com wrote:

Does it still need the var tags and explanation? I think it's implied that
1.x.x means a version range.


Reply to this email directly or view it on GitHub
#1488 (comment).

@robdodson
Copy link
Contributor

@ebidel when you run bower install --save Polymer/polymer bower will write the ~ version to your bower.json. It's my understanding that since we have values for all 3 digits, the ^ and ~ behavior would be the same in this case... i think... 😸

@ebidel
Copy link
Contributor

ebidel commented Jan 11, 2016

Maybe it's more of an issue with element updates, but I've seen folks not get the minor bumps from dependencies.

@ebidel ebidel closed this Jan 11, 2016
@ebidel ebidel reopened this Jan 11, 2016
@robdodson
Copy link
Contributor

Ah I'm wrong :P

In the simplest terms, the tilde matches the most recent minor version (the middle number). ~1.2.3 will match all 1.2.x versions but will miss 1.3.0.

The caret, on the other hand, is more relaxed. It will update you to the most recent major version (the first number). ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0.

@robdodson
Copy link
Contributor

Hm gross check this out: bower/bower#2121

On Windows, ^ is a shell escape character. I think you need to either quote it, or double it up: bower install --save pkg#^^1.2.0.

@robdodson
Copy link
Contributor

Opened a bower issues to try to discuss this... bower/bower#2144

@robdodson
Copy link
Contributor

PR to change the behavior is here: bower/bower#2145

@arthurevans
Copy link
Author

So, should we change the install advice here?

My objection to the #^1.2.0 version is that it suggests the 2nd digit is significant, and people keep wanting to update the docs, because they're "out of date".

Maybe we should change this back to #^1.0 and explain that this means "latest stable release >= 1.0 and < 2.0"?

@robdodson
Copy link
Contributor

I think the advice as written is fine. I may even swap out the tilde for caret since that'll be in the next release of bower anyway.

@arthurevans
Copy link
Author

Updated now that the new bower is live, and added a note for folks using the older version. WTYT @robdodson @ebidel ?

@arthurevans
Copy link
Author

No comments here, merging based on earlier convo.

arthurevans pushed a commit that referenced this pull request Mar 2, 2016
Simplify install command, add note on versioning.
@arthurevans arthurevans merged commit f852c76 into master Mar 2, 2016
@arthurevans arthurevans deleted the install-version branch March 2, 2016 18:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants