-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates dependencies #923
Updates dependencies #923
Conversation
underscore needs to go back into package.json. I've been trying to figure out howto add a testcase to ensure it stops being lost |
Oh, that's pretty interesting @rhubarbselleven. I must not understand exactly how node's dependency system works...I would think that Backbone would pull it in. But you're right, I just checked and nope, it doesn't! |
Added Underscore back as a dependency. Though I still don't see why Backbone didn't cause it to be installed! |
Sorry, I'm missing the refs off the top of my head but the collection view is where the dependency on underscore comes from. There's also a few issues floating around about |
It is a bit odd with the whole npm with bower thing, I've been trying to get my head around it. As essentially all build steps are performed with grunt, and bower is needed to have fetched all the dependencies - wouldn't the dependencies of |
IMHO, we should use explicit versions or ranges... have been burnt by |
yes we happen to be using 2 libs that do not follow semvar... backbone and underscore so we should hard lock |
Wait, what, Underscore and Backbone don't follow semvar? 馃槺 |
also coffeescript it is a bad thing |
@samccone what makes you think so? All of the last changes are semvar-compatibel, introducing new features with minor and no compatibility break within one major. However, I agree on coffeescript. |
Anachron: see here |
Thanks, didn't see that one! |
Since it doesn't follow semver, we're in a bit of a pickle. It is best to provide as large a range for the users of Marionette as possible to reduce the likelihood that they manually need to select which version of the library to include. The Thoughts? |
It's not so difficult to override a dependency's |
I think we all agree on this point, @disruptek. I'm wondering if someone should try to keep tabs on all of the versions of Backbone that Marionette supports (for the users), or if we should just hardcode the current supported version (easy for devs, worse for users). |
That sounds about as difficult as performing a regression test. |
I'd leave it as the last supported version of this project (I don't think you can specify version range, just starts getting ugly imo). Bower allows you to specify resolved dependencies as in although package X.1 requires Y.2, use Y.1 instead. |
I don't think that it's difficult; it's just a tedious (and important) thing to keep track of. I'm leaning toward agreeing with @rhubarbselleven and just specifying a single version. @samccone / @cobbweb thoughts? There are also some interesting questions raised in this comment that I'm not sure if I have a good answer to if anyone else has thoughts. |
A read I found whilst googling:
Also: http://stackoverflow.com/questions/15092345/javascript-dependency-management-npm-vs-bower-vs-volo To me it seems that when it comes to dependency management, |
We should at least maintain backwards compatibility with the latest few versions of Backbone/Underscore. Given this, I think for Underscore and Backbone we should specify a range. For for Backbone we might do something like |
(from my other PR adding something similar) Perhaps we could put an upper bound on the dependency? The marionette website advertises compatibility with underscore 1.4.4+. Maybe we could cap it at <= 1.7.0 for the time being? |
@wbinnssmith, given that it doesn't follow semver the upper limit should probably be the most recent version of Underscore, which for now is I'll update this PR with some ranges for Backbone/Underscore per @cobbweb's suggestions in the AM |
"backbone.babysitter": "~0.0.6", | ||
"backbone.wreqr": "~0.2.0" | ||
"dependencies": { | ||
"backbone": "1.0.0 - 1.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should update the readme.md line 164-168
@@ -31,6 +31,15 @@ module.exports = function(grunt) { | |||
' * https://github.com/marionettejs/backbone.wreqr/\n' + | |||
' */\n\n' | |||
}, | |||
assets: { | |||
babysitter: 'bower_components/backbone.babysitter/lib/backbone.babysitter.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So just to be clear, this now all depends on someone running bower before building, for that reason I think we should add bower to the package.json under devDependencies
.
Then in package.json we can add something like.
"scripts": {
"bower": "./node_modules/bower/bin/bower install"
}
So an admin then only has to do something like
npm install
npm run-script bower
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Would you rather this over grunt bower
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well ideally we would also add grunt into package.json and add something like
npm run-script grunt
This allows us to version lock grunt / bower and prevent people from needing to install things in a global scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃憤
Removed defunct public directory for bower_components. Updated test suite to use bower_components.
merged into v1.6.3 |
馃帀 馃槃 |
Updates dependencies for stuff. The only 'big' one is Underscore. Changelog here. Tests still pass 馃憤
Also exchanged scary
>=
for safe~
for dependencies.