npm / pinyin-pro
pinyin-pro
What changed in pinyin-pro 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
1 new APIs and options13 performance1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpinyin-pro 315 changes
New APIs and options 1
Supports continuous third-tone sandhi, enabled with thirdTone, while preserving the compatible semantics of the existing toneSandhi boolean.
Performance 13
Optimizes node lookup and queue processing during AC automaton construction.
Merges consecutive custom pronunciation updates to reduce repeated custom dictionary builds.
Uses backtracking pointers to reconstruct match paths, reducing array allocations during matching.
Optimizes prefix matching to reduce unnecessary string processing.
Reuses already-split text characters to avoid splitting them repeatedly.
Reuses final parsing results to reduce repeated computation in type: 'all' mode.
Optimized repeated computation in the DP process and reduced memory usage.
In Node, no longer prebuilds the AC automaton through
setTimeout, further reducing import overhead.Skips the repeated-character processor when text does not contain 々, contributing to a reported 20%+ performance improvement.
Avoids prefix string allocation when building the AC automaton, improving segmentation performance.
Reuses child-node lookups during AC matching to improve segmentation performance.
Uses backtracking pointers to reconstruct the maximum-probability path, improving segmentation performance.
Uses a native split fast path for BMP text.
Fixes and other changes 1
Compatible with restrictions in runtimes such as Cloudflare Workers that disable timers during module initialization.