MCPcopy
hub / github.com/webpack/webpack / updateHash

Method updateHash

lib/AsyncDependenciesBlock.js:79–89  ·  view source on GitHub ↗

* Updates the hash with the data contributed by this instance. * @param {Hash} hash the hash used to track dependencies * @param {UpdateHashContext} context context * @returns {void}

(hash, context)

Source from the content-addressed store, hash-verified

77 * @returns {void}
78 */
79 updateHash(hash, context) {
80 const { chunkGraph } = context;
81 if (this._stringifiedGroupOptions === undefined) {
82 this._stringifiedGroupOptions = JSON.stringify(this.groupOptions);
83 }
84 const chunkGroup = chunkGraph.getBlockChunkGroup(this);
85 hash.update(
86 `${this._stringifiedGroupOptions}${chunkGroup ? chunkGroup.id : ""}`
87 );
88 super.updateHash(hash, context);
89 }
90
91 /**
92 * Serializes this instance into the provided serializer context.

Callers

nothing calls this directly

Calls 2

getBlockChunkGroupMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected