MCPcopy
hub / github.com/webpack/webpack / _updateHash

Method _updateHash

lib/ExportsInfo.js:1839–1852  ·  view source on GitHub ↗

* Updates hash using the provided hash. * @param {Hash} hash the hash * @param {RuntimeSpec} runtime the runtime * @param {Set<ExportsInfo>} alreadyVisitedExportsInfo for circular references

(hash, runtime, alreadyVisitedExportsInfo)

Source from the content-addressed store, hash-verified

1837 * @param {Set<ExportsInfo>} alreadyVisitedExportsInfo for circular references
1838 */
1839 _updateHash(hash, runtime, alreadyVisitedExportsInfo) {
1840 const usedNameHash =
1841 this._usedName instanceof InlinedUsedName
1842 ? `inlined:${this._usedName.render("")}`
1843 : this._usedName || this.name;
1844 hash.update(
1845 `${usedNameHash}${this.getUsed(runtime)}${this.provided}${
1846 this.terminalBinding
1847 }${this.pureProvide ? "P" : ""}`
1848 );
1849 if (this.exportsInfo && !alreadyVisitedExportsInfo.has(this.exportsInfo)) {
1850 this.exportsInfo._updateHash(hash, runtime, alreadyVisitedExportsInfo);
1851 }
1852 }
1853
1854 getUsedInfo() {
1855 if (this._globalUsed !== undefined) {

Callers 2

updateHashMethod · 0.95
_updateHashMethod · 0.45

Calls 4

getUsedMethod · 0.95
renderMethod · 0.45
updateMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected