{"name":"hash-for-dep","version":"1.5.0","description":"generates a hash that represents a module and its depenencies uniqueness","main":"index.js","scripts":{"test":"mocha tests/**/*-test.js","test:debug":"mocha debug tests/**/*-test.js"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/hash-for-dep.git"},"author":{"name":"Stefan Penner","email":"stefan.penner@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/stefanpenner/hash-for-dep/issues"},"homepage":"https://github.com/stefanpenner/hash-for-dep#readme","dependencies":{"broccoli-kitchen-sink-helpers":"^0.3.1","heimdalljs":"^0.2.3","heimdalljs-logger":"^0.1.7","path-root":"^0.1.1","resolve":"^1.10.0","resolve-package-path":"^1.0.11"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.2.4","mocha-jshint":"^1.0.0"},"gitHead":"3202ff7fc24afcf8a0b90ad28c72f8bfdc19bfd7","_id":"hash-for-dep@1.5.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"integrity":"sha512-Jtp264IRh25UmNHBNjB9jgYQGOpUVFMzt8E2MS6dJyR5uAO14bq4B9q5znOStkKpOpcxNUrYtg3hgpOSjQSONw==","shasum":"02dacb5a3ee14e45d06f5aa039d142c970940476","tarball":"http://registry-npm.ywwl.com/hash-for-dep/download/hash-for-dep-1.5.0.tgz","fileCount":17,"unpackedSize":42409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcew9ZCRA9TVsSAnZWagAAdzIP/A+IhMNUdgdtQHSgjn1N\nuDEeu3O1dR8y3VKVAzrtXkT6AyBRcoV1avR7V+eVHntWWQoNFHnYaypFe8kt\nFQSEHZk1WFuPNvhfFsOcOTuUlowIIeOsKfpN+wwCgFt2DswQOPwwNwpIiC+O\npemEH6yXDRnRfgLetCgFZWBtIipwd0Eovz7G37dpq/4W440qXgsJlshWvwam\nrtrW9ocEdTGru6BBQeQP6ApGn8FKyxSlXmJXnu3Vu00b6j2wrTLM6hRGvMta\n6axWhoMW8ugjEMPrBB3A0czv5yjOsn0ZdVy6z2WqtZ6PZkyyqWmdcaYUaRQ2\nocOP+EotgKF36oxyDY7hW1fj/aW4/3Q5b1DVvwi8xEp0AahrttwIAig8PA+z\nDpwBfUL9/XxZ3+AvVVZB9q52E3iXUlESzuBISONLK3TAeRVFiIAPNSmPptYS\no4kVmWKMT/mpK9/JO0HvJji3xRlGRbXhpziFxgMCfMEswTON8sO519JpVPfB\noXDqHfw4g85WRDGqjN3Og5lF/JdU21EF5WciDzhTgHX9nH8W6vMDHSWJD2qN\n/2zfySZbP8RKEDANqmq8OXgoHs7WzNRruFVR304Z6W/kJsp9jYgPZQmx+nBW\nJYZKq+SOuAesISB2Bkx+OzTXSjjotQhKsGJyAozRqCcWTw0wH89U2LIcrPFt\nNv1l\r\n=EPm8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEHJs62BaZoOL5Dt6FSdjIign1+68DYOTCt6AP381yQAiEA90j4YlqlC7Qt3TNXe5jZkx8WpGFa3yxz+SjJjn1WqB0="}],"size":16055,"noattachment":false,"key":"/hash-for-dep/-/hash-for-dep-1.5.0.tgz"},"maintainers":[{"name":"hjdivad","email":"npm@hjdivad.com"},{"name":"jayphelps","email":"hello@jayphelps.com"},{"name":"kellyselden","email":"kellyselden@gmail.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hash-for-dep_1.5.0_1551568729101_0.5095112761888061"},"_hasShrinkwrap":false,"readme":"# hash-for-dep [![Build Status](https://travis-ci.org/stefanpenner/hash-for-dep.svg?branch=stuff)](https://travis-ci.org/stefanpenner/hash-for-dep) [![Build status](https://ci.appveyor.com/api/projects/status/wf2u3j6lc52hdd21?svg=true)](https://ci.appveyor.com/project/embercli/hash-for-dep)\n\nGenerate a hash representing the stats of this module files and all its descendents files.\n\n\n```js\nvar hashForDep = require('hash-for-dep');\n\nhashForDep('rsvp'); // if RSVP is a dependency of the current project, you will get a checksum for it\nhashForDep('rsvp', 'path/to/other/project'); //  you will get a checksum for RSVP resolved relative to the provided root\n```\n\n## What does Hash For Dep consider a dependency?\n\nHashForDep respects the [node resolution algorithim](https://nodejs.org/api/modules.html#modules_all_together).\n\nFor example given:\n\n```\nfoo/package.json\nfoo/index.js\nfoo/node_modules/a/\nfoo/node_modules/a/package.json\nfoo/node_modules/a/index.js\nfoo/node_modules/a/node_modules/b\nfoo/node_modules/a/node_modules/b/package.json\nfoo/node_modules/a/node_modules/b/index.js\nfoo/node_modules/a/node_modules/f\nfoo/node_modules/a/node_modules/f/index.js\nfoo/node_modules/a/node_modules/f/package.json\nfoo/node_modules/c\nfoo/node_modules/c/index.js\nfoo/node_modules/c/package.json\nfoo/node_modules/d\nfoo/node_modules/d/index.js\nfoo/node_modules/d/package.js\n```\n\nwhere `foo/package.json` depends on `a` and `c` but not `d`\nand `foo/node_modules/a/package.json` depends on `b` not `f`\n\nHashForDep will consider: `a` `c` `b` as dependencies, and simply ignore `d` and `f`.\nWhen HashForDep considers a dependency, it will stat each of its files and those of its dependencies.\n\n\n## Cache\n\nNOTE: By default, these hashes are cached for the life of the process. As this\nis the same strategy node uses for `require(x)` we can safely follow suit.\n\nThat being said, some scenarios may exist where this is not wanted. So just\nlike `require._cache` exists, we provide the following options:\n\n#### To evict the cache manually (maybe for testing)\n\n```js\nrequire('hash-for-dep')._resetCache();\n```\n\n#### To opt out of the cache on a per invocation basis\n\n```js\nvar hashForDep = require('hash-for-dep');\n\nhashForDep(name, path, null, false /* this mysterious argument should be set to false */);\n```\n","publish_time":1551568729379,"_cnpm_publish_time":1551568729379,"dist-tags":{"latest":"1.5.2"}}