substack/node-browserify — pull request #829 by afbobak (2014-07-17 15:28:53+00:00)
Title: Use absolute paths to calculate hash

I have the problem that I have
- a bundle "a" that exports some modules
- these modules are required by another bundle "b"
- bundle "a" and bundle "b" are in different node_modules
- the uber-project is "node dedupe"d

In this case the relative paths to the module are different from bundle "a" and bundle "b", which results in bundle "b" not being able to resolve the required module.

Calculating the hashes based on the absolute paths solves that problem. It also keeps the side-effect that should two different versions of the same module be exported they will get a different hash as npm won't dedupe them.

This patch calculates the hash based on absolute file paths.