Skip to content

chore: remove obsolete rehypeAnimate name workaround - #705

Open
farnabaz wants to merge 1 commit into
mainfrom
pr-pov/remove-obsolete-rehypeanimate-name-worka-1cb4
Open

farnabaz wants to merge 1 commit into
mainfrom
pr-pov/remove-obsolete-rehypeanimate-name-worka-1cb4

Conversation

@farnabaz

Copy link
Copy Markdown
Collaborator

Follow-up to #702.

Before #702 the processor cache keyed plugins by fn.name, so createAnimatePlugin renamed each rehypeAnimate closure to rehypeAnimate$<n> to avoid cache collisions. The cache now keys plugins by function identity (getPluginId), so each closure already gets its own key. This removes the instanceId counter and the Object.defineProperty override. The returned plugin object stays the same.

Also:

  • Extends the unreleased quiet-plugins-render changeset with a note on the behavior change: plugin functions created during render now produce a new processor on each render. Create them once (module scope or useMemo) to keep cache hits.
  • Adds a patch changeset for this cleanup.

Follow-up to #702.

Before #702 the processor cache keyed plugins by `fn.name`, so `createAnimatePlugin` renamed each `rehypeAnimate` closure to `rehypeAnimate$<n>` to avoid cache collisions. The cache now keys plugins by function identity (`getPluginId`), so each closure already gets its own key. This removes the `instanceId` counter and the `Object.defineProperty` override. The returned plugin object stays the same.

Also:
- Extends the unreleased `quiet-plugins-render` changeset with a note on the behavior change: plugin functions created during render now produce a new processor on each render. Create them once (module scope or `useMemo`) to keep cache hits.
- Adds a patch changeset for this cleanup.
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
streamdown Ready Ready Preview, v0 Oct 28, 2026 11:11am UTC

@farnabaz
farnabaz marked this pull request as ready for review October 28, 2026 11:10

This branch was successfully deployed

1 active deployment
Preview — 1ca355a5 Deployed Oct 28, 2026 by vercel[bot]
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