Version Packages - #3233
Open
ecoscript[bot] wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Bundle Stats✅ No significant changes. All scenario measurements (7)🗺️
Significant means at least 1.0 KB and 1% gzip, or at least 5 ms and 10% import time. |
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 7, 2026 09:41
1197689 to
b526769
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 7, 2026 09:44
b526769 to
d759b05
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 7, 2026 10:05
d759b05 to
c9721b7
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 7, 2026 10:08
c9721b7 to
310ea73
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 7, 2026 13:38
310ea73 to
9898fb8
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 8, 2026 06:13
9898fb8 to
3f3e2e9
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 8, 2026 06:54
3f3e2e9 to
4b5c1d7
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 8, 2026 08:47
4b5c1d7 to
288f274
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 8, 2026 09:58
288f274 to
f5cfb79
Compare
ecoscript
Bot
force-pushed
the
changeset-release/main
branch
from
September 8, 2026 10:35
f5cfb79 to
0fa2e9d
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@portabletext/markdown@2.1.0
Minor Changes
#3240
bf560b9Thanks @christianhg! - feat: round-trip unknown objects throughjson:objectfences and code spansCustom objects now survive Markdown conversion in both directions.
portableTextToMarkdownrenders a block-level object as a```json:objectfence and an inline object as ajson:object-tagged code span, andmarkdownToPortableTextturns both back into the original objects,_keyincluded, no schema required. Previously these objects came back ascodeblocks, and inline objects also split the block around them, so converting to Markdown and back destroyed them.Both forms parse back to the objects in the payloads, with the surrounding text intact.
What changes in existing output and parsing:
```jsonfences become```json:object, and inline objects stay inside their line instead of breaking out.json:objectlanguage is reserved. Acodeblock with exactly that language keeps its code but loses the language when serialized.```json:objectfence or tagged code span that doesn't contain a JSON object with a_typeparses as ordinary code.#3239
58d1541Thanks @christianhg! - feat: report degraded constructs during markdown parsingmarkdownToPortableTextnow takes anonDegradationoption for constructs the schema can't represent (an undeclared decorator, a table with notableblock object, a task checkbox with notasklist, and so on). One callback, called at most once, after the whole document has been walked, only when at least one construct degraded: areportobject holdingdegradations, everyDegradationin encounter order ({type: string, message: string, line?: number, snippet?: string}, exported asDegradation, withtypea literal union that grows as new degradation sites report;snippetis the offending construct's text, truncated to 40 characters, present whenever there's a specific piece of source text to quote), andmessage, the same degradations grouped, snippeted, and sorted by line into one human-readable string.Enforce against lossy output by throwing your own error from inside the callback; the throw propagates out of
markdownToPortableText:Repeated declines of the same kind collapse into one line of
messageinstead of repeating the sentence once per occurrence;degradationsstays ungrouped, one entry per occurrence. Match ontype:messageis human-readable and may change between releases.With
onDegradationunset, conversion still degrades silently: a library shouldn't log on its own initiative. This removes the previous behavior of a handful of style-fallback paths callingconsole.warnon their own; pass a function toonDegradationto observe those losses instead.Patch Changes
#3183
0da0721Thanks @christianhg! - fix: escape markdown syntax in plain span text during serializationIf your Portable Text contains text that happens to look like markdown, converting it to markdown and back used to corrupt it: the punctuation was read as formatting instead of text.
portableTextToMarkdownnow backslash-escapes such text, so it comes back as exactly the text it was.This works wherever the text sits (headings, blockquotes, list items, table cells) and also when the risky characters are split across neighboring spans. The visible change in your output: markdown for text containing such punctuation gains backslashes it didn't have before. It pastes and parses like any hand-written markdown.
Text with the
codedecorator is never backslash-escaped. Its backtick delimiters widen instead, so the content survives verbatim even when it contains backticks:If you supply custom mark or block renderers:
childrennow arrives pre-escaped. When you need the original text, read thetextargument instead (the built-incoderenderer does exactly that).Two things stay as they were. A URL with an explicit scheme (
https://…) or an email address is not escaped: it keeps its text and simply becomes a link on the next parse. Awww.-style address is only left alone while it contains no markdown punctuation; with it, it gets escaped like ordinary text, and the round trip keeps every character either way. And leading or trailing whitespace that markdown itself trims still trims, same as before this change.#3234
452fdbeThanks @christianhg! - fix: parse markdown soft breaks as spaces, not line breaksMarkdown written across several source lines, the way editors and prose tools wrap text, is one paragraph that reflows.
markdownToPortableTextused to bake each of those wraps into the text as a literal newline, exactly as if you had written a hard break, and converting back to markdown then produced real hard breaks that weren't in your document.Wrapped source like this:
used to parse to the span text
'This paragraph is written\nacross two source lines.'(a fixed line break in the content) and now parses to'This paragraph is written across two source lines.'(one reflowing line, which is how markdown renders it).Real hard breaks are unchanged: end a line with two or more spaces, or a backslash, and the span text still gets a
\n:Line one\ Line twostill parses to
'Line one\nLine two'.@portabletext/editor@8.1.3
Patch Changes
#3236
adb3e46Thanks @christianhg! - fix: emit reliable patches after clearing the editorDeleting all content makes the editor emit an
unsetpatch that removes the entire value. Typing again then emitted patches that assumed the value still existed. Applying those patches dropped the typed text, or threwCannot apply deep operations on primitive values.The editor now first emits patches that create the value again:
setIfMissing, aninsertof the block, then the text changes. Deleting all content again emitsunsetagain.#3245
85fc2d7Thanks @christianhg! - fix: match the inserted list block by identity when inheriting list propertiesInserting keyless blocks into a list via an
insert.blocksevent now inherits the surrounding list'slevelandlistItemas intended. Previously the inserted list block kept whateverlevelandlistItemit arrived with, and with more than one keyless block in the event the insertion could abort entirely after hitting the event-chain depth limit.#3235
53f24a9Thanks @christianhg! - fix: keep numeric path segments for keyless nodes in resolved pathsPaths returned by
getNode,getChildren, andgetAncestorsnow carry the numeric sibling index for a node without a usable_key, instead of a fabricated{_key: undefined}segment that cannot distinguish keyless siblings. Repairs and edits addressing keyless nodes now always target the right node, including keyless children nested under keyless parents, and the patches they emit address the same numeric position.#3232
73dd0e3Thanks @christianhg! - fix: mint keys for empty-string and non-string_keyvalues, not justundefinedA child carrying
_key: ''or a non-string_keynow gets a fresh key minted by normalization, the same repair a child with no_keyat all already received. Previously such keys were kept as-is, leaving nodes the editor could not reliably address. When several keyless siblings arrive at once, each now receives its own distinct key instead of the first sibling absorbing every mint.#3245
81a6f77Thanks @christianhg! - fix: pass blocks returned fromonPasteunparsed to theinsert.blockseventBlocks returned from a custom
onPaste(theinsertresult) now reach theinsert.blocksbehavior event exactly as returned: keys are no longer generated, unusedmarkDefsno longer stripped, and unknown block types no longer dropped before behaviors see them. The blocks are still validated against the schema when inserted, so nothing invalid reaches the document.One narrow behavioral delta rides along: when the returned array puts an unknown-type block before a text block, the text block now inserts as its own block instead of merging into the block at the cursor, matching what a direct
insert.blocksevent already did.#3232
f80ab9fThanks @christianhg! - fix: schedule keyless children from a wholesale set for key-mint normalizationBlocks or children that arrive without a
_keythrough a whole-arraysetpatch are now repaired: normalization mints a key for every keyless child and emits the correspondingsetpatches. Previously such children were skipped when collecting normalization work, so they stayed keyless in the editor and any edit addressing them could not target the document.@portabletext/plugin-character-pair-decorator@9.0.8
Patch Changes
@portabletext/plugin-dnd@2.0.9
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-emoji-picker@8.0.8
Patch Changes
@portabletext/plugin-input-rule@7.0.8
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-list-index@2.0.7
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-markdown-shortcuts@9.0.8
Patch Changes
@portabletext/plugin-one-line@8.0.7
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-paste-link@5.0.7
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-sdk-value@8.1.2
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-table@2.0.7
Patch Changes
@portabletext/editor@^8.1.3@portabletext/plugin-typeahead-picker@7.0.8
Patch Changes
@portabletext/plugin-typography@9.0.8
Patch Changes
@portabletext/toolbar@9.0.8
Patch Changes
@portabletext/editor@^8.1.3