Search code examples
packagenpmyeomanyeoman-generator

Outdated generator libraries?


I am writing my first, own yeoman generator. For this to work, I copy a lot of code from the official generator-webapp. For example, in order to load all Grunt tasks at once, I need the following entry in my package.json:

  1 {
  2   "name": "package",
  3   "version": "0.0.0",
  4   "dependencies": {
  5     "load-grunt-tasks": "~0.2.0"
  6   }
  7   
  8 }  

Now, what I don't really understand: Whenever this generator is finished, it will be in use for a certain timespan, possibly several months or even more than a year. During this time, load-grunt-tasks will get updated - so I have to manually change the version number in package.json? Or can I just leave it like this? I am just worrying that after some months I have to start all over again if I want to maintain an adaptable and modifiable generator.


Solution

  • You don't have to. It will continue to work fine with the existing dependencies. But you should. Keeping dependencies up to date is one of the responsibilities of a maintainer. Though from experience you can usually upgrade without anything breaking. You don't have to manually change the version number, you can use david to update all dependencies in one go.