Skip to content
This repository has been archived by the owner. It is now read-only.

Fixed versions of npm dependencies for save backward compatibility #13

Closed
wants to merge 2 commits into from
Closed

Conversation

unclechu
Copy link
Contributor

@unclechu unclechu commented Oct 15, 2014

No description provided.

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Oct 15, 2014

Please, accept first: https://github.com/unclechu/gulp-livescript/commit/56615d6fa8cbcb056d26943710a621b16e1a8949 and publish it to npm (it's fix for backward compatibility for LS 1.2.0 for gulp-livescript 1.2.1). And after that accept this: https://github.com/unclechu/gulp-livescript/commit/f5d906cd3656957b8b2ad78caa9f839176422de7 and publish to npm for 1.3.0 LiveScript.

Thank you.

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Oct 15, 2014

And don't forget to create git-tags for 1.2.1 and 1.3.0 of course :)

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 16, 2014

Related to #11

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 16, 2014

Okay, that sounds more reasonable. Will do this tonight(GMT+8), thanks!

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 16, 2014

BTW, why you chose to change all ^ to ~ instead of changing only LiveScript?

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Oct 16, 2014

Because it can broke backward compatibility in the future too (as in this case with LS 1.3.0), we must shure that all be fine with dependencies. And new major version by authors of dependencies packages will not destroy our work.

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 16, 2014

hmm, but the new npm behavior is default using ^ instead of ~ (If you installed your dependencies with npm install --save(-dev)). I guess this rule should apply to libraries/packages, too?

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Oct 16, 2014

I don't know why "^" using by default in npm, but if you bother about backward compatibility you should never use "^" or "*" or ">" or ">=". You have an example here, it can make problems.

@clkao
Copy link

@clkao clkao commented Oct 16, 2014

Another way to deal with LS version is to use peerDependencies wtih a broader range of accepted versions, so the package using gulp-livescript can decide to use specific versions of LS if desired.

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 16, 2014

@clkao I would vote for peerDependencies.

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Oct 17, 2014

I believe this creates complications, it isn't rational to set peerDependencies for every sub-package. Tell me if you don't want to accept this pull request, I will create fork for myself and others who bothers about backward compatibility.

@appleboy
Copy link
Contributor

@appleboy appleboy commented Oct 17, 2014

peerDependencies +1

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 17, 2014

Release 1.2.1

"LiveScript": "~1.2.0"

It will stick to LS 1.2.0 and not 1.3.0 for any npm versions.
Thanks @unclechu for commit 56615d6

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 17, 2014

Release 1.3.0

"LiveScript": "~1.3.0"

It will stick to LS 1.3.0 for any npm versions.
Thanks @unclechu for commit f5d906c

@tomchentw
Copy link
Owner

@tomchentw tomchentw commented Oct 17, 2014

Release 2.0.0

"peerDependencies": {
    "LiveScript": "^1.3.0"
  },

Now LiveScript will be a peer dependencies of gulp-livescript. This make you more control over which LS version to use.

@tomchentw tomchentw closed this Oct 17, 2014
@clkao
Copy link

@clkao clkao commented Oct 17, 2014

@tomchentw++, @unclechu++

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Nov 11, 2014

I was chatting with some people in #npm channel on freenode (irc). We came to the conclusion that this is a bug in LiveScript. Because it looks like developers of LiveScript doesn't uses semver and brake backward compatibility in minor releases (but it permissible only for major releases). In that case we need to use "~" instead of "^" for "LiveScript" package version dependency. I'll create pull request.

@unclechu
Copy link
Contributor Author

@unclechu unclechu commented Nov 11, 2014

#17

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

Successfully merging this pull request may close these issues.

None yet

4 participants