* Get module graph hash big int. * @param {ChunkGraphModule} cgm the ChunkGraphModule * @param {Module} module the module * @param {RuntimeSpec} runtime the runtime * @returns {bigint} hash as big int
(cgm, module, runtime)
| 1793 | * @returns {bigint} hash as big int |
| 1794 | */ |
| 1795 | _getModuleGraphHashBigInt(cgm, module, runtime) { |
| 1796 | if (cgm.graphHashes === undefined) { |
| 1797 | cgm.graphHashes = new RuntimeSpecMap(); |
| 1798 | } |
| 1799 | const graphHash = cgm.graphHashes.provide(runtime, () => { |
| 1800 | const hash = createHash(this._hashFunction); |
| 1801 | hash.update(`${cgm.id}${this.moduleGraph.isAsync(module)}`); |
| 1802 | const sourceTypes = this._getOverwrittenModuleSourceTypes(module); |
| 1803 | if (sourceTypes !== undefined) { |
| 1804 | for (const type of sourceTypes) hash.update(type); |
| 1805 | } |
| 1806 | this.moduleGraph.getExportsInfo(module).updateHash(hash, runtime); |
| 1807 | return BigInt(`0x${hash.digest("hex")}`); |
| 1808 | }); |
| 1809 | return graphHash; |
| 1810 | } |
| 1811 | |
| 1812 | /** |
| 1813 | * Get module graph hash with connections. |
no test coverage detected