Skip to content

feat: let's fork and release#1

Merged
JounQin merged 1 commit into
mainfrom
fork-release
May 22, 2025
Merged

feat: let's fork and release#1
JounQin merged 1 commit into
mainfrom
fork-release

Conversation

@JounQin

@JounQin JounQin commented May 22, 2025

Copy link
Copy Markdown
Member

Important

Introduces automated workflows, migrates to Yarn, updates documentation, and refactors code for improved release management and code quality.

  • New Features:
    • Added automated workflows for release management, publishing, code formatting, linting, and dependency updates in .github/workflows/*.
    • Introduced scripts for Shiki dependency updates and changelog management in scripts/*.
    • Added configuration files for editor settings, code formatting, linting, commit message validation, and package management.
  • Refactor:
    • Migrated from npm to Yarn for dependency management in package.json and updated related scripts and workflows.
    • Updated test and source files for consistent code style and import statements in src/shiki.ts and test/shiki.test.js.
  • Documentation:
    • Updated package and project documentation in README.md to reflect the new package name and repository.
    • Improved changelog formatting with clickable links in CHANGELOG.md.
  • Chores:
    • Cleaned up and replaced old scripts and workflows with new equivalents.
    • Added and updated configuration files for CI/CD and development tooling.
    • Removed obsolete files and reorganized package metadata.

This description was created by Ellipsis for bc5bcc6. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Introduced automated workflows for release management, publishing, code formatting, linting, and dependency updates.
    • Added scripts to automate Shiki dependency updates and changelog management.
    • Added configuration files for editor settings, code formatting, linting, commit message validation, and package management.
  • Bug Fixes

    • None.
  • Documentation

    • Updated package and project documentation to reflect the new package name and repository.
    • Improved changelog formatting with clickable links.
    • Added README files for configuration directories.
  • Refactor

    • Migrated from npm to Yarn for dependency management and updated related scripts and workflows.
    • Updated test and source files for consistent code style and import statements.
  • Chores

    • Cleaned up and replaced old scripts and workflows with new equivalents.
    • Added and updated configuration files for CI/CD and development tooling.
    • Removed obsolete files and reorganized package metadata.

@JounQin JounQin requested a review from Copilot May 22, 2025 04:33
@JounQin JounQin self-assigned this May 22, 2025
@changeset-bot

changeset-bot Bot commented May 22, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bc5bcc6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented May 22, 2025

Copy link
Copy Markdown

Warning

Rate limit exceeded

@JounQin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 10 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 8fdacd0 and bc5bcc6.

⛔ Files ignored due to path filters (6)
  • .yarn/plugins/plugin-prepare-lifecycle.cjs is excluded by !**/.yarn/**
  • .yarn/releases/yarn-4.9.1.cjs is excluded by !**/.yarn/**
  • package-lock.json is excluded by !**/package-lock.json
  • static/mini-shiki-dependency-tree.svg is excluded by !**/*.svg
  • static/shiki-dependency-tree.svg is excluded by !**/*.svg
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (35)
  • .changeset/README.md (1 hunks)
  • .changeset/config.json (1 hunks)
  • .codesandbox/ci.json (1 hunks)
  • .commitlintrc (1 hunks)
  • .editorconfig (1 hunks)
  • .gitattributes (1 hunks)
  • .github/workflows/autofix.yml (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .github/workflows/pkg-pr-new.yml (1 hunks)
  • .github/workflows/publish.yml (0 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/update-shiki.yml (1 hunks)
  • .github/workflows/update_shiki.yml (0 hunks)
  • .gitignore (1 hunks)
  • .nano-staged.js (1 hunks)
  • .prettierignore (1 hunks)
  • .prettierrc (1 hunks)
  • .renovaterc (1 hunks)
  • .simple-git-hooks.js (1 hunks)
  • .yarnrc.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • eslint.config.js (1 hunks)
  • package.json (1 hunks)
  • rollup.config.js (0 hunks)
  • scripts/build.sh (0 hunks)
  • scripts/commit-shiki-update.sh (1 hunks)
  • scripts/commit_shiki_update.sh (0 hunks)
  • scripts/update-shiki.sh (1 hunks)
  • scripts/update_shiki.sh (0 hunks)
  • src/shiki.ts (1 hunks)
  • test/shiki.test.cjs (1 hunks)
  • test/shiki.test.js (1 hunks)
  • tsconfig.json (1 hunks)
  • tsdown.config.ts (1 hunks)

Walkthrough

This update restructures project configuration, automation scripts, and documentation. It renames the package to mini-shiki, migrates from npm to Yarn 4, and introduces new workflows for CI, release, and dependency updating. Several scripts and configuration files are added, updated, or replaced to streamline linting, formatting, version management, and publishing. Documentation and test files are reformatted for consistency.

Changes

Files/Paths Change Summary
.changeset/README.md, .changeset/config.json Added documentation and configuration for Changesets, describing versioning and changelog management setup.
.codesandbox/ci.json Added Codesandbox CI configuration specifying Node.js version 20 and an empty sandboxes array.
.commitlintrc, .editorconfig, .gitattributes Added configuration files for commit linting, editor settings, and Git attributes, enforcing code style and repository rules.
.github/workflows/autofix.yml Added a GitHub Actions workflow for automated linting, formatting, and autofix on pull requests.
.github/workflows/ci.yml Updated CI workflow to use Yarn instead of npm, added concurrency control, and adjusted trigger/event definitions.
.github/workflows/pkg-pr-new.yml Introduced a workflow for publishing any commit, with concurrency and Yarn-based steps.
.github/workflows/publish.yml, .github/workflows/update_shiki.yml Deleted legacy workflows for publishing and Shiki updates, replaced by new workflows.
.github/workflows/release.yml Added a release workflow using Changesets for versioning and publishing on pushes to main.
.github/workflows/update-shiki.yml Added a scheduled and manual workflow to update Shiki dependencies and automate commits.
.nano-staged.js, .simple-git-hooks.js, eslint.config.js Added proxy configuration files re-exporting defaults from external packages for staged linting, git hooks, and ESLint.
.prettierignore, .prettierrc Added Prettier ignore and configuration files, delegating formatting rules to a shared config and ignoring the .yarn directory.
.yarnrc.yml Added Yarn 4 configuration, disabling telemetry, specifying the node-modules linker, plugin setup, and pinning Yarn version.
CHANGELOG.md Updated changelog formatting to use Markdown links for Shiki versions and PR references.
README.md Updated documentation: renamed package to mini-shiki, clarified scope, adjusted usage examples, and improved formatting.
package.json Renamed package, updated repository info, switched to Yarn, expanded scripts, reorganized dependencies, and modernized configuration.
rollup.config.js, src/shiki.ts, test/shiki.test.cjs, test/shiki.test.js Reformatted code: switched to single quotes, improved import/export organization, reordered exports, and made import paths consistent. No logic changes.
scripts/build.sh Adjusted indentation of command options for clarity; logic unchanged.
scripts/commit-shiki-update.sh, scripts/update-shiki.sh Added new scripts to automate Shiki dependency updates, changelog entries, version bumps, and commit/push actions using Yarn.
scripts/commit_shiki_update.sh, scripts/update_shiki.sh Deleted old scripts for Shiki updates and changelog management that used npm and previous workflow conventions.
.gitignore Updated to ignore all files under .yarn except .yarn/releases and .yarn/plugins.
.renovaterc Added Renovate configuration extending a remote preset.
tsconfig.json Simplified by extending a shared base config instead of explicit compiler options.
tsdown.config.ts Added configuration for tsdown specifying entry point, enabling dts generation, and marking external dependencies.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Developer
    participant Yarn
    participant Changesets
    participant NPM Registry

    Developer->>GitHub Actions: Push/PR triggers workflow
    GitHub Actions->>Yarn: Install dependencies (--immutable)
    GitHub Actions->>Yarn: Run lint, format, build, test
    GitHub Actions->>Changesets: Versioning/Changelog (release workflow)
    Changesets->>Yarn: Run version/publish scripts
    Yarn->>NPM Registry: Publish package (if release)
    GitHub Actions->>GitHub Actions: Update Shiki (scheduled/manual)
    GitHub Actions->>Yarn: Update Shiki packages, build, test
    GitHub Actions->>scripts/commit-shiki-update.sh: Commit/push changes if Shiki updated
Loading

Poem

🐇
A hop, a skip, a tidy sweep,
New scripts and configs—no time for sleep!
Yarn now leads the bunny’s run,
Shiki shines, its update done.
Workflows prance in CI fields,
The changelog sparkles, order yields.
With every change, this rabbit grins—
For tidy code, the best of wins!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a fork and release feature by updating the changelog formats, adding Yarn configuration along with plugin support, and defining new GitHub workflows to streamline tasks such as updating Shiki, releasing packages, and running autofix checks.

  • Updated CHANGELOG entries with markdown-formatted links for version updates.
  • Introduced Yarn configuration (.yarnrc.yml, plugin file) and added multiple GitHub workflows replacing legacy ones.
  • Added several project configuration files (Prettier, EditorConfig, Commitlint, Changesets, etc.) to improve consistency and developer experience.

Reviewed Changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CHANGELOG.md Updated version entries to include markdown links for Shiki releases.
.yarnrc.yml & .yarn/plugins/plugin-prepare-lifecycle.cjs Configured Yarn with a custom plugin to execute lifecycle scripts.
.simple-git-hooks.js Re-exported git hooks from the designated package.
.prettierrc, .prettierignore, .nano-staged.js Added standardized configuration for formatting and staging.
.github/workflows/* (update-shiki, release, pkg-pr-new, ci, autofix) Introduced new workflows for update, release, CI, and autofix with improved configuration.
.gitattributes, .editorconfig, .commitlintrc, .codesandbox/ci.json, .changeset/* Added various project and tooling configuration files.

@codesandbox-ci

codesandbox-ci Bot commented May 22, 2025

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@socket-security

socket-security Bot commented May 22, 2025

Copy link
Copy Markdown

@pkg-pr-new

pkg-pr-new Bot commented May 22, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/un-ts/mini-shiki@1

commit: bc5bcc6

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 4eaf049 in 2 minutes and 8 seconds. Click for details.
  • Reviewed 1104 lines of code in 31 files
  • Skipped 6 files when reviewing.
  • Skipped posting 7 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. scripts/commit-shiki-update.sh:11
  • Draft comment:
    Using 'npm version' here is inconsistent with the Yarn-based workflow. Consider using Yarn's versioning command for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The presence of package-lock.json suggests this is actually an npm project, not a Yarn project. The reviewer hasn't provided evidence that this is a Yarn-based workflow. Without seeing the rest of the codebase, we can't verify if this is truly inconsistent. The comment is speculative without strong evidence. I could be wrong about the project setup - there could be both package-lock.json and yarn.lock files. Some projects use both package managers. Even if both package managers are used, without clear evidence that Yarn is the primary tool, suggesting this change could introduce inconsistency rather than fix it. Delete the comment as it makes assumptions about the project's package manager setup without strong evidence that Yarn is the preferred tool.
2. scripts/commit-shiki-update.sh:35
  • Draft comment:
    The script adds 'package-lock.json', but this project uses Yarn. Replace it with 'yarn.lock' to ensure the correct lockfile is updated.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The script explicitly uses npm commands (npm version) which suggests it's intentionally using npm, not yarn. The comment makes an assumption about yarn being used but provides no evidence. The script is internally consistent in using npm tooling. Even if the project uses yarn elsewhere, this script may intentionally use npm for this specific task. I could be wrong about the project's package manager - there could be a yarn.lock file in the root that I can't see. The npm usage here could be a mistake. Even if the project uses yarn elsewhere, this script deliberately uses npm commands, so package-lock.json is the correct file to commit. The internal consistency matters more than external conventions here. Delete the comment. The script intentionally uses npm commands, so package-lock.json is the correct file to commit. The comment makes assumptions without evidence.
3. src/shiki.ts:31
  • Draft comment:
    Consider awaiting the result of readFile before passing it to loadWasm (e.g. use 'await readFile(...)') to ensure the WASM binary is fully loaded.
  • Reason this comment was not posted:
    Comment was on unchanged code.
4. CHANGELOG.md:21
  • Draft comment:
    Typo detected: The header for v3.2.3 (2025-04-11) suggests the update should refer to v3.2.3, but the update text reads v3.2.2. Please confirm and correct the version number.
  • Reason this comment was not posted:
    Comment was on unchanged code.
5. CHANGELOG.md:97
  • Draft comment:
    In the entry for v1.24.4 (2024-12-13), the header indicates version 1.24.4 but the update text references v1.24.2. This version mismatch needs to be fixed.
  • Reason this comment was not posted:
    Comment was on unchanged code.
6. CHANGELOG.md:101
  • Draft comment:
    For the v1.24.3 (2024-12-11) entry, the update text shows v1.24.2 which doesn’t match the header version. Please update the version in the update text.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking for an update to the text to match a version header. It seems to be a request for consistency in documentation or changelog entries, which is not related to code functionality or testing. It doesn't provide a specific code suggestion or ask for a test to be written. Therefore, it seems to violate the rule against asking for updates to descriptions or documentation.
7. CHANGELOG.md:105
  • Draft comment:
    The entry for v1.24.2 (2024-12-10) has an update text referring to v1.24.1, which appears to be a mistake. Please verify and correct the version number.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_0IwzKT8GouIpb3ua

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed 694ce8f in 1 minute and 52 seconds. Click for details.
  • Reviewed 1100 lines of code in 31 files
  • Skipped 3 files when reviewing.
  • Skipped posting 8 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/ci.yml:4
  • Draft comment:
    Verify that disabling push and pull_request events (set to null) is intentional.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm their intention regarding disabling certain events. This falls under the rule of not asking the author to confirm their intention or ensure behavior is intended. Therefore, this comment should be removed.
2. scripts/commit-shiki-update.sh:7
  • Draft comment:
    Consider deriving the version from the package.json 'version' field instead of from devDependencies.shiki.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. scripts/commit-shiki-update.sh:23
  • Draft comment:
    Review the AWK script for changelog updates; ensure proper escaping and compatibility across environments.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure compatibility and proper escaping, which falls under the rule of not asking the author to ensure behavior or compatibility. It doesn't provide a specific suggestion or point out a specific issue.
4. package.json:55
  • Draft comment:
    Confirm if 'shiki' should be in devDependencies rather than dependencies, given it's re-exported by this package.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. src/shiki.ts:31
  • Draft comment:
    Consider using path.join(__dirname, 'onig.wasm') for improved cross-platform path handling.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. CHANGELOG.md:21
  • Draft comment:
    Typographical error: The header for v3.2.3 (line 19) indicates version 3.2.3, but the update message on this line refers to v3.2.2. Please verify the correct version number.
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. CHANGELOG.md:97
  • Draft comment:
    Typographical error: The release note header for v1.24.4 (line 95) does not match the update message here which links to v1.24.2. Please check and correct if needed.
  • Reason this comment was not posted:
    Comment was on unchanged code.
8. CHANGELOG.md:101
  • Draft comment:
    Typographical error: The release note header for v1.24.3 (line 99) does not match the update message here which links to v1.24.2. Please confirm the intended version.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_QcQyHSXZu8CQTeuy

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread CHANGELOG.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (15)
README.md (2)

6-7: Clarify the unscoped package note
The new [!NOTE] callout is helpful, but consider adding a brief summary of why unscoping was necessary (e.g., license, dependency reasons) to give readers more immediate context.


46-46: Note ESM and top-level await requirements
You invoke await loadBuiltinWasm() at top level—ensure your README clearly states the minimum Node.js version and "type": "module" requirement for this to work.

scripts/update-shiki.sh (1)

8-13: Enhance logging and error context
Consider adding echo statements before each major step (install, build, test) to improve observability in CI logs. For example:

+ echo "🛠 Updating Shiki dependencies..."
  yarn add shiki@latest … 
+ echo "🔧 Building project..."
  yarn build
+ echo "✅ Running tests..."
  yarn test
.github/workflows/pkg-pr-new.yml (1)

20-21: Use tagged action versions instead of SHAs
For easier maintenance, prefer specifying action versions (e.g., actions/checkout@v4) rather than a commit SHA. This simplifies upgrades and enhances readability.

src/shiki.ts (1)

30-32: Path resolution in loadBuiltinWasm is correct, but consider using path.join for cross-platform safety:

- const __dirname = path.dirname(fileURLToPath(import.meta.url))
- await loadWasm(readFile(__dirname + '/onig.wasm'))
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
+ await loadWasm(readFile(path.join(__dirname, 'onig.wasm')))
.github/workflows/autofix.yml (1)

21-23: Checkout action is pinned by commit SHA.
For reproducibility, you might want to standardize across workflows (SHA vs tag).

scripts/commit-shiki-update.sh (4)

1-3: Use a portable shebang & stricter error handling.

Switch to a more portable interpreter path and enable stricter flags to catch unset variables and pipeline failures:

- #!/bin/bash
+ #!/usr/bin/env bash
+ set -euo pipefail

7-7: Guard against missing devDependencies.shiki.

Accessing require('./package.json').devDependencies.shiki will fail if the field is absent. Consider validating its presence before stripping non-numeric characters:

if ! jq -e '.devDependencies.shiki' package.json >/dev/null; then
  echo "Error: shiki not declared in devDependencies" >&2
  exit 1
fi
shiki_version=$(jq -r '.devDependencies.shiki' package.json | sed 's/[^0-9.]/ /g')

8-8: Quote the substitution to prevent word-splitting.

ShellCheck SC2046 warns that the unquoted command substitution may split fields unexpectedly. Update to:

-read major minor patch <<< $(tr . " " <<< "$shiki_version")
+read major minor patch <<< "$(tr . " " <<< "$shiki_version")"
🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 8-8: Quote this to prevent word splitting.

(SC2046)


16-21: Simplify changelog insertion.

Embedding a multiline awk script via shell quoting is fragile. Consider a heredoc + sed approach for readability:

extra="\
## $version ($(date '+%Y-%m-%d'))\
\
- Update to Shiki [v$shiki_version](https://github.com/shikijs/shiki/releases/tag/v$shiki_version)\
"

# Insert after "# Changelog"
sed -i.bak "/^# Changelog/a\\
$extra
" CHANGELOG.md && rm CHANGELOG.md.bak
package.json (5)

2-3: Verify initial package version aligns with semantic versioning.

You've set "version": "3.4.2" to match Shiki’s major. Ensure this is intentional as a first release, and document your versioning strategy (e.g., via changesets) in CONTRIBUTING.md to avoid confusion on future bumps.


14-17: Offer CJS export fallback for broader compatibility.

Currently you expose ESM-only entries. If you need to support CommonJS consumers, consider adding a CJS fallback under exports—or document that only ESM is supported.


27-27: Avoid masking errors in prepare script.

Appending || exit 0 will hide failures from simple-git-hooks or yarn-berry-deduplicate. Removing it surfaces misconfigurations early:

- "prepare": "simple-git-hooks && yarn-berry-deduplicate || exit 0",
+ "prepare": "simple-git-hooks && yarn-berry-deduplicate",

29-29: Update Node test runner flags.

--experimental-require-module is deprecated in recent Node.js versions. If you’re testing ESM, consider using:

"test": "node --loader ts-node/esm --test"

or rely on file extensions (.test.mjs)—this future-proofs your suite.


32-37: Runtime dependency grouping.

You’ve added several @shikijs packages under dependencies and shiki under devDependencies. If shiki is used in your library’s API surface, it belongs in dependencies. Otherwise remove it entirely.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a7187e and 694ce8f.

⛔ Files ignored due to path filters (6)
  • .yarn/plugins/plugin-prepare-lifecycle.cjs is excluded by !**/.yarn/**
  • .yarn/releases/yarn-4.9.1.cjs is excluded by !**/.yarn/**
  • package-lock.json is excluded by !**/package-lock.json
  • static/mini-shiki-dependency-tree.svg is excluded by !**/*.svg
  • static/shiki-dependency-tree.svg is excluded by !**/*.svg
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (31)
  • .changeset/README.md (1 hunks)
  • .changeset/config.json (1 hunks)
  • .codesandbox/ci.json (1 hunks)
  • .commitlintrc (1 hunks)
  • .editorconfig (1 hunks)
  • .gitattributes (1 hunks)
  • .github/workflows/autofix.yml (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .github/workflows/pkg-pr-new.yml (1 hunks)
  • .github/workflows/publish.yml (0 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/update-shiki.yml (1 hunks)
  • .github/workflows/update_shiki.yml (0 hunks)
  • .nano-staged.js (1 hunks)
  • .prettierignore (1 hunks)
  • .prettierrc (1 hunks)
  • .simple-git-hooks.js (1 hunks)
  • .yarnrc.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • eslint.config.js (1 hunks)
  • package.json (1 hunks)
  • rollup.config.js (1 hunks)
  • scripts/build.sh (1 hunks)
  • scripts/commit-shiki-update.sh (1 hunks)
  • scripts/commit_shiki_update.sh (0 hunks)
  • scripts/update-shiki.sh (1 hunks)
  • scripts/update_shiki.sh (0 hunks)
  • src/shiki.ts (1 hunks)
  • test/shiki.test.cjs (1 hunks)
  • test/shiki.test.js (1 hunks)
💤 Files with no reviewable changes (4)
  • scripts/update_shiki.sh
  • .github/workflows/update_shiki.yml
  • scripts/commit_shiki_update.sh
  • .github/workflows/publish.yml
🧰 Additional context used
🧬 Code Graph Analysis (1)
test/shiki.test.js (1)
src/shiki.ts (6)
  • loadBuiltinWasm (29-32)
  • createShikiInternal (8-8)
  • createOnigurumaEngine (38-42)
  • bundledLanguages (22-22)
  • bundledThemes (25-25)
  • codeToTokensWithThemes (8-8)
🪛 GitHub Check: autofix
test/shiki.test.js

[failure] 13-13:
Unable to resolve path to module 'mini-shiki'

🪛 GitHub Actions: autofix.ci
test/shiki.test.js

[error] 13-13: ESLint: Unable to resolve path to module 'mini-shiki' (import-x/no-unresolved)

🪛 Shellcheck (0.10.0)
scripts/commit-shiki-update.sh

[warning] 8-8: Quote this to prevent word splitting.

(SC2046)

🔇 Additional comments (58)
.changeset/config.json (2)

1-16: Validate repository setting in Changesets config
Please verify that the "repo" field ("un-ts/mini-shiki") matches your actual GitHub owner/org and repository name. If the project is under a different namespace (e.g., JounQin/mini-shiki), update this value so changelog links generate correctly.


1-16: Configuration for Changesets is correctly set up
The JSON defines the schema URL, GitHub changelog generator, disables automatic commits, and configures public package access on the main branch, which aligns with the intended release workflow.

.changeset/README.md (1)

1-8: Clear introduction to Changesets CLI
The README provides concise context and links to official documentation and common questions. This will help contributors understand and adopt the @changesets/cli workflow quickly.

.prettierignore (1)

1-1: Ignore Yarn directory in Prettier
Adding .yarn ensures that Yarn’s cache and plugins aren’t formatted, preventing unnecessary diffs after migration.

.commitlintrc (1)

1-3: Extend shared commitlint configuration
Extending @1stg enforces consistent commit message rules across the organization. No custom overrides are needed at this stage.

.codesandbox/ci.json (1)

1-4: Configure CodeSandbox CI environment
Specifying Node.js "20" aligns with the project’s runtime. If you plan to define reusable sandbox environments, populate the "sandboxes" array accordingly.

.prettierrc (1)

1-1: Approve shareable Prettier config reference
The single-string configuration correctly instructs Prettier to load the shared @1stg/prettier-config.

.nano-staged.js (1)

1-1: Approve proxy re-export for nano-staged
Re-exporting the default from @1stg/nano-staged centralizes staged file tooling without additional overhead.

.simple-git-hooks.js (1)

1-1: Approve simple-git-hooks proxy export
This file cleanly forwards the default export from @1stg/simple-git-hooks, aligning with the project’s hook management setup.

eslint.config.js (1)

1-1: Approve ESLint config proxy export
Re-exporting @1stg/eslint-config here ensures a single source of truth for linting rules across the repo.

.yarnrc.yml (1)

1-11: Yarn configuration looks solid
Disabling telemetry, using the node-modules linker, pinning the lifecycle plugin with checksum, and fixing yarnPath to 4.9.1 all align with the migration to Yarn 4.

.gitattributes (1)

1-5: Enforce consistent EOL normalization and vendoring
This .gitattributes correctly sets LF line endings for all text files, designates the .yarn directory as vendored to exclude it from language stats, marks releases and plugins as binary to avoid diffs, and omits yarn.lock diffs to reduce noise.

rollup.config.js (1)

1-3: Purely stylistic update: switch to single quotes
All string literals (imports, input/output config, external entries) have been converted from double to single quotes in line with the project's Prettier/EditorConfig rules. No functional behavior has changed.

Also applies to: 6-10, 13-15, 21-22

scripts/build.sh (1)

11-13: Align indentation for dts-bundle-generator options
Reducing the indent from four to two spaces for the generator flags improves readability and consistency without altering the build logic.

.editorconfig (1)

1-10: Introduce EditorConfig for uniform coding style
The settings (2-space indent, LF endings, UTF-8 charset, trimming whitespace, final newline) establish a solid baseline for cross-editor consistency.

CHANGELOG.md (1)

5-121: Convert version and PR references to Markdown links
All Shiki version entries and the PR reference have been updated to clickable hyperlinks, enhancing navigability. The content remains unchanged, and formatting is consistent across entries.

README.md (2)

43-44: Update import to reflect package rename
The code example now correctly imports from 'mini-shiki'. Please verify that this aligns with your published package entry point (e.g., exports in package.json).


49-52: Consistency of code snippet styling
The snippet uses trailing commas and single quotes consistently, which matches your Prettier config. Verify these examples render correctly in both dark and light modes on GitHub.

Also applies to: 54-56

test/shiki.test.cjs (2)

4-6: Verify CommonJS module resolution
Requiring 'mini-shiki' in CJS tests may fail under Yarn PnP or if exports mappings aren’t configured for CJS. Please confirm your test runner is set up to resolve the unscoped package in a CJS context.

Also applies to: 14-14


16-42: LGTM: CJS test logic and style
The structure, assertions, and formatting conform to the new project conventions and correctly validate highlighting behavior.

test/shiki.test.js (3)

3-6: Verify ESM import resolution
Importing from 'mini-shiki' in an ESM test requires your package.json to declare "type": "module" or proper exports mapping. Ensure your test runner can locate the module under these settings.


15-15: Ensure top-level await support
Using await loadBuiltinWasm() at the module top level depends on Node.js v14+ with "type": "module". Double-check compatibility with your CI environment.


17-41: LGTM: ESM test logic and formatting
The test remains functionally identical and follows the new style rules (single quotes, no semicolons).

.github/workflows/update-shiki.yml (7)

3-7: Triggers configuration looks solid.
The schedule and workflow_dispatch triggers correctly enable daily updates and manual runs.


8-11: Concurrency control is well-defined.
Grouping by workflow and ref with cancel-in-progress helps avoid overlapping updates.


17-21: Repository checkout step is correctly configured.
Using fetch-depth: 0 ensures full Git history is available for commit operations.


22-26: Node.js setup is appropriate.
Pinning to the latest LTS via lts/* is a good practice to keep the environment up-to-date.


27-29: Dependencies installation is streamlined.
yarn --immutable ensures installs are deterministic under Yarn 4.


30-32: Shiki update execution looks correct.
Invoking the scripts/update-shiki.sh aligns with the updated package management.


33-37: Commit and push step is properly set.
Git is configured with the GitHub Actions bot identity, and the commit script is executed.

.github/workflows/release.yml (7)

3-7: Push trigger is scoped to main.
This ensures releases only occur on the protected branch.


8-11: Concurrency settings match other workflows.
Preventing multiple simultaneous releases is critical for package version consistency.


12-16: Permissions are correctly scoped.
Granting minimal write privileges for contents, ID tokens, and PRs follows the principle of least privilege.


22-26: Repository checkout is correctly pinned.
Using fetch-depth: 0 with the specific commit SHA (v4.2.2) provides reproducibility.


27-31: Node.js setup version pinning is consistent.
Locking to a known setup-node version ensures deterministic environment behavior.


32-34: Dependency installation step is deterministic.
yarn --immutable enforces the lockfile to be honored.


35-45: Changesets action is configured correctly.
The commit/title, publish, and version commands align with the new Yarn scripts, and the required tokens are set.

src/shiki.ts (5)

1-7: Import statements are clean and grouped.
Using Node.js built-in node: specifiers and consolidating imports improves readability.


8-19: Exported types and values are organized.
Separating type-only exports from runtime exports aids tree-shaking and clarity.


20-27: Consolidated re-exports from shiki look good.
Ensuring types and values are clearly distinguished is best practice.


34-36: Wrapper for onig.loadWasm is straightforward.
This passthrough maintains a clean public API.


38-42: Engine creation function is well-defined.
Exposing createOnigurumaEngine directly from the onig package keeps the interface simple.

.github/workflows/autofix.yml (9)

1-2: Workflow naming is required and correct.
The name autofix.ci matches the action’s security constraints.


3-9: Pull request triggers cover all relevant events.
opened, reopened, and synchronize ensure lint/format fixes run on updates.


10-13: Concurrency control aligns with other workflows.
This prevents overlapping autofix runs on the same branch.


14-16: Write permissions are appropriately scoped.
Only repository contents need write access for autofix commits.


24-29: Node.js setup is correctly cached for Yarn.
Ensure cache: yarn is supported in the pinned setup-node version.


30-32: Immutable install step ensures consistency.
yarn --immutable matches other workflows.


33-35: Lint fixing step configured as expected.
Automatically correcting lint errors helps maintain code quality.


36-38: Formatting step aligns with project standards.
Running yarn format enforces consistent styling.


39-42: Autofix action usage is correct.
fail-fast: false is prudent to surface all fixable issues in one run.

.github/workflows/ci.yml (6)

13-16: Concurrency settings are consistent.
Grouping by workflow and ref with cancellation prevents overlapping runs.


22-23: Checkout step is correctly configured.
Using actions/checkout@v4 aligns with other workflows.


25-29: Node.js LTS setup is consistent.
Pinning to lts/* ensures the environment uses the latest LTS version.


30-32: Dependency install step is deterministic.
yarn --immutable enforces lockfile consistency.


33-35: Build step is correctly executed.
yarn build is the expected command for this project.


36-38: Test step is configured properly.
Running yarn test will validate the codebase.

package.json (1)

8-8: Lockfile manager version declared.

The "packageManager": "yarn@4.9.1" field is correctly pinned. Make sure your CI workflow installs with yarn set version to honor this setting.

Comment thread scripts/update-shiki.sh
Comment thread .github/workflows/pkg-pr-new.yml
Comment thread .github/workflows/ci.yml
Comment thread scripts/commit-shiki-update.sh
Comment thread package.json

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed e3f24a1 in 2 minutes and 8 seconds. Click for details.
  • Reviewed 1121 lines of code in 33 files
  • Skipped 4 files when reviewing.
  • Skipped posting 11 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/autofix.yml:22
  • Draft comment:
    Consider using stable version tags instead of pinned commit hashes for actions (e.g. actions/checkout).
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. .github/workflows/ci.yml:4
  • Draft comment:
    Verify that setting 'push' and 'pull_request' to null is intentional to restrict triggers.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. package.json:29
  • Draft comment:
    The test script uses '--experimental-require-module'; ensure this flag is required and supported in your target Node versions.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
4. scripts/commit-shiki-update.sh:23
  • Draft comment:
    The inline AWK command for updating the changelog is complex; consider refactoring or adding comments for clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The AWK script is relatively straightforward for anyone familiar with AWK - it sets a flag when it finds the changelog header, prints the new version info, and prints all lines. While comments could help, the code is not overly complex for its purpose. The suggestion to "refactor" is vague - there's no clear better alternative proposed. The AWK script could be confusing to developers not familiar with AWK syntax. The lack of comments might make maintenance harder. While true, this is a fairly standard AWK pattern for file modification, and the surrounding bash script context makes its purpose clear. The suggestion isn't specific enough to be actionable. Delete this comment as it doesn't provide specific enough guidance to be actionable, and the code is reasonably clear for its purpose.
5. src/shiki.ts:33
  • Draft comment:
    Re-exporting 'loadWasm' along with 'createOnigurumaEngine' may be redundant given its use in loadBuiltinWasm; confirm the intended API surface.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
6. test/shiki.test.cjs:17
  • Draft comment:
    Top-level await in a CommonJS (.cjs) file may require experimental flags; ensure your CI/Node environment supports this usage.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is informative and suggests ensuring compatibility with the CI/Node environment, which violates the rule against asking the PR author to ensure behavior is intended or tested. It doesn't provide a specific code suggestion or ask for a specific test to be written.
7. .yarnrc.yml:8
  • Draft comment:
    Typo alert: In the spec URL, the GitHub organization is referenced as 'un-es'. Given the repository owner is 'un-ts', please verify if this is a typo or intentional.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This is a dependency/package management configuration. The rules explicitly state not to comment on dependency changes or anything related to dependencies. Even if there might be a typo, we should trust that the author knows which package they want to use. Additionally, 'un-es' could be a valid organization name - we don't have enough context to be certain this is wrong. What if this really is a typo that could cause issues with package installation? What if the package won't be found at this URL? Even if it is a typo, dependency issues would be caught immediately during package installation. The rules clearly state not to comment on dependency-related matters. Delete this comment as it violates the rule about not commenting on dependency changes or library-related matters.
8. CHANGELOG.md:21
  • Draft comment:
    Typo: The heading specifies version v3.2.3 but the update text references v3.2.2. Please correct the version number for consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.
9. CHANGELOG.md:97
  • Draft comment:
    Typo: The heading is for v1.24.4 (2024-12-13) but the update text references v1.24.2. Please update the version number to match the heading.
  • Reason this comment was not posted:
    Comment was on unchanged code.
10. CHANGELOG.md:101
  • Draft comment:
    Typo: The heading shows v1.24.3 (2024-12-11) but the update text references v1.24.2. Kindly verify and correct the version number.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment points out a real inconsistency in version numbering. However, this inconsistency existed before the PR and wasn't introduced by these changes. The PR is only adding links to version numbers, not modifying the version numbers themselves. Per the rules, we should only comment on issues introduced by the changes. The version mismatch could be confusing for users and should probably be fixed at some point. Maybe this PR is a good opportunity to fix it? While the version mismatch is a real issue, this PR is focused specifically on adding links to version numbers. Fixing version number inconsistencies would be out of scope and should be handled in a separate PR. Delete the comment since it points out a pre-existing issue not introduced by this PR's changes.
11. CHANGELOG.md:105
  • Draft comment:
    Typo: The heading specifies v1.24.2 (2024-12-10) but the update text mentions v1.24.1. Please fix the version reference for consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_ePvubN7bzjfFhVqN

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread .github/workflows/update-shiki.yml Fixed

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed 28f55c2 in 2 minutes and 16 seconds. Click for details.
  • Reviewed 1121 lines of code in 33 files
  • Skipped 5 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/autofix.yml:22
  • Draft comment:
    Consider using consistent version pinning for GitHub Actions (using semver tags rather than commit hashes) across workflows for easier maintenance.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. CHANGELOG.md:21
  • Draft comment:
    Typographical error: The changelog entry for version v3.2.3 (2025-04-11) incorrectly mentions 'v3.2.2' in the update text. Please update the version number in the text to match the header (v3.2.3).
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. CHANGELOG.md:97
  • Draft comment:
    Typographical error: The changelog entry for version v1.24.4 (2024-12-13) incorrectly mentions 'v1.24.2' in the update text. It should be updated to 'v1.24.4'.
  • Reason this comment was not posted:
    Comment was on unchanged code.
4. CHANGELOG.md:101
  • Draft comment:
    Typographical error: The changelog entry for version v1.24.3 (2024-12-11) incorrectly mentions 'v1.24.2' in the update text. It should be updated to 'v1.24.3'.
  • Reason this comment was not posted:
    Comment was on unchanged code.
5. CHANGELOG.md:105
  • Draft comment:
    Typographical error: The changelog entry for version v1.24.2 (2024-12-10) incorrectly mentions 'v1.24.1' in the update text. It should be updated to 'v1.24.2'.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_1jbCnXYyrmzfQzbn

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread scripts/commit-shiki-update.sh
@JounQin JounQin requested a review from Copilot May 22, 2025 05:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR forks the project and transitions from npm to Yarn, adds new automated workflows, and introduces standardized configurations for tooling and formatting.

  • Migrate package management from npm to Yarn v4 (.yarnrc.yml, yarnPath, workflows updates)
  • Add and refactor GitHub Actions workflows for releases, dependency updates, formatting/linting, and CI (.github/workflows/*)
  • Introduce shared configs for Prettier, Renovate, commit linting, and editor/editorconfig settings

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.yarnrc.yml Configure Yarn v4 (node linker, telemetry, custom plugin path)
.yarn/plugins/plugin-prepare-lifecycle.cjs Add prepare hook to run yarn prepare after install
.renovaterc Extend shared Renovate config
.prettierrc Point to shared Prettier config
.github/workflows/update-shiki.yml New workflow to auto-update Shiki dependency
.github/workflows/release.yml New workflow for automated releases via Changesets
.github/workflows/ci.yml CI workflow converted from npm to Yarn
Comments suppressed due to low confidence (4)

.renovaterc:3

  • Repository names are case-sensitive; use 1stg (lowercase) if that matches the actual GitHub org/repo name to avoid resolution errors.
    "github>1stG/configs"

.github/workflows/ci.yml:22

  • [nitpick] Step names vary between workflows (Checkout Repo vs Checkout repository). Standardize naming for consistency across CI files.
-      - name: Checkout Repo

.yarn/plugins/plugin-prepare-lifecycle.cjs:1

  • [nitpick] The factory parameter e is ambiguous. Rename it to require or loader to clarify its purpose when importing modules.
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};

.prettierrc:1

  • .prettierrc should be a valid JSON or YAML object. Consider using { "extends": "@1stg/prettier-config" } so Prettier can parse the config correctly.
"@1stg/prettier-config"

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed 8fdacd0 in 2 minutes and 38 seconds. Click for details.
  • Reviewed 1122 lines of code in 33 files
  • Skipped 5 files when reviewing.
  • Skipped posting 32 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .changeset/README.md:1
  • Draft comment:
    Auto-generated changesets README looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. .codesandbox/ci.json:1
  • Draft comment:
    CI configuration appears valid.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. .commitlintrc:1
  • Draft comment:
    Commitlint config extends '@1stG'. Ensure these rules match your project's commit conventions.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. .editorconfig:1
  • Draft comment:
    Standard .editorconfig settings; looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. .gitattributes:1
  • Draft comment:
    Gitattributes settings are standard. Verify vendored and binary file paths if needed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. .github/workflows/autofix.yml:1
  • Draft comment:
    Autofix workflow is properly configured. Consider reviewing pinned commit hashes periodically for updates.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
7. .github/workflows/ci.yml:1
  • Draft comment:
    CI workflow using yarn and LTS Node looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
8. .github/workflows/pkg-pr-new.yml:1
  • Draft comment:
    Workflow 'Publish Any Commit' is set up; ensure the 'pkg-pr-new' action is maintained for security and compatibility.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
9. .github/workflows/release.yml:1
  • Draft comment:
    Release workflow appears correct; verify that the release and version commands align with your versioning strategy.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
10. .github/workflows/update-shiki.yml:1
  • Draft comment:
    Update Shiki workflow is scheduled correctly; ensure the script paths and permissions remain valid.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
11. .nano-staged.js:1
  • Draft comment:
    Nano-staged export looks correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
12. .prettierignore:1
  • Draft comment:
    Prettier ignore file is minimal and correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
13. .prettierrc:1
  • Draft comment:
    Prettier config referencing '@1stg/prettier-config' is acceptable.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
14. .renovaterc:1
  • Draft comment:
    Renovate config looks good; ensure any project-specific rules are added if necessary.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
15. .simple-git-hooks.js:1
  • Draft comment:
    Simple Git hooks export is correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
16. .yarn/plugins/plugin-prepare-lifecycle.cjs:1
  • Draft comment:
    Plugin prepare lifecycle configuration is concise; validate its behavior in your environment.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
17. .yarnrc.yml:1
  • Draft comment:
    Yarn configuration appears correct, with appropriate nodeLinker and plugin settings.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
18. CHANGELOG.md:19
  • Draft comment:
    Changelog version mismatch: the v3.2.3 header references an update to Shiki v3.2.2. Please verify version consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.
19. README.md:1
  • Draft comment:
    README updated with usage examples and package info; it clearly explains the re-bundled version and reference to the original scoped package.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
20. eslint.config.js:1
  • Draft comment:
    ESLint config re-export from '@1stg/eslint-config' looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
21. package.json:1
  • Draft comment:
    package.json reflects the migration to Yarn and the new package name. Verify that dependency versions and scripts align with your release workflows.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
22. scripts/commit-shiki-update.sh:5
  • Draft comment:
    The commit script for updating Shiki is well-structured but review the awk quoting for portability across shells.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The script is explicitly a bash script, so bash-specific quoting is acceptable. The $" syntax, while bash-specific, is working as intended to allow variable interpolation. The comment doesn't specify what portability issues exist or how to fix them. Making it more portable would likely make it more complex for no clear benefit. The comment could be pointing out legitimate portability concerns that would matter if this script needs to run on minimal POSIX shells. Some systems may use /bin/sh instead of bash. The script explicitly requires bash via shebang, so POSIX compatibility isn't a requirement. The current quoting works correctly for the intended use case. Delete the comment. The quoting is intentionally bash-specific, works as intended, and the comment doesn't provide actionable suggestions for improvement.
23. scripts/update-shiki.sh:1
  • Draft comment:
    The update-shiki.sh script effectively updates dependencies and runs tests. Consider adding extra error handling if dependency updates fail.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
24. src/shiki.ts:1
  • Draft comment:
    Module re-exports and the loadBuiltinWasm implementation are clear. The double export of createOnigurumaEngine and loadWasm appears intentional.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
25. test/shiki.test.cjs:1
  • Draft comment:
    CommonJS test correctly uses 'mini-shiki' and asserts token outputs.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
26. test/shiki.test.js:1
  • Draft comment:
    ESM test validates highlighting functionality; structure and assertions are clear.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
27. tsdown.config.ts:1
  • Draft comment:
    tsdown configuration for generating type definitions is appropriate.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
28. CHANGELOG.md:97
  • Draft comment:
    Typographical error: In the v1.24.4 section (header on line 95), the update text references version v1.24.2 instead of v1.24.4. Please update the version number to match the header.
  • Reason this comment was not posted:
    Comment was on unchanged code.
29. CHANGELOG.md:101
  • Draft comment:
    Typographical error: In the v1.24.3 section (header on line 99), the update text references version v1.24.2 instead of v1.24.3. Please update the version number accordingly.
  • Reason this comment was not posted:
    Comment was on unchanged code.
30. CHANGELOG.md:105
  • Draft comment:
    Typographical error: In the v1.24.2 section (header on line 103), the update text references version v1.24.1 instead of v1.24.2. Please correct this discrepancy.
  • Reason this comment was not posted:
    Comment was on unchanged code.
31. scripts/commit-shiki-update.sh:16
  • Draft comment:
    Typographical note: The extra variable is defined with $" which may be unintentional. If the intent is to enable escape sequences, consider using the $'...' syntax instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% In Bash, both $" and $'...' can be used for string literals with escape sequences. $" is less common but still valid. The code is working as intended - it's successfully creating multiline strings with proper escaping. This seems more like a style preference than a real issue. The comment doesn't point out any actual problem or bug. The $'...' syntax might be more widely recognized and could be considered more idiomatic Bash. There could be subtle differences in how escape sequences are handled between the two syntaxes. While $'...' might be more common, the current code is working correctly and the difference is purely stylistic. The escape sequences (\n) are being interpreted properly with the current syntax. This comment should be deleted as it's suggesting a style change without demonstrating any actual problems with the current code.
32. scripts/commit-shiki-update.sh:23
  • Draft comment:
    Typographical note: The awk command starts with $" to begin a string literal. This usage might be a typo; if you intended to allow escape sequences within the string, using $'...' could be more appropriate.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The $" syntax is actually working as intended here - it's being used to allow variable expansion in the awk script. While $'...' is typically used for escape sequences, that's not what's needed here. The code is functional as written. The comment is suggesting a change that isn't necessary and might actually break the intended functionality. Could there be a subtle shell compatibility issue that makes $'...' genuinely better? Could this syntax cause problems on some systems? The code is working as intended - $" allows for variable expansion which is exactly what's needed here for $extra. The syntax is valid and common in bash scripts. Delete this comment. The suggested change is not an improvement and the current code is working correctly for its purpose.

Workflow ID: wflow_eyqc4xOWYwbQFX2C

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread CHANGELOG.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
scripts/commit-shiki-update.sh (3)

23-32: Simplify AWK invocation and pass extra as a variable
Embedding the entire extra text inside the AWK script with interpolation is brittle. Instead, pass extra via -v and use a concise AWK script:

-  awk $"
-        modif {
-            printf(\"$extra\")
-            modif = 0
-        }
-        /^# Changelog/ && !modif {
-            modif = 1
-        }
-        {print}
-    " CHANGELOG.md > CHANGELOG2.md
+  awk -v extra="$extra" '
+    /^# Changelog/ && !modif {
+      print extra
+      modif = 1
+      next
+    }
+    { print }
+  ' CHANGELOG.md > CHANGELOG2.md

35-37: Align commit message with the actual bumped version
The commit message uses v$shiki_version, which omits any patch-level bump from the loop. Use the version variable to reflect the post-incremented value:

-  git commit -m "[github-actions] Update Shiki to v$shiki_version"
+  git commit -m "[github-actions] Update Shiki to $version"

1-1: Use env-style shebang for portability
Consider using #!/usr/bin/env bash to ensure the script runs with the user’s bash in PATH:

-#!/bin/bash
+#!/usr/bin/env bash
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 694ce8f and 8fdacd0.

⛔ Files ignored due to path filters (6)
  • .yarn/plugins/plugin-prepare-lifecycle.cjs is excluded by !**/.yarn/**
  • .yarn/releases/yarn-4.9.1.cjs is excluded by !**/.yarn/**
  • package-lock.json is excluded by !**/package-lock.json
  • static/mini-shiki-dependency-tree.svg is excluded by !**/*.svg
  • static/shiki-dependency-tree.svg is excluded by !**/*.svg
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (35)
  • .changeset/README.md (1 hunks)
  • .changeset/config.json (1 hunks)
  • .codesandbox/ci.json (1 hunks)
  • .commitlintrc (1 hunks)
  • .editorconfig (1 hunks)
  • .gitattributes (1 hunks)
  • .github/workflows/autofix.yml (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .github/workflows/pkg-pr-new.yml (1 hunks)
  • .github/workflows/publish.yml (0 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/update-shiki.yml (1 hunks)
  • .github/workflows/update_shiki.yml (0 hunks)
  • .gitignore (1 hunks)
  • .nano-staged.js (1 hunks)
  • .prettierignore (1 hunks)
  • .prettierrc (1 hunks)
  • .renovaterc (1 hunks)
  • .simple-git-hooks.js (1 hunks)
  • .yarnrc.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • README.md (2 hunks)
  • eslint.config.js (1 hunks)
  • package.json (1 hunks)
  • rollup.config.js (0 hunks)
  • scripts/build.sh (0 hunks)
  • scripts/commit-shiki-update.sh (1 hunks)
  • scripts/commit_shiki_update.sh (0 hunks)
  • scripts/update-shiki.sh (1 hunks)
  • scripts/update_shiki.sh (0 hunks)
  • src/shiki.ts (1 hunks)
  • test/shiki.test.cjs (1 hunks)
  • test/shiki.test.js (1 hunks)
  • tsconfig.json (1 hunks)
  • tsdown.config.ts (1 hunks)
💤 Files with no reviewable changes (6)
  • scripts/build.sh
  • .github/workflows/update_shiki.yml
  • rollup.config.js
  • scripts/update_shiki.sh
  • .github/workflows/publish.yml
  • scripts/commit_shiki_update.sh
✅ Files skipped from review due to trivial changes (11)
  • eslint.config.js
  • .gitignore
  • .renovaterc
  • .prettierrc
  • tsconfig.json
  • .changeset/README.md
  • .simple-git-hooks.js
  • .nano-staged.js
  • .yarnrc.yml
  • tsdown.config.ts
  • .github/workflows/update-shiki.yml
🚧 Files skipped from review as they are similar to previous changes (16)
  • .commitlintrc
  • .gitattributes
  • .prettierignore
  • test/shiki.test.js
  • .codesandbox/ci.json
  • .github/workflows/pkg-pr-new.yml
  • .editorconfig
  • README.md
  • CHANGELOG.md
  • .changeset/config.json
  • test/shiki.test.cjs
  • .github/workflows/release.yml
  • scripts/update-shiki.sh
  • .github/workflows/autofix.yml
  • .github/workflows/ci.yml
  • src/shiki.ts
🧰 Additional context used
🧠 Learnings (2)
package.json (1)
Learnt from: JounQin
PR: un-ts/mini-shiki#1
File: package.json:55-55
Timestamp: 2025-05-22T04:46:11.440Z
Learning: In the mini-shiki project, shiki is bundled into the package output rather than being a runtime dependency, which is why it's correctly placed in devDependencies.
scripts/commit-shiki-update.sh (1)
Learnt from: JounQin
PR: un-ts/mini-shiki#1
File: package.json:55-55
Timestamp: 2025-05-22T04:46:11.440Z
Learning: In the mini-shiki project, shiki is bundled into the package output rather than being a runtime dependency, which is why it's correctly placed in devDependencies.
🪛 Shellcheck (0.10.0)
scripts/commit-shiki-update.sh

[warning] 8-8: Quote this to prevent word splitting.

(SC2046)

🔇 Additional comments (2)
scripts/commit-shiki-update.sh (1)

11-13: Ensure yarn version invocation is valid in Yarn 4
The current yarn version "$major.$minor.$patch" --no-git-tag-version may not align with Yarn 4’s recommended CLI (--new-version). Please verify or consider replacing with:

-    yarn version "$major.$minor.$patch" --no-git-tag-version && break
+    yarn version --new-version "$major.$minor.$patch" --no-git-tag-version && break
package.json (1)

19-22: Confirm existence of static directory
You added "static" to the "files" array—ensure the static/ folder exists and contains only intended assets to be published.

Comment thread scripts/commit-shiki-update.sh
Comment thread scripts/commit-shiki-update.sh
Comment thread package.json Outdated
Comment thread package.json
Comment thread .github/workflows/ci.yml Fixed

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 736ddda in 2 minutes and 9 seconds. Click for details.
  • Reviewed 1130 lines of code in 33 files
  • Skipped 5 files when reviewing.
  • Skipped posting 9 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/ci.yml:4
  • Draft comment:
    Using 'push: null' and 'pull_request: null' disables these triggers. Confirm that this behavior is intentional.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment asks for confirmation of intention, which violates our rules. It starts with "Confirm that..." which is explicitly called out as not useful. While the technical observation about null disabling triggers is correct, asking for confirmation doesn't add value. The author likely knows what they're doing since they explicitly changed it. The change could be unintentional and have serious implications for CI coverage, so maybe we should keep the comment to be safe? The rules explicitly state not to ask for confirmation of intention. If this was a mistake, it would be caught quickly in practice when CI stops running. Delete the comment. While technically accurate, it violates our rule about not asking authors to confirm their intentions.
2. scripts/commit-shiki-update.sh:23
  • Draft comment:
    Consider using awk’s -v option to pass the extra variable (e.g. awk -v extra="$extra" ...) for safer variable interpolation.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The suggestion is technically correct - using awk's -v option is generally safer for variable passing. However, the current code is part of a controlled script where $extra contains a very specific changelog format. The risk of special character issues is minimal given the controlled input. The code works as written and the suggested change would be a minor improvement at best. The current implementation could theoretically break if the changelog entries contained certain special characters. The -v approach would be more robust. While technically true, this is an internal script with controlled input format. The current approach is working and the risk is minimal. This comment suggests a minor improvement that isn't critical enough to warrant changing working code. The current implementation is sufficient for its purpose.
3. rollup.config.js:1
  • Draft comment:
    Removal of rollup.config.js is noted; please ensure that tsdown fully covers all build and DTS generation requirements.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. scripts/build.sh:1
  • Draft comment:
    Obsolete build.sh has been removed. Verify that the new 'tsdown' based build process completely replaces its functionality.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. package.json:2
  • Draft comment:
    Package metadata has been updated (name, repository, scripts). Double-check that all documentation and CI workflows reference the new unscoped package name 'mini-shiki'.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to double-check documentation and CI workflows, which violates the rule against asking the author to double-check things. It doesn't provide a specific suggestion or point out a specific issue with the code.
6. CHANGELOG.md:21
  • Draft comment:
    Typographical error: The header indicates version v3.2.3, but the update text reads "Update to Shiki [v3.2.2]". Please correct the version number so it matches the header.
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. CHANGELOG.md:97
  • Draft comment:
    Typographical error: The release header for v1.24.4 (2024-12-13) does not match the update text, which specifies "v1.24.2". Please ensure the version numbers are consistent.
  • Reason this comment was not posted:
    Comment was on unchanged code.
8. CHANGELOG.md:101
  • Draft comment:
    Typographical error: In the v1.24.3 (2024-12-11) entry, the update text refers to "v1.24.2" instead of v1.24.3 as the header indicates. Please fix this inconsistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.
9. CHANGELOG.md:105
  • Draft comment:
    Typographical error: The v1.24.2 (2024-12-10) entry shows an update to "v1.24.1", which does not match the header version. This should be corrected.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_LsSIHWnJdBIAj0gR

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 7374bf3 in 1 minute and 52 seconds. Click for details.
  • Reviewed 1128 lines of code in 33 files
  • Skipped 5 files when reviewing.
  • Skipped posting 31 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .changeset/README.md:1
  • Draft comment:
    Auto-generated changesets README looks complete and clear.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. .codesandbox/ci.json:1
  • Draft comment:
    Codesandbox config is minimal (node '20' and empty 'sandboxes'); verify this meets your intended use.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. .commitlintrc:1
  • Draft comment:
    Commitlint config extends '@1stG'; ensure that this preset aligns with your commit conventions.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. .editorconfig:1
  • Draft comment:
    EditorConfig settings use standard formatting rules (2-space indent, LF endings); no issues detected.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. .gitattributes:1
  • Draft comment:
    Gitattributes properly handles EOL settings and marks Yarn directories as vendored; configuration looks appropriate.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. .github/workflows/autofix.yml:1
  • Draft comment:
    Autofix workflow is well set up with pinned action versions. Be sure to update commit hashes as needed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. .github/workflows/ci.yml:3
  • Draft comment:
    CI workflow is triggered via workflow_run only (push and pull_request are null); confirm that this trigger configuration is intentional.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
8. .github/workflows/pkg-pr-new.yml:1
  • Draft comment:
    The 'Publish Any Commit' workflow appears correctly configured to build and publish using pkg-pr-new.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
9. .github/workflows/release.yml:1
  • Draft comment:
    Release workflow uses changesets action to create a PR or publish; verify that the 'version' and 'publish' commands suit your release process.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
10. .github/workflows/update-shiki.yml:1
  • Draft comment:
    Update Shiki workflow is set to run daily (via cron) and supports manual dispatch; configuration is clear.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
11. .nano-staged.js:1
  • Draft comment:
    Nano-staged configuration is a simple re-export; this is concise and acceptable.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
12. .prettierignore:1
  • Draft comment:
    Prettier ignore excludes the .yarn directory; ensure additional generated files (if any) are included as needed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
13. .prettierrc:1
  • Draft comment:
    Prettier configuration extends '@1stg/prettier-config'; this is standard and clear.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
14. .renovaterc:1
  • Draft comment:
    Renovate config extends 'github>1stG/configs'. Confirm that the rules here match your dependency update strategy.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
15. .simple-git-hooks.js:1
  • Draft comment:
    Simple git hooks file re-exports default from '@1stg/simple-git-hooks'; this is concise and effective.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
16. .yarn/plugins/plugin-prepare-lifecycle.cjs:1
  • Draft comment:
    The plugin for prepare lifecycle looks functional; ensure that it properly triggers 'yarn prepare' when no prepare script is defined.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
17. .yarnrc.yml:1
  • Draft comment:
    Yarn configuration disables telemetry and sets the node-modules linker with a pinned plugin; configuration adheres to best practices.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
18. CHANGELOG.md:1
  • Draft comment:
    Changelog now includes clickable links for each Shiki release, improving usability. Formatting appears consistent.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
19. README.md:1
  • Draft comment:
    README updated with new package name 'mini-shiki' and usage instructions. The note about unscoped version is helpful.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
20. eslint.config.js:1
  • Draft comment:
    ESLint configuration re-exports from '@1stg/eslint-config'; this approach keeps your config centralized.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
21. package.json:1
  • Draft comment:
    package.json now reflects the new package name and Yarn usage. Verify that repository, homepage, and scripts (like version and release) are correctly aligned with your workflow.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
22. scripts/commit-shiki-update.sh:1
  • Draft comment:
    The commit-shiki-update.sh script uses awk to insert changelog entries. Consider cross-platform compatibility (e.g., differences in awk on macOS vs Linux) or using an in-place editing tool.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
23. scripts/update-shiki.sh:1
  • Draft comment:
    The update-shiki.sh script installs the latest versions via 'yarn add' then builds and tests. Ensure these commands behave as expected in all environments.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 50% None
24. src/shiki.ts:1
  • Draft comment:
    The module 'shiki.ts' exports core functionality and implements loadBuiltinWasm correctly. Note the potential redundancy in re-exporting createOnigurumaEngine and loadWasm; consider consolidating if not needed twice.
  • Reason this comment was not posted:
    Confidence changes required: 20% <= threshold 50% None
25. test/shiki.test.cjs:1
  • Draft comment:
    The CommonJS test file correctly requires the module and asserts token outputs. Test structure and assertions are clear.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
26. test/shiki.test.js:1
  • Draft comment:
    The ESM test file uses top-level await; ensure your Node.js test environment supports this feature.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
27. tsdown.config.ts:1
  • Draft comment:
    tsdown configuration correctly specifies the entry file and external modules for dts generation; configuration appears solid.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
28. CHANGELOG.md:21
  • Draft comment:
    Typo: The changelog header at version v3.2.3 (2025-04-11) does not match the entry text which references v3.2.2. Please ensure the version numbers match.
  • Reason this comment was not posted:
    Comment was on unchanged code.
29. CHANGELOG.md:97
  • Draft comment:
    Typo: The changelog header for version v1.24.4 (2024-12-13) does not match the entry text which references v1.24.2. Consider correcting this inconsistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.
30. CHANGELOG.md:101
  • Draft comment:
    Typo: The changelog header for version v1.24.3 (2024-12-11) shows an update to v1.24.2. Please update the version number to match the header.
  • Reason this comment was not posted:
    Comment was on unchanged code.
31. CHANGELOG.md:105
  • Draft comment:
    Typo: The changelog header for version v1.24.2 (2024-12-10) does not match the entry text which references v1.24.1. Please correct the version number for consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_3yS1iBXRBUq0gyDS

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@JounQin JounQin requested a review from Copilot May 22, 2025 05:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces automated workflows, migrates dependency management from npm to Yarn, and updates the project documentation and code style for consistency.

  • New workflows for release management, CI, linting autofix, and dependency updates have been added.
  • Obsolete workflows and scripts have been removed, and various configuration files (Yarn, editor, commit linting, etc.) have been updated.
  • The changes also include refactoring in test and source files alongside updated changelog and README documentation.

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.yarnrc.yml Added Yarn configuration and plugin definitions.
.yarn/plugins/plugin-prepare-lifecycle.cjs Introduces a plugin hook for lifecycle events.
.simple-git-hooks.js Re-exports the simple-git-hooks module.
.renovaterc Sets up Renovate configuration.
.prettierrc, .prettierignore, .nano-staged.js Added configuration files for code formatting and staging.
.github/workflows/* Added and updated several workflows (update-shiki, release, CI, autofix, pkg-pr-new).
.gitattributes, .editorconfig, .commitlintrc, .codesandbox/ci.json Added or updated auxiliary configuration files.
.changeset/* Updates related to changesets configuration and documentation.
Comments suppressed due to low confidence (2)

.yarn/plugins/plugin-prepare-lifecycle.cjs:1

  • [nitpick] Consider re-formatting this one-line module export into multiple lines with proper indentation to improve readability and long-term maintainability.
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};

.github/workflows/ci.yml:4

  • [nitpick] Verify that disabling the 'push' (and similarly 'pull_request' on line 5) event triggers by setting them to null is intentional and aligns with the desired workflow behavior.
push: null

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed bc5bcc6 in 1 minute and 45 seconds. Click for details.
  • Reviewed 1131 lines of code in 33 files
  • Skipped 5 files when reviewing.
  • Skipped posting 8 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .github/workflows/ci.yml:4
  • Draft comment:
    Push & pull_request triggers are set to null, disabling these events. Confirm that this is intentional.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. package.json:24
  • Draft comment:
    The build script uses 'cp' to copy onig.wasm, which might not be cross‐platform. Consider a cross-platform alternative.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 30% vs. threshold = 50% This is a legitimate concern as Windows developers might not be able to build the project. However, looking at the context, this is a Node.js project using modern tooling (yarn 4.9.1, various build tools). Most Node.js developers will have Git Bash or similar tools installed that provide cp. The project also uses other Unix-style commands like && which suggests it expects a Unix-like environment. I might be making assumptions about the development environment. Some Windows developers might use PowerShell or CMD without Unix tools. While true, modern Node.js development on Windows typically includes Git Bash or WSL, and the project already assumes Unix-like environment with other commands. While technically correct, this comment is not critical enough to keep given modern development environments and the project's apparent Unix-like assumptions.
3. scripts/commit-shiki-update.sh:23
  • Draft comment:
    The AWK script for injecting changelog entries uses complex quoting. Verify its portability across different environments/awk versions.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify the portability of an AWK script, which falls under asking the author to ensure behavior is intended or to double-check things. This violates the rules.
4. .github/workflows/autofix.yml:22
  • Draft comment:
    Using a commit hash for the checkout action is precise but less readable. Consider using a stable release tag if possible.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
5. scripts/commit-shiki-update.sh:7
  • Draft comment:
    Version extraction uses devDependencies.shiki with a regex; ensure that the version string always conforms to semver.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
6. CHANGELOG.md:21
  • Draft comment:
    The header for this entry is v3.2.3, but the update text refers to v3.2.2. Please correct the version to match the header.
  • Reason this comment was not posted:
    Comment was on unchanged code.
7. CHANGELOG.md:97
  • Draft comment:
    Header indicates version v1.24.4 (2024-12-13) but the update text shows v1.24.2. This appears to be a typo—please update the version number accordingly.
  • Reason this comment was not posted:
    Comment was on unchanged code.
8. CHANGELOG.md:101
  • Draft comment:
    Header indicates version v1.24.3 (2024-12-11) but the update text shows v1.24.2. Please update the text so it reflects the correct version.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_GNREkdPyPTzbzJUX

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Comment thread CHANGELOG.md
@JounQin JounQin merged commit 62dae1e into main May 22, 2025
13 checks passed
@JounQin JounQin deleted the fork-release branch May 22, 2025 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants