fix(lib/plugins): resolve dependency graph before pushing nodes to ordered list

This commit is contained in:
PalmDevs 2025-07-21 15:32:32 +07:00
parent 57e2fa89da
commit a3ebccf1d6
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -23,12 +23,12 @@ export const pListOrdered: AnyPlugin[] = []
export const pPending = new Set<AnyPlugin>()
export function computePendingNodes() {
for (const plugin of pLeafOrSingleNodes) pListOrdered.unshift(plugin)
pLeafOrSingleNodes.clear()
for (const plugin of pPending) resolvePluginGraph(plugin)
pPending.clear()
for (const plugin of pLeafOrSingleNodes) pListOrdered.unshift(plugin)
pLeafOrSingleNodes.clear()
const stack = [...pRootNodes]
pRootNodes.clear()