fix(cli): normalize language/extension casing for CLI inputs#1245
Merged
Conversation
Add proper type declarations for subpath exports in engine packages: - @shikijs/engine-oniguruma: Add types for ./wasm-inlined export - @shikijs/engine-javascript: Add types for ./raw export This fixes TypeScript errors when importing these subpaths. The exports field now properly includes both 'types' and 'default' fields for each subpath, following Node.js package exports best practices.
✅ Deploy Preview for shiki-matsu ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for shiki-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1245 +/- ##
==========================================
+ Coverage 95.20% 95.25% +0.05%
==========================================
Files 92 92
Lines 7922 8008 +86
Branches 1689 1704 +15
==========================================
+ Hits 7542 7628 +86
Misses 374 374
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Please let me know if you’d like any additional changes — I’m happy to update the PR. |
antfu
reviewed
Feb 25, 2026
| "exports": { | ||
| ".": "./dist/index.mjs", | ||
| "./raw": "./dist/engine-raw.mjs" | ||
| ".": { |
Member
There was a problem hiding this comment.
I don't think this change is necessary, even if they do, I think it deserves to be in a separate PR.
antfu
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix case sensitivity in CLI language inference and
--langhandlingSummary
This PR fixes a case-sensitivity edge case in the CLI’s language inference and explicit language selection.
Previously, language detection relied directly on the file extension or the
--langflag as provided. Since Shiki language identifiers are lowercase, inputs such as:FILE.TSREADME.MD--lang PYTHONcould fail to resolve correctly. This issue was especially noticeable on Windows or when working on files shared across systems where uppercase extensions are common.
Changes
langvalue (whether inferred or passed via--lang) to lowercase.--langusageWhy This Matters
Tests
cli.test.ts