Tuesday, April 22, 2014

Update all your Node app dependencies at once

Have you ever been in the situation where you wanted to update your nodejs app dependencies to the latest version? The dependencies and devDependencies defined in package.json? No, okay you are done here. Thanks for reading. Everybody else stay tuned and have a quick look at this little tool that helps to make the update as simple as possible.
Updating all your dependencies could be tedious, especially if you have a lot of them. The good news: there is a great solution to get them all updated in one step: npm-check-updates.
I recently found this, when I was looking around in npm land and there it was.

How does it work?

  1. Install it with npm install -g npm-check-updates and it will be installed globally
  2. cd into your project directory with the package.json of interest
  3. type npm-check-updates to get an overview of all updatable dependencies in your package.json. The dependencies and the devDependencies will be inspected.
The output will tell you which dependency could be updated, like this
"yeoman-generator" can be updated from ~0.16.0 to ~0.17.0-pre (Installed: 0.16.0, Latest: 0.17.0-pre.3)
You can take this information and change your package.json manually, but wait, npm-check-updates can do this automatically for you. Run npm-check-updates -u to update your package.json without any manual interaction.
Pretty sweet.

Monday, December 16, 2013

Guest post about Brackets and building Brackets Extensions

It’s already a couple of weeks ago, that I provided two guest posts about Brackets for Safari Books Online.
Please have a look at introduction to Brackets and Building a Brackets Extension and let me know what you think.
I’d like to hear your feedback. Thanks.

Friday, November 8, 2013

git re-merge done easy

I messed up some files during a larger merge a couple of days ago. When I tracked down the files that had issues (in my case the unit tests didn't succeed anymore), I wondered if there is an easy way to revert to the version of the file before the merge and redo the merge or at least bring back the file with the conflict markers.

I was looking for an elegant solution. Something must exist that helps engineers to easily resolve situations like this.
After 45 seconds of research (sometimes it's that quick if you know the right words to search for), this result on StackOverflow came up.
git checkout -m <filename>

Very nice solution. I was able to go back to the state, where the file contained all the conflict markers and I was able to resolve the issue pretty quickly.

Yes, sometimes git is really easy.