I think you're looking for npm shrinkwrap:
https://npmjs.org/doc/cli/npm-shrinkwrap.html
It locks in all dependencies, including dependencies of dependencies, and turtles all the way down.
https://npmjs.org/doc/cli/npm-shrinkwrap.html
It locks in all dependencies, including dependencies of dependencies, and turtles all the way down.