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

Method _updateHash

lib/ExportsInfo.js:913–935  ·  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 * @returns {void}

(hash, runtime, alreadyVisitedExportsInfo)

Source from the content-addressed store, hash-verified

911 * @returns {void}
912 */
913 _updateHash(hash, runtime, alreadyVisitedExportsInfo) {
914 // add/delete keeps path semantics without copying the set per level
915 alreadyVisitedExportsInfo.add(this);
916 for (const exportInfo of this.orderedExports) {
917 if (exportInfo.hasInfo(this._otherExportsInfo, runtime)) {
918 exportInfo._updateHash(hash, runtime, alreadyVisitedExportsInfo);
919 }
920 }
921 this._sideEffectsOnlyInfo._updateHash(
922 hash,
923 runtime,
924 alreadyVisitedExportsInfo
925 );
926 this._otherExportsInfo._updateHash(
927 hash,
928 runtime,
929 alreadyVisitedExportsInfo
930 );
931 if (this._redirectTo !== undefined) {
932 this._redirectTo._updateHash(hash, runtime, alreadyVisitedExportsInfo);
933 }
934 alreadyVisitedExportsInfo.delete(this);
935 }
936
937 /**
938 * Gets restore provided data.

Callers 1

updateHashMethod · 0.95

Calls 4

hasInfoMethod · 0.80
addMethod · 0.45
_updateHashMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected