How to make sure latest npm version is installed using puppetlabs-nodejs?

I am using puppetlabs-nodejs module to install nodejs and npm. But how can I make sure that the version of both npm and nodejs is the latest version or is a specific version.

-su

At present you can't unfortunately. It would be possible but would require changes to the module (which I'm sure the author would accept pull requests for)

Specifically the module currently ensures that both node and npm are present, rather than latest or set to a specific version. You could expose an interface to change this if required.

https://github.com/puppetlabs/puppetlabs-nodejs/blob/master/manifests/init.pp#L61

https://github.com/puppetlabs/puppetlabs-nodejs/blob/master/manifests/init.pp#L67