Repository navigation
fix: isolate processor caches by plugin function identity - #702
Merged
Merged
Conversation
Contributor
|
@Claire-ovo is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Processor cache keys currently use plugin function names. Two closures returned by the same factory can therefore share a processor, causing one Streamdown instance to render with another instance's plugin behavior.
Use stable WeakMap-backed function IDs for bare and tuple remark/rehype plugins. Preserve reuse for the same function and the existing option serialization. Add eight regression/control cases and a patch changeset. No public API or styling changes.
Validation: six new cases fail on main; all eight pass with the fix. The streamdown suite passes 1,310 tests; the other five package test tasks were cache hits. Package and website builds, repository lint, and 17 workflow-action tests pass. Chrome checks pass at desktop/mobile viewports in static/streaming modes, including content updates.
Full-package tsc reports the same 210 diagnostics on main and this branch, with no added diagnostics by file/code/message comparison. Function-valued options and preset serialization are outside this change.
AI-assisted implementation and validation.