@chenglou/pretext breaking changes
@chenglou/pretext 1.0.0 (October 14, 2026) is its newest release with breaking changes, 31 of them. The first: Removed PreparedTextWithSegments.breakableFitAdvances. Every breaking API change we have recorded in @chenglou/pretext on npm: 33 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 1.0.0, released October 14, 2026. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
@chenglou/pretext 1.0.0 breaking changes
- Removed
PreparedTextWithSegments.breakableFitAdvances
PreparedTextWithSegments.breakableFitAdvances was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.breakablePreferredBreaks
PreparedTextWithSegments.breakablePreferredBreaks was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.chunks
PreparedTextWithSegments.chunks was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.discretionaryHyphenWidth
PreparedTextWithSegments.discretionaryHyphenWidth was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.letterSpacing
PreparedTextWithSegments.letterSpacing was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.lineEndFitAdvances
PreparedTextWithSegments.lineEndFitAdvances was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.lineEndPaintAdvances
PreparedTextWithSegments.lineEndPaintAdvances was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.segLevels
Code that reads segLevels must stop using it. npmjs.com - Removed
PreparedTextWithSegments.simpleLineWalkFastPath
PreparedTextWithSegments.simpleLineWalkFastPath was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.spacingGraphemeCounts
PreparedTextWithSegments.spacingGraphemeCounts was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
PreparedTextWithSegments.tabStopAdvance
PreparedTextWithSegments.tabStopAdvance was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
prepareWithSegments
Only the segments, kinds and widths fields of the prepareWithSegments handle remain available. github.com - Removed
rich-inline:RichInlineFragment.end
RichInlineFragment.end was removed in @chenglou/pretext 1.0.0 npmjs.com - Removed
rich-inline:RichInlineFragment.start
RichInlineFragment.start was removed in @chenglou/pretext 1.0.0 npmjs.com - Behavior changed
Handles created by version 0.0.9 are no longer valid, so the text must be prepared again. github.com - Behavior changed
In Chrome, Safari and Firefox, lines now break where the browser breaks them, and rich inline lays out as one paragraph, so line breaks can differ from 0.0.9. github.com - Behavior changed
Code that reads rich-inline cursors as places in an item's text must read the fragment's sourceStart and sourceEnd instead. github.com - Behavior changed
A font string that Canvas ignores, such as an empty one, now throws a RangeError, so code passing such values must pass a valid font. github.com - Signature changed
layoutNextLine
The second and third arguments are swapped, so callers must pass the width before the cursor. npmjs.com - Signature changed
layoutNextLineRange
The second and third arguments are swapped, so callers must pass the width before the cursor. npmjs.com - Signature changed
measureLineStats
Was function measureLineStats(prepared: PreparedTextWithSegments, maxWidth: number): LineStats; now function measureLineStats(prepared: PreparedText, maxWidth: number): LineStats. npmjs.com - Signature changed
measureNaturalWidth
Was function measureNaturalWidth(prepared: PreparedTextWithSegments): number; now function measureNaturalWidth(prepared: PreparedText): number. npmjs.com - Signature changed
PreparedTextWithSegments
Was type PreparedTextWithSegments = InternalPreparedText & {segments: string[];}; now type PreparedTextWithSegments = PreparedText & {readonly segments: readonly string[]; readonly kinds: readonly SegmentBreakKind[]; readonly widths... npmjs.com - Signature changed
PreparedTextWithSegments.kinds
Was kinds: SegmentBreakKind[]; now readonly kinds: readonly SegmentBreakKind[]. npmjs.com - Signature changed
PreparedTextWithSegments.segments
Was segments: string[]; now readonly segments: readonly string[]. npmjs.com - Signature changed
PreparedTextWithSegments.widths
Was widths: number[]; now readonly widths: ArrayLike<number>. npmjs.com - Signature changed
rich-inline:prepareRichInline
Was function prepareRichInline(items: RichInlineItem[]): PreparedRichInline; now function prepareRichInline(items: Array<RichInlineItem | RichInlineBox>, options?: RichInlineOptions): PreparedRichInline. npmjs.com - Signature changed
rich-inline:RichInlineFragment
Was type RichInlineFragment = {itemIndex: number; text: string; gapBefore: number; occupiedWidth: number; start: LayoutCursor; end: LayoutCursor;}; now type RichInlineFragment = {itemIndex: number; text: string; gapBefore: number... npmjs.com - Signature changed
rich-inline:RichInlineFragmentRange
Was type RichInlineFragmentRange = {itemIndex: number; gapBefore: number; occupiedWidth: number; start: LayoutCursor; end: LayoutCursor;}; now type RichInlineFragmentRange = {itemIndex: number; gapBefore: number; gapItemIndex: number... npmjs.com - Signature changed
rich-inline:RichInlineItem
Was type RichInlineItem = {text: string; font: string; letterSpacing?: number; break?: 'normal' | 'never'; extraWidth?: number;}; now type RichInlineItem = {text: string; font: string; letterSpacing?: number; break?: 'normal' | 'never'... npmjs.com - Signature changed
walkLineRanges
Was function walkLineRanges(prepared: PreparedTextWithSegments, maxWidth: number, onLine: (line: LayoutLineRange) => void): number; now function walkLineRanges(prepared: PreparedText, maxWidth: number, onLine: (line: LayoutLineRange) =>... npmjs.com
@chenglou/pretext 0.0.6 breaking changes
- Signature changed
PrepareOptions
Was type PrepareOptions = {whiteSpace?: WhiteSpaceMode; wordBreak?: WordBreakMode;}; now type PrepareOptions = {whiteSpace?: WhiteSpaceMode; wordBreak?: WordBreakMode; letterSpacing?: number;}. npmjs.com - Signature changed
rich-inline:RichInlineItem
Was type RichInlineItem = {text: string; font: string; break?: 'normal' | 'never'; extraWidth?: number;}; now type RichInlineItem = {text: string; font: string; letterSpacing?: number; break?: 'normal' | 'never'; extraWidth?: number;}. npmjs.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.