Conversation
📝 WalkthroughWalkthroughThe pull request updates the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
e0e3681 to
e060582
Compare
1113a67 to
13caff9
Compare
13caff9 to
cc5daf1
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/cli/package.json
cc5daf1 to
f8ad6d6
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/cli/package.json (1)
51-51:⚠️ Potential issue | 🟠 MajorDeclare 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 anengines.nodeentry 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/cli/package.json
f8ad6d6 to
c9f546e
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/cli/package.json
902ee7d to
b352c10
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/cli/package.json
de60375 to
afc5e8b
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/cli/package.json (1)
51-51:⚠️ Potential issue | 🟠 MajorDeclare Node engine compatibility for this major bump.
@shikijs/cli@^4drops older Node support. Without a package-levelengines.node, this package can be installed on unsupported Node versions and fail later at runtime. Add anenginesconstraint 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/cli/package.json
afc5e8b to
01eabb0
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis 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", |
There was a problem hiding this comment.
🧩 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:
- 1: https://shiki.style/packages/cli
- 2: https://registry.npmjs.org/%40shikijs%2Fcli
- 3: https://github.com/shikijs/shiki
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.
This PR contains the following updates:
^3.21.0→^4.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
shikijs/shiki (@shikijs/cli)
v4.0.2Compare Source
🐞 Bug Fixes
View changes on GitHub
v4.0.1Compare Source
🐞 Bug Fixes
View changes on GitHub
v4.0.0Compare Source
🚨 Breaking Changes
🚀 Features
@shikijs/primitivepackage - by @antfu in #1251 (05a77)@shikijs/markdown-exitpackage - by @antfu (d1257)View changes on GitHub
v3.23.0Compare Source
🚀 Features
🐞 Bug Fixes
declaremodifier to top level declarations in.d.ts- by @KazariEX in #1242 (142d5)View changes on GitHub
v3.22.0Compare 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.
This PR was generated by Mend Renovate. View the repository job log.
Summary by CodeRabbit