What is the process to change versions of dependencies in a nested NPM package?

I am trying to utilize the NPM package grunt-contrib-jasmine, but it has several dependencies. The hierarchy of dependencies includes:

─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]

There is a known issue with this phantomjs version that hampers its installation on Mac OS X, but the latest release resolves this issue.
What steps should I follow to make grunt-lib-phantomjs rely on a newer version of phantomjs?

To provide further details:
  • grunt-contrib-jasmine specifically requires version “~0.2.0” of grunt-lib-phantomjs, which in turn requires “~1.8.1” of phantomjs.
  • Even if I add phantomjs to my own package dependencies, it does not help; both versions still get installed, and grunt-contrib-jasmine defaults to the older version (see: When installing a package with NPM, can you specify an alternative version of one of its dependencies?).