feat: extract @portabletext/html package from block-tools#2225
Closed
christianhg wants to merge 1 commit intomainfrom
Closed
feat: extract @portabletext/html package from block-tools#2225christianhg wants to merge 1 commit intomainfrom
christianhg wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: a91b27e The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
0cf035b to
aba9d66
Compare
aba9d66 to
59a42e7
Compare
59a42e7 to
3bfc7dc
Compare
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
3bfc7dc to
25bcdfd
Compare
25bcdfd to
9b9e471
Compare
9b9e471 to
216b3ca
Compare
216b3ca to
a91b27e
Compare
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.
Extract HTML-to-Portable Text conversion from
@portabletext/block-toolsinto a new@portabletext/htmlpackage, mirroring the@portabletext/markdownAPI.Block-tools has always been a thin wrapper around code that does not depend on
@sanity/*types. This makes that split explicit: the new package owns the deserializer, rules, preprocessors, and all tests. Block-tools becomes a ~50-line legacy adapter that convertsArraySchemaTypetoSchemaand delegates.Changes:
@portabletext/htmlpackage withhtmlToPortableText(html, options?). Schema moves from positional arg into options.unstable_whitespaceOnPasteModerenamed towhitespace.@portabletext/block-toolsgutted to adapter: preserveshtmlToBlockssignature, re-exports from html package.converter.text-html.ts,converter.text-plain.ts) import from@portabletext/htmldirectly.defineSchema/compileSchemafrom@portabletext/schemainstead of Sanity schema fixtures.