From 0c50cca1f64b6a71832e4718dfb51d2dc348f391 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Fri, 3 Apr 2026 15:41:11 +0200 Subject: [PATCH] refactor: move vfile DataMap augmentation to @quartz-community/types --- package-lock.json | 4 ++-- quartz/plugins/index.ts | 50 ----------------------------------------- 2 files changed, 2 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index e71692f..9448fb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1835,7 +1835,7 @@ }, "node_modules/@quartz-community/types": { "version": "0.2.1", - "resolved": "git+ssh://git@github.com/quartz-community/types.git#b1dc9ac610c253d0673d1c8c9a695cd4c5aac0ae", + "resolved": "git+ssh://git@github.com/quartz-community/types.git#d413569b02ff0cd9a7e8d74dee125d20a5e5ec72", "dev": true, "license": "MIT", "engines": { @@ -1857,7 +1857,7 @@ }, "node_modules/@quartz-community/utils": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/quartz-community/utils.git#8b6e32ba07b62500dce10f0c79ca43bb7d7e55bc", + "resolved": "git+ssh://git@github.com/quartz-community/utils.git#20b1ac1844ea477b4e32f206a515a5be8d01c56e", "dev": true, "license": "MIT", "dependencies": { diff --git a/quartz/plugins/index.ts b/quartz/plugins/index.ts index e290d94..ccb8a22 100644 --- a/quartz/plugins/index.ts +++ b/quartz/plugins/index.ts @@ -1,8 +1,5 @@ import { StaticResources } from "../util/resources" -import { FilePath, FullSlug, SimpleSlug } from "../util/path" import { BuildCtx } from "../util/ctx" -import { Root as HtmlRoot } from "hast" -import { Element } from "hast" export function getStaticResourcesFromPlugins(ctx: BuildCtx) { const staticResources: StaticResources = { @@ -51,50 +48,3 @@ export * from "./types" export * from "./config" export * as PageTypes from "./pageTypes" export * as PluginLoader from "./loader" - -declare module "vfile" { - // inserted in processors.ts - interface DataMap { - slug: FullSlug - filePath: FilePath - relativePath: FilePath - // from description transformer - description: string - text: string - // from crawl-links transformer - links: SimpleSlug[] - // from table-of-contents transformer - toc: { depth: number; text: string; slug: string }[] - collapseToc: boolean - // from obsidian-flavored-markdown transformer - blocks: Record - htmlAst: HtmlRoot - hasMermaidDiagram: boolean | undefined - // from frontmatter transformer (e.g. note-properties) - frontmatter: { [key: string]: unknown } & { - title: string - } & Partial<{ - tags: string[] - aliases: string[] - modified: string - created: string - published: string - description: string - socialDescription: string - publish: boolean | string - draft: boolean | string - lang: string - enableToc: string - cssclasses: string[] - socialImage: string - comments: boolean | string - }> - // from created-modified-date transformer - dates: { - created: Date - modified: Date - published: Date - } - defaultDateType?: "created" | "modified" | "published" - } -}