refactor: use Maps instead of Records (#10312)
This commit is contained in:
1 parent
84e99fbf5a
commit
0048667db4
52 files changed
+409
-347
No files matched your search
@@ -362,7 +362,7 @@ async function _rebuild (
|
||||
sideEffectsCacheKey = calcDepState(depGraph, depsStateCache, depPath, {
|
||||
includeDepGraphHash: true,
|
||||
})
|
||||
if (pkgFilesIndex.sideEffects?.[sideEffectsCacheKey]) {
|
||||
if (pkgFilesIndex.sideEffects?.has(sideEffectsCacheKey)) {
|
||||
pkgsThatWereRebuilt.add(depPath)
|
||||
return
|
||||
}
|
||||
@@ -373,7 +373,7 @@ async function _rebuild (
|
||||
if (pgkManifest != null) {
|
||||
// This won't return the correct result for packages with binding.gyp as we don't pass the filesIndex to the function.
|
||||
// However, currently rebuild doesn't work for such packages at all, which should be fixed.
|
||||
requiresBuild = pkgRequiresBuild(pgkManifest, {})
|
||||
requiresBuild = pkgRequiresBuild(pgkManifest, new Map())
|
||||
}
|
||||
|
||||
const hasSideEffects = requiresBuild && allowBuild(pkgInfo.name, pkgInfo.version, depPath) && await runPostinstallHooks({
|
||||
|
||||
Reference in new issue
Block a user