unstale

npm / pinyin-pro

pinyin-pro

What changed in pinyin-pro 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

2 new APIs and options19 performance5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

pinyin-pro 326 changes

New APIs and options 2

  • Supports continuous third-tone sandhi, enabled with thirdTone, while preserving the compatible semantics of the existing toneSandhi boolean.

    3.29.5release notes

  • Adds a mode for recognizing traditional Chinese characters.

    3.28.0release notes

Performance 19

  • Optimizes node lookup and queue processing during AC automaton construction.

    3.29.5release notes

  • Merges consecutive custom pronunciation updates to reduce repeated custom dictionary builds.

    3.29.5release notes

  • Uses backtracking pointers to reconstruct match paths, reducing array allocations during matching.

    3.29.5release notes

  • Optimizes prefix matching to reduce unnecessary string processing.

    3.29.5release notes

  • Reuses already-split text characters to avoid splitting them repeatedly.

    3.29.5release notes

  • Reuses final parsing results to reduce repeated computation in type: 'all' mode.

    3.29.5release notes

  • Optimized repeated computation in the DP process and reduced memory usage.

    3.29.4release notes

  • In Node, no longer prebuilds the AC automaton through setTimeout, further reducing import overhead.

    3.29.4release notes

  • Skips the repeated-character processor when text does not contain 々, contributing to a reported 20%+ performance improvement.

    3.29.3release notes

  • Avoids prefix string allocation when building the AC automaton, improving segmentation performance.

    3.29.3release notes

  • Reuses child-node lookups during AC matching to improve segmentation performance.

    3.29.3release notes

  • Uses backtracking pointers to reconstruct the maximum-probability path, improving segmentation performance.

    3.29.3release notes

  • Uses a native split fast path for BMP text.

    3.29.3release notes

  • Reuses parsed final across all output modes, improving pinyin API performance.

    3.29.2release notes

  • Reuses split characters across multiple middleware.

    3.29.2release notes

  • Delays building the Aho-Corasick automaton to reduce main-thread blocking when importing pinyin-pro.

    3.29.1release notes

  • Optimizes repeated computation in middlewareMultiple.

    3.29.1release notes

  • Adjusted ESM packaging so tree shaking includes only necessary code, reducing bundle size across APIs.

    3.29.0release notes

  • Reduced the ESM tree-shaken bundle size for the match API from 306.81 KB (gzip 134.49 KB) to 185.44 KB (gzip 80.79 KB).

    3.29.0release notes

Fixes and other changes 5

  • Compatible with restrictions in runtimes such as Cloudflare Workers that disable timers during module initialization.

    3.29.4release notes

  • Prevents pattern from accumulating duplicate entries during updates.

    3.29.2release notes

  • Avoids splitting pinyin for non-polyphonic characters.

    3.29.2release notes

  • Fixes incomplete removal of non-Chinese characters with nonZhScope.

    3.29.1release notes

  • Corrects the dictionary pronunciation of 行长 from háng cháng to háng zhǎng.

    3.28.2release notes