nodejitsu/require-analyzer — pull request #40 by AvianFlu (2011-10-19 08:33:27+00:00)
Title: Fix for package.json overwriting issues

This patch is a fix and test coverage for several related issues in which the `require-analyzer` will overwrite a user's explicit dependency versions or version ranges.

This issues are remedied by reading from the `dependencies` field of the `package.json` file, and merging any version information therein with the dependency information returned from `analyzer.file`, as well as that returned from `npm ls`. If a version range is found, or if the explicit version freeze syntax ( `==x.y.z`) is found, it is kept, since such constructs are generally deliberate. In the absence of such constructs, the `require-analyzer` functions as it did previously.

Prior to this patch, `analyzer.package` returned an array - since the version information must now be preserved, `analyzer.package` now returns an object in the form of `{ dependency: version }`.

Due to this small, but breaking change, a version bump to `v0.4.0` will be necessary.