Skip to content

feat: the content-freshness plugin - #8

Merged
danielmlr merged 5 commits into
mainfrom
feat/content-freshness-import
Sep 25, 2026
Merged

danielmlr merged 5 commits into
mainfrom
feat/content-freshness-import

Conversation

@danielmlr

Copy link
Copy Markdown
Member

Imports the content-freshness plugin from the private proof-of-concept repository as fresh files, the same way analytics came across. Nothing is published: no changeset, and the storage layout changes before a first release.

What is in it

  • packages/content-freshness: @eisbachcode/emdash-plugin-content-freshness. A scheduled audit that needs no network access: overdue schedules, missing or badly sized SEO descriptions, stale entries, forgotten drafts, and routable collections without a URL pattern. It uses content:read and schema:read, and reports without ever editing. See its README.
  • packages/shared: chain.ts (a sweep carried across cron runs) and listCollections(), copied unchanged from the proof of concept. parseCollections() stays. The shared floor rises to 0.39.0, where ctx.schema first exists.
  • Aligned with this workspace on the way in:
  • A test fix. The full-audit test had pinned its scheduler night to 2026-09-25 04:00Z. The plugin schedules follow-ups from the real clock, so the test began failing once real time passed that night. It now takes tomorrow's night. The details are in the commit message.

The toolchain is unchanged from the proof of concept: plugin-cli 0.12.0, plugin-test 0.2.1, EmDash 0.39.1. The move to 0.40.1 is a separate PR.

Verified

  • content-freshness: 38 tests, emdash-plugin validate, typecheck, build.
  • shared: 16 tests. analytics: 288 tests, typecheck and build, still on its own toolchain (plugin-test 0.2.0, EmDash 0.39.0).
  • gitleaks over the staged files found nothing. ef4884d does not exist in this repository.

… plugins

Copied unchanged from the proof-of-concept repository at ef4884d, where
the content plugins use them: `chain.ts` carries a sweep across cron runs
with alternating one-shot follow-ups, and `listCollections()` finds every
collection through `schema:read`. `parseCollections()` stays for now.

The floor rises to 0.39.0 because `ctx.schema` first exists there; the
analytics plugin already requires 0.39.0.
Imported from the proof-of-concept repository at ef4884d as fresh files.
A scheduled, network-free audit: overdue schedules, missing or badly
sized SEO descriptions, stale entries, forgotten drafts, and routable
collections without a URL pattern. Capabilities `content:read` and
`schema:read`; it reports and never edits.

Aligned with the workspace on the way in: `registry:publish` and
`registry:login` instead of the generated `publish` and `login`,
`prepublishOnly` builds, repository metadata for trusted publishing, a
peer range with a floor and no ceiling, and the analytics plugin's vitest
limits (30 s timeouts, one test file at a time). Toolchain unchanged from
the proof of concept: plugin-cli 0.12.0, plugin-test 0.2.1, EmDash 0.39.1.
The full-audit test pinned the host's scheduler clock to 04:00:05 on
2026-09-25, but the plugin schedules its follow-up runs from
`Date.now()`. While that night lay ahead of the real time, follow-ups
fell due; since then they land after the host's clock, never run, and
the sweep never finishes. The test now uses tomorrow's night, which is
always ahead of the wall clock. It still fails if a follow-up is lost.
The release workflow publishes every public package whose version is
missing from npm, with or without a changeset: the run after #11 listed
"These packages will be published as they were not found in the
registry". Merged public, content-freshness@0.1.0 would have been in the
next publish plan, and as a package npm does not know yet it cannot use
trusted publishing, so every later release run would fail on it.

The release PR removes the flag and adds the first changeset. AGENTS.md
says so for any package that follows.
@danielmlr
danielmlr merged commit dd8aa41 into main Sep 25, 2026
2 checks passed
@danielmlr
danielmlr deleted the feat/content-freshness-import branch September 25, 2026 20:46
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