Previously the frontmatter check suppressed comments on any falsy
value (0, "", null, false, "false"), which is wider than the
documented API (docs/features/comments.md only shows `comments: false`).
The refactor also removes the `as Record<string, unknown>` cast
dance that predated the plugin importing proper QuartzComponentProps.
fileData.frontmatter and cfg.baseUrl are now typed directly.
Regression tests cover:
- frontmatter.comments=false / "false" -> suppressed (documented)
- frontmatter.comments=true / "true" / undefined -> rendered
- frontmatter.comments=0 / "" / null -> rendered (behavior change)
- data attribute wiring and defaults
- cfg.baseUrl fallback chain
BEHAVIOR CHANGE: sites that relied on the prior permissive disable
logic (e.g. setting `comments: 0` to hide comments) will now see
comments rendered. Update to `comments: false` to restore the intent.
The local QuartzComponent/QuartzComponentProps declarations were
fully-typed-as-unknown duplicates that predated or did not use the
@quartz-community/types import. Switching to the upstream types gives
downstream consumers accurate fileData/cfg/allFiles typing in their
editor.
Kept a local RequiredOptsConstructor alias because this plugin
genuinely requires opts (repo/category/id); upstream
QuartzComponentConstructor takes 'opts?: Options' which would
accept undefined and break the runtime.
Plugins run server-side during the Quartz build step, not in the
browser. Setting platform: 'node' tells esbuild to treat Node builtins
as available externals and avoids CJS-in-ESM require() failures for
any bundled dependencies that use Node APIs.
Pre-built output is now committed to the repository so that
Quartz can skip the build step during plugin installation.
The prepare script is removed to prevent redundant builds
when installing from npm/git.
tsup and typescript are only needed at build time — move to devDependencies
so they can be pruned after build. Dependencies already available from the
host Quartz installation are moved to peerDependencies to avoid duplication.
Replace ambient quartz-compat.d.ts declarations with direct imports
from @quartz-community/types. Remove node_modules path from tsconfig
include array.