Skip to content

fix(bases): compact note metadata for Bases queries - #387

Open
luabagg wants to merge 1 commit into
oleeskild:mainfrom
luabagg:fix/compact-bases-note-metadata
Open

fix(bases): compact note metadata for Bases queries#387
luabagg wants to merge 1 commit into
oleeskild:mainfrom
luabagg:fix/compact-bases-note-metadata

Conversation

@luabagg

@luabagg luabagg commented Jul 16, 2026

Copy link
Copy Markdown

Why

Bases notes were given metadata: item.data, i.e. the full Eleventy data cascade. That embeds collections / graph / filetree / basesNotes into every note, inflating memory on large vaults and creating circular structures. Bases formulas only need frontmatter-ish fields.

Summary

  • Add compactNoteMetadata to strip Eleventy internals from Bases note metadata
  • Use it in graph basesNotes and notes.11tydata.js

Test plan

  • TZ=UTC npx vitest run src/helpers/linkUtils.test.mjs
  • Build a garden with Bases blocks on a large vault and confirm queries still work

Stop embedding the full Eleventy data cascade (collections/graph/filetree/basesNotes) into every Bases note metadata bag. Keep frontmatter-ish fields with cycle-safe cloning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant