{"name":"hash-for-dep","version":"1.5.2","author":{"name":"Stefan Penner","email":"stefan.penner@gmail.com"},"license":"ISC","_id":"hash-for-dep@1.5.2","maintainers":[{"name":"kellyselden","email":"npm.8o075@dralias.com"},{"name":"rwjblue","email":"me@rwjblue.com"},{"name":"katiegengler","email":"katie@kmg.io"},{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"homepage":"https://github.com/ember-cli/hash-for-dep#readme","bugs":{"url":"https://github.com/ember-cli/hash-for-dep/issues"},"dist":{"shasum":"ca15e54175c7f46f1d1aa02eee5f5532c1c4bca3","tarball":"http://registry-npm.ywwl.com/hash-for-dep/download/hash-for-dep-1.5.2.tgz","fileCount":20,"integrity":"sha512-+kJRJpgO+V8x6c3UQuzO+gzHu5euS8HDOIaIUsOPdQrVu7ajNKkMykbSC8O0VX3LuRnUNf4hHE0o/rJ+nB8czw==","signatures":[{"sig":"MEYCIQDeJSHFT8Amgrrr0zoygnaEKozVuRUWOYkBj18kxj6YMwIhAKKO+GLSv9Oek+i+wTbLp0UKgRdsq0J90mjk+5fiHtai","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/hash-for-dep@1.5.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":33995,"size":11324,"noattachment":false,"key":"/hash-for-dep/-/hash-for-dep-1.5.2.tgz"},"main":"index.js","_from":"file:hash-for-dep-1.5.2.tgz","scripts":{"test":"mocha tests/**/*-test.js","test:debug":"mocha debug tests/**/*-test.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f3aae7c9-d02e-4561-8dca-c3b072e16076"}},"_resolved":"/tmp/dd41c2bf1bd560c989cfac26fa4dbd10/hash-for-dep-1.5.2.tgz","_integrity":"sha512-+kJRJpgO+V8x6c3UQuzO+gzHu5euS8HDOIaIUsOPdQrVu7ajNKkMykbSC8O0VX3LuRnUNf4hHE0o/rJ+nB8czw==","repository":{"url":"git+https://github.com/ember-cli/hash-for-dep.git","type":"git"},"_npmVersion":"11.10.1","description":"generates a hash that represents a module and its depenencies uniqueness","directories":{},"_nodeVersion":"22.22.0","dependencies":{"resolve":"^1.10.0","heimdalljs":"^0.2.3","heimdalljs-logger":"^0.1.7","resolve-package-path":"^1.0.11"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","mocha":"^2.2.4","release-plan":"^0.17.4"},"_npmOperationalInternal":{"tmp":"tmp/hash-for-dep_1.5.2_1771864920878_0.31636679088179154","host":"s3://npm-registry-packages-npm-production"},"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":1771864921033,"_cnpm_publish_time":1771864921033,"dist-tags":{"latest":"1.5.2"}}