Skip to content

chore(deps): update @shikijs/cli to v4#329

Draft
renovate[bot] wants to merge 1 commit intomainfrom
renovate/major-shiki-monorepo
Draft

chore(deps): update @shikijs/cli to v4#329
renovate[bot] wants to merge 1 commit intomainfrom
renovate/major-shiki-monorepo

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 2, 2026

This PR contains the following updates:

Package Change Age Confidence
@shikijs/cli (source) ^3.21.0^4.0.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

shikijs/shiki (@​shikijs/cli)

v4.0.2

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v4.0.1

Compare Source

   🐞 Bug Fixes
    View changes on GitHub

v4.0.0

Compare Source

   🚨 Breaking Changes
   🚀 Features
    View changes on GitHub

v3.23.0

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v3.22.0

Compare Source

   🚀 Features
    View changes on GitHub

Configuration

📅 Schedule: Branch creation - "before 9am on Monday" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Summary by CodeRabbit

  • Chores
    • Upgraded the project's CLI tooling dependency from v3.x to v4.x. This is a maintenance update with no user-facing feature changes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

The pull request updates the @shikijs/cli dependency in packages/cli/package.json from ^3.21.0 to ^4.0.0. This is a single-line change in the package manifest; there are no other code changes, control-flow modifications, or new exports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and directly describes the main change: updating @shikijs/cli to v4, which matches the single dependency version bump in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Updates Docs ✅ Passed Dependency upgrade is maintenance work, not a feature implementation; documentation updates required only for features.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.70%. Comparing base (72a25a6) to head (01eabb0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #329   +/-   ##
=======================================
  Coverage   82.70%   82.70%           
=======================================
  Files         126      126           
  Lines        7616     7616           
  Branches     2054     2118   +64     
=======================================
  Hits         6299     6299           
  Misses       1316     1316           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 2, 2026
@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch from e0e3681 to e060582 Compare March 2, 2026 07:38
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 2, 2026
@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch 3 times, most recently from 1113a67 to 13caff9 Compare March 3, 2026 11:23
@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch from 13caff9 to cc5daf1 Compare March 9, 2026 14:08
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/package.json`:
- Line 51: Add an "engines" entry to packages/cli/package.json to declare the
required Node version (match the workspace floor used by siblings), e.g., add an
"engines": { "node": ">=22.14.0" } field in the package.json for the
`@shikijs/cli` package so it is consistent with other packages like
blocks/convert/mcp and documents the Node 20+ requirement from the v4 upgrade.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ef5e186c-1fb5-4c5b-af72-b15a01c0c9e1

📥 Commits

Reviewing files that changed from the base of the PR and between 13caff9 and cc5daf1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/cli/package.json

@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch from cc5daf1 to f8ad6d6 Compare March 9, 2026 14:24
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/cli/package.json (1)

51-51: ⚠️ Potential issue | 🟠 Major

Declare the Node floor with this major bump.

Shiki v4 drops Node 18 support and requires Node.js 20+, but this public package still omits engines.node. That leaves consumers able to install an unsupported runtime with no manifest warning. Add an engines.node entry here, ideally matching the repo-wide floor if it is already higher. (shiki.style)

#!/bin/bash
set -euo pipefail

echo "== package.json files and engines.node =="
python - <<'PY'
import json, pathlib
for f in sorted(pathlib.Path('.').rglob('package.json')):
    if 'node_modules' in f.parts or 'dist' in f.parts:
        continue
    data = json.loads(f.read_text())
    engine = data.get('engines', {}).get('node', '<none>')
    print(f"{f}: {engine}")
PY

echo
echo "== packages/cli usages of `@shikijs/cli` =="
rg -n -C2 --glob '!**/dist/**' --glob '!**/node_modules/**' '@shikijs/cli|codeToANSI|\bshiki\b|\bskat\b' packages/cli
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/package.json` at line 51, Add an engines.node field to the
packages/cli package.json to declare the Node.js minimum (e.g., ">=20") so
consumers get a manifest warning; update the package.json that lists
"@shikijs/cli" to include an "engines" object with "node" set to the repo-wide
floor (match other package.json files if they already set a higher floor) and
ensure package metadata remains valid for publishing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/cli/package.json`:
- Line 51: Add an engines.node field to the packages/cli package.json to declare
the Node.js minimum (e.g., ">=20") so consumers get a manifest warning; update
the package.json that lists "@shikijs/cli" to include an "engines" object with
"node" set to the repo-wide floor (match other package.json files if they
already set a higher floor) and ensure package metadata remains valid for
publishing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9e259d69-5ebe-4cb6-b4c5-013335bc17a4

📥 Commits

Reviewing files that changed from the base of the PR and between cc5daf1 and f8ad6d6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/cli/package.json

@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch from f8ad6d6 to c9f546e Compare March 10, 2026 12:22
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/package.json`:
- Line 51: The calls to codeToANSI in packages/cli/src/commands/cat.ts must be
awaited because codeToANSI is async in `@shikijs/cli`@4.0.0; update the two spots
that call codeToANSI (the returns that currently call codeToANSI(content,
'python', 'catppuccin-macchiato')) to use await, and ensure the enclosing
function/handler (the command function in cat.ts) is declared async so the
awaits are allowed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 215db1df-a628-4123-8c12-b338dd66b7e1

📥 Commits

Reviewing files that changed from the base of the PR and between f8ad6d6 and c9f546e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/cli/package.json

@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch 2 times, most recently from 902ee7d to b352c10 Compare March 16, 2026 08:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/package.json`:
- Line 51: Add an "engines" field to packages/cli/package.json to match other
packages; specifically, inside the package object for "@shikijs/cli" add
"engines": {"node": ">=22.14.0"} so the CLI package declares the same Node
requirement as the repo root and sibling packages.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 88dc4088-9a3e-4db0-9c91-a170713b9070

📥 Commits

Reviewing files that changed from the base of the PR and between 902ee7d and b352c10.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/cli/package.json

@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch 2 times, most recently from de60375 to afc5e8b Compare March 23, 2026 12:16
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/cli/package.json (1)

51-51: ⚠️ Potential issue | 🟠 Major

Declare Node engine compatibility for this major bump.

@shikijs/cli@^4 drops older Node support. Without a package-level engines.node, this package can be installed on unsupported Node versions and fail later at runtime. Add an engines constraint here aligned with the repo root policy.

#!/bin/bash
set -euo pipefail

echo "== root Node engine policy =="
cat package.json | jq -r '.engines.node // "NO_ROOT_ENGINES_NODE"'

echo
echo "== package-level engines in packages/*/package.json =="
fd '^package\.json$' packages | xargs jq -r '
  . as $p
  | input_filename + " -> " + (.engines.node // "NO_ENGINES_NODE")
'

echo
echo "== confirm updated dependency =="
jq -r '.dependencies["@shikijs/cli"] // "NOT_FOUND"' packages/cli/package.json
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/package.json` at line 51, The package declares the new
dependency "@shikijs/cli": "^4.0.0" which drops older Node versions but
package.json lacks an engines.node constraint; add an "engines": { "node":
"<root's engines.node constraint>" } entry to this package's package.json (use
the same node range as the repo root policy) so installs on unsupported Node
versions are prevented and the package-level engines aligns with the repo root.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/cli/package.json`:
- Line 51: The package declares the new dependency "@shikijs/cli": "^4.0.0"
which drops older Node versions but package.json lacks an engines.node
constraint; add an "engines": { "node": "<root's engines.node constraint>" }
entry to this package's package.json (use the same node range as the repo root
policy) so installs on unsupported Node versions are prevented and the
package-level engines aligns with the repo root.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: eba2df4d-e666-4ce3-9d51-95330eed636e

📥 Commits

Reviewing files that changed from the base of the PR and between de60375 and afc5e8b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/cli/package.json

@renovate renovate bot force-pushed the renovate/major-shiki-monorepo branch from afc5e8b to 01eabb0 Compare March 25, 2026 05:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/cli/package.json`:
- Line 51: The two calls to codeToANSI in the cat command need to be updated
because codeToANSI is now async and returns Promise<string>; change those calls
to return await codeToANSI(...) and make the enclosing function (the cat command
handler function) async so it can use await. Locate the return sites inside the
cat command implementation (where codeToANSI is currently called without await),
add await to those calls and add the async keyword to the containing function
signature, ensuring any callers handle the async result if necessary.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8173a8d2-9c32-4161-9a27-7572720a42d6

📥 Commits

Reviewing files that changed from the base of the PR and between afc5e8b and 01eabb0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/cli/package.json

"@deepnote/runtime-core": "workspace:*",
"@inquirer/prompts": "^8.2.1",
"@shikijs/cli": "^3.21.0",
"@shikijs/cli": "^4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify codeToANSI usage matches v4 API

echo "== Current codeToANSI call sites =="
rg -n -C3 'codeToANSI' packages/cli/src

echo
echo "== Check if `@shikijs/cli` exports codeToANSI =="
# After upgrade, verify the function is still exported
fd -t f 'node_modules/@shikijs/cli' --exec rg -l 'codeToANSI'

Repository: deepnote/deepnote

Length of output: 1350


🌐 Web query:

What is the codeToANSI function signature in @shikijs/cli version 4.0.0?

💡 Result:

The codeToANSI function signature in @shikijs/cli version 4.0.0 is: async function codeToANSI(code: string, lang: BundledLanguage, theme: string): Promise This converts code to ANSI escape codes for terminal syntax highlighting. It is asynchronous and takes three required parameters: the code as a string, the language (BundledLanguage type from Shiki), and the theme name as a string, returning a Promise of the highlighted ANSI string. Usage example: import { codeToANSI } from '@shikijs/cli' const highlighted = await codeToANSI(source, 'typescript', 'nord') console.log(highlighted) Note: BundledLanguage refers to language identifiers supported by Shiki, such as 'typescript' or 'js'.

Citations:


Update codeToANSI calls to use await—function is now async in v4.

The v4.0.0 upgrade introduces a breaking change: codeToANSI is now asynchronous and returns Promise<string>. Current calls at packages/cli/src/commands/cat.ts lines 287 and 290 must be updated to return await codeToANSI(...), and the containing function must be async.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/package.json` at line 51, The two calls to codeToANSI in the cat
command need to be updated because codeToANSI is now async and returns
Promise<string>; change those calls to return await codeToANSI(...) and make the
enclosing function (the cat command handler function) async so it can use await.
Locate the return sites inside the cat command implementation (where codeToANSI
is currently called without await), add await to those calls and add the async
keyword to the containing function signature, ensuring any callers handle the
async result if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants