Skip to content

Commit b34df21

Browse files
test: skip inactive-dependency-hash under cacheUnaffected, which refuses usedExports
Also hash inactive requests as one JSON value, so request boundaries stay unambiguous.
1 parent 628ea45 commit b34df21

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎lib/graph/ChunkGraph.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ Caller might not support runtime-dependent code generation (opt-out via optimiza
20752075
if (inactiveRequests !== undefined) {
20762076
// connections arrive as resolutions finish, so sort like connectedModules
20772077
if (inactiveRequests.length > 1) inactiveRequests.sort();
2078-
for (const request of inactiveRequests) hash.update(request);
2078+
hash.update(JSON.stringify(inactiveRequests));
20792079
}
20802080
hash.update(graphHash);
20812081
return hash.digest("hex");
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
// The case needs optimization.usedExports, which cacheUnaffected refuses.
4+
module.exports = (config) =>
5+
!(config.experiments && config.experiments.cacheUnaffected);

0 commit comments

Comments
 (0)