Commit graph

34 commits

Author SHA1 Message Date
saberzero1
72abbbcf64
deps: update @quartz-community/utils 2026-04-22 18:18:42 +02:00
saberzero1
f28bcb55e7
deps: update @quartz-community/utils 2026-04-17 02:40:10 +02:00
saberzero1
e11671dd75
deps: update @quartz-community/utils 2026-04-16 22:09:52 +02:00
saberzero1
d81079740c
refactor: rename LocalQuartzPluginData to SocialImageFileData and export it
The type was a deliberate narrowing of QuartzPluginData that documents
which fields the og-image emitter populates before invoking a user's
imageStructure callback (including the plugin-synthesised 'text'
field). The old name implied accidental duplication, inviting
'helpful' future refactors that would inline it into QuartzPluginData
and silently widen the public API.

Rename to SocialImageFileData, export it from the package entry, and
add a docstring explaining why it must stay narrow. The type was
already visible in the generated .d.ts through ImageOptions, so making
the export explicit matches what consumers already see in their IDE.

Also adds a test suite (og-image previously had no tests):
- SocialImageFileData contract tests locking in the documented shape
- imageStructure callback signature compatibility
- defaultImage called with populated / minimal / readingTimeText
  override payloads returns a valid preact VNode
2026-04-16 15:45:18 +02:00
saberzero1
46e145d658
deps: update @quartz-community/types and @quartz-community/utils 2026-04-16 13:28:52 +02:00
saberzero1
bb951e330e
fix: bundle @quartz-community/utils to avoid runtime subpath resolution failures 2026-04-04 11:36:31 +02:00
saberzero1
54b9b60077
deps: update @quartz-community/types and @quartz-community/utils 2026-04-03 16:19:21 +02:00
saberzero1
42b68efe6a
refactor: use shared getDate from @quartz-community/utils 2026-04-03 15:44:49 +02:00
saberzero1
0ce1e8930f
refactor: use shared getIconCode and ThemeKey from community packages 2026-04-03 15:07:49 +02:00
saberzero1
03500637ef
chore: update @quartz-community/utils to 8d2e14b 2026-03-22 12:38:24 +01:00
saberzero1
ee13d16991
deps: update @quartz-community/utils to latest 2026-03-22 12:05:14 +01:00
saberzero1
d63abb365d
fix: add createRequire banner for CJS compat in ESM bundles
Bundled CJS dependencies (e.g. reading-time) use require() for Node
builtins like 'stream' and 'util'. In ESM output, the esbuild-generated
__require shim throws 'Dynamic require of X is not supported' because
there is no global require in ESM context.

Add platform: 'node' and a banner that injects createRequire from the
'module' builtin, providing a working require() function for the CJS
compatibility layer.
2026-03-17 20:34:33 +01:00
saberzero1
6e0799acce
feat: add requiresInstall flag for native dependency auto-install 2026-03-17 19:43:13 +01:00
saberzero1
02fbed008c
ci: add dist externals verification step 2026-03-17 19:41:47 +01:00
saberzero1
c96aed0702
fix: bundle non-shared deps into dist to prevent runtime resolution failures
Move non-allowlisted packages from dependencies/peerDependencies to
devDependencies so tsup bundles them into dist/ instead of leaving
them as external imports that may not resolve at runtime.
2026-03-17 19:31:51 +01:00
saberzero1
f487db01da
fix: add missing peer dependencies as devDependencies for CI build
Install github-slugger and hast-util-to-jsx-runtime as devDependencies.
These are peer dependencies of @quartz-community/utils that must be present
for tsup's DTS build to resolve all transitive type imports.
2026-03-16 19:07:37 +01:00
saberzero1
dbe531feb1
chore: centralize type declarations and standardize tooling config
- Update types/globals.d.ts with centralized type declarations
- Add .prettierignore, update .eslintrc.json with triple-slash-reference override
- Remove duplicate scripts.d.ts/styles.d.ts if present
2026-03-16 18:55:26 +01:00
saberzero1
6b9af37711
fix: update types/utils lockfile to commits with dist/ 2026-03-14 22:44:06 +01:00
saberzero1
271581a1ee
fix: add build-time deps for DTS generation
satori, sharp, reading-time, and vfile are peerDependencies but needed
at build time for TypeScript declaration file generation via tsup.
Without them in devDependencies, the DTS build fails silently, producing
no index.d.ts — which causes the Quartz plugin index generator to skip
this plugin entirely.
2026-03-14 22:20:41 +01:00
saberzero1
e711d4ea63
chore: commit dist/ and remove prepare script
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.
2026-03-14 22:00:34 +01:00
saberzero1
3c706b34c6
chore: move build tools to devDependencies, shared deps to peerDependencies
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.
2026-03-14 21:27:26 +01:00
saberzero1
ab1f8e5ddc
fix: resolve ESLint and formatting issues for CI compliance 2026-03-09 03:47:13 +01:00
saberzero1
26c052f29c
fix: add passWithNoTests to vitest config 2026-03-09 03:21:30 +01:00
saberzero1
83b85ed0fa
deps: update @quartz-community/types and @quartz-community/utils 2026-03-09 03:03:56 +01:00
saberzero1
4ede61e768
deps: update @quartz-community/types 2026-02-28 20:08:37 +01:00
saberzero1
4da2eaedcf
chore: updated plugins 2026-02-25 17:09:00 +01:00
saberzero1
641ac886e5
docs: update README for v5 unified config system 2026-02-25 16:07:11 +01:00
saberzero1
14cc335449
fix: cast Preact VNode to satori parameter type for @types/react compatibility 2026-02-23 01:26:13 +01:00
saberzero1
829d1c8b60
fix: move tsup and typescript to dependencies for git install compatibility 2026-02-23 01:10:10 +01:00
saberzero1
9a00809fcc
chore: add quartz plugin manifest to package.json 2026-02-17 17:40:09 +01:00
saberzero1
c72ed66e95
docs: add plugin README 2026-02-14 02:13:24 +01:00
saberzero1
d68d1fba33
chore: update @quartz-community/types to v0.2.1 2026-02-13 23:58:35 +01:00
saberzero1
81045a698c
Implement og-image emitter plugin 2026-02-13 23:53:16 +01:00
Emile Bangma
f1e2f11d59
Initial commit 2026-02-13 23:35:47 +01:00