Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions quartz/plugins/loader/gitLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ export async function installPlugin(
if (options.verbose) {
console.log(styleText("cyan", `→`), `Plugin ${spec.name} already linked`)
}
linkPeerDependencies(pluginDir)
return { pluginDir, nativeDeps: collectNativeDeps(pluginDir) }
}
} catch {
Expand Down Expand Up @@ -479,6 +480,15 @@ export async function installPlugin(
console.log(styleText("green", `✓`), `Linked ${spec.name}`)
}

// Local sources skip the git-clone build path (and its
// linkPeerDependencies call in buildInstalledPlugin), so a local
// plugin that peer-depends on another @quartz-community/* plugin
// (e.g. a custom view registering against bases-page) would
// otherwise resolve a different module instance than the one the
// rest of Quartz uses, breaking any module-level singleton state
// (like a view-type registry) shared between them.
linkPeerDependencies(pluginDir)

return { pluginDir, nativeDeps: collectNativeDeps(pluginDir) }
}

Expand Down
Loading