duojs / duo

A next-generation package manager for the front-end
3.42k stars 117 forks source link

Allow duo to always update dependencies #488

Closed dominicbarnes closed 9 years ago

dominicbarnes commented 9 years ago

This adds a -U, --update flag to the CLI (and a corresponding .update([value]) method to the API) that forces duo to re-resolve all dependencies. (regardless of mtimes)

Since we are using conditional GETs in the Github API, checking for updates to the tags will not count towards your API limit!

This is the last piece needed to safely cache the components directory in a CI environment, since now we can ensure that we get the latest version of our dependencies. Before, the only way to ensure this was by building components/ from scratch every time, which is terribly inefficient.

Unfortunately, I was unable to find a way to test such a thing, since it depends on a remote releasing a new version since the last time duo was ran, which we can't mock as of now. :(