Back to Explore

shikijs/shiki

GitHub
4 updates · last 90 days1 watchersOpen source

Last release:

Shiki is a syntax highlighter for code, described as “beautiful yet powerful” and based on TextMate grammar. It is useful if you want accurate, high-quality syntax highlighting for Markdown or other text that follows supported grammar rules.

Project status

  • Actively maintained: The source has recent GitHub activity (upstream push on 2026-07-03) and updates are appearing in 2026 with minimal gaps (for example, 4.3.0 on 2026-06-25 and 4.3.1 on 2026-07-03).
  • Update cadence: The observed recent updates suggest a roughly weekly to biweekly cadence, with smaller patch updates following shortly after feature updates (4.3.0, then 4.3.1 eight days later).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v4.3.1

    v4.3.1 adds a new token `type` value to Shiki token objects. It also extends the `includeExplanation` option to support a new mode that can populate this token type during tokenization.

    Features
  • v4.3.0

    v4.3.0 primarily introduces Svelte renderer support for @shikijs/stream by adding a new ShikiStreamRenderer.svelte component. The stream package is extended with a new './svelte' entrypoint, along with build and test wiring so the renderer can be bundled and validated.

    Features
  • v4.2.0

    v4.2.0 introduces two new packages, @shikijs/stream and @shikijs/magic-move, along with documentation for both. The release notes also mention bug fixes related to transformer YAML comment handling and a mobile scrolling behavior fix in vitepress-twoslash.

    Features
  • v4.1.0

    v4.1.0 is described as a small bug fix related to the twoslash integration, specifically forwarding `tsModule` to `createTwoslasher`. The provided code diff, however, shows a much larger set of internal refactors across multiple packages (core, primitive, colorized-brackets, rechype, monaco, cli, and CI), with behavior-preserving changes in many places.

  • v4.0.2

    v4.0.2 is a small release focused on fixing ANSI highlighting when multiple themes are provided. The code changes refactor how tokenization is executed across themes (by threading the base tokenization function), and update tests/snapshots to cover the multi-theme ANSI case. It also includes a minor change to the bundled language display name for nextflow-groovy.

  • v4.0.1

    Release v4.0.1 is labeled as a bug fix focused on fixing TypeScript declaration (dts) bundling. The actual diff also includes a theme metadata change for the bundled horizon-bright theme and several build/tooling dependency bumps.

  • v4.0.0

    v4.0.0 drops Node v18 support and introduces new packages (a leaner @shikijs/primitive and @shikijs/markdown-exit). The code diff shows a major internal refactor where @shikijs/shiki core largely delegates low-level highlighting and tokenization to @shikijs/primitive, with several exports and function signatures changed accordingly.

    BreakingFeatures
  • v3.23.0

    v3.23.0 adds CLI enhancements (stdin support and new listing commands) and expands transformer capabilities to support rendering leading whitespace and the `[!code info]` notation. The diff also shows improvements around case normalization for CLI language/extension detection and updates to the bundled languages/themes catalogs.

    Features
  • v3.22.0

    v3.22.0 updates Shiki grammar and theme bundles. The code diff shows it also expands the set of built-in bundled languages (including new language IDs and aliases) and adds additional built-in themes, along with internal test snapshot updates and dependency/tooling bumps.

    BreakingFeatures
  • v3.21.0

    Shiki v3.21.0 introduces changes around grammar handling and improves `codeToHast` so HAST data and properties are preserved in the generated output. It also includes a VitePress Twoslash fix for scroll blocking on mobile viewports.

    Features
  • v3.20.0

    v3.20.0 adds an `@shikijs/cli` `--format` option to output HTML (defaulting to ANSI). It also improves robustness in `rehype` lazy language loading, and fixes a `vitepress-twoslash` popper recomputation timing issue, while shaving redundant work in the core tokenization pipeline.

    Features
  • v3.19.0

    Shiki v3.19.0 adds `rootStyle: false` support for disabling root `<pre>` styling, introduces new `classActiveCode` options for notation transformers, and ships a new `transformerRemoveComments`. It also extends Twoslash's transformer filtering with an extra `context` argument and includes several targeted bug fixes across core, registry dependency checks, and Monaco color mapping.

    Features
  • v3.18.0

    Shiki v3.18.0 adds a new `zeroIndexed` option to the `transformerMetaHighlight` transformer, and fixes token merging offset handling in `mergeWhitespaceTokens`. It also improves `langAlias` behavior so aliases can resolve to special languages (for example, aliases mapping to `ansi`).

    Features