Skip to content

feat(api): add Shiki syntax highlighting support for UCD files#523

Closed
luxass wants to merge 3008 commits intomainfrom
shiki-endpoint
Closed

feat(api): add Shiki syntax highlighting support for UCD files#523
luxass wants to merge 3008 commits intomainfrom
shiki-endpoint

Conversation

@luxass
Copy link
Copy Markdown
Member

@luxass luxass commented Feb 22, 2026

  • Introduced new route for syntax highlighting of UCD files using Shiki.
  • Added eligibility checks for file types and sizes.
  • Implemented error handling for unsupported media types and payload size limits.
  • Updated package.json and lock files to include shiki and shiki-stream dependencies.

🔗 Linked issue

📚 Description

- Added caching functionality with `tryLoadCachedResult`, `buildCacheKey`, and `storeCacheEntry` to optimize pipeline execution.
- Introduced event handling through `createEventEmitter` and `emitWithSpan` for better tracking of pipeline events.
- Implemented a processing queue with `createProcessingQueue` to manage concurrent task execution.
- Enhanced route processing with `processRoute` and `processFallback` to handle file parsing and artifact emission.
- Updated source adapter functionality for file reading and context creation.

This update improves performance and maintainability of the pipeline executor by introducing structured caching and event management.
…graph

- Implement tests for pipeline artifacts to ensure global artifacts are built before execution.
- Add tests for executor cache behavior, verifying cache events are emitted correctly.
- Create tests for executor events to confirm pipeline and version events are emitted.
- Introduce tests for graph structure, ensuring edges are built across multiple routes.
- Refactor helper functions for better test organization and reusability.
- Introduced `execution-logs.ts` for handling execution spans and formatting timestamps, durations, and bytes.
- Added `format-time.ts` for high precision time formatting.
- Created `pipeline-utils.ts` for converting pipeline definitions to structured info and details.
- Implemented layout logic in `layout.ts` for positioning nodes in the pipeline graph.
- Updated `index.ts` to export new utilities and types.
- Added global styles in `globals.css` and defined types in `types.ts`.
- Configured TypeScript and build settings with `tsconfig.json` and `tsdown.config.ts`.
- Updated dependencies in `pnpm-lock.yaml` and `pnpm-workspace.yaml` for new packages.
- Introduced `standard.ts` and `unicode-data.ts` for parsing Unicode data.
- Created basic, emoji, and full pipelines to process Unicode Character Database files.
- Implemented grouped and property JSON resolvers for structured data handling.
- Added HTTP and memory sources for file retrieval.
- Included various transforms for data manipulation, such as deduplication and range expansion.
- Updated `turbo` from `2.8.3` to `2.8.6`
- Updated `openapi-typescript` from `7.10.1` to `7.13.0`
- Updated `rolldown` from `1.0.0-rc.3` to `1.0.0-rc.4`
- Updated `@vitejs/plugin-react` from `5.1.3` to `5.1.4`
- Updated `@cloudflare/vite-plugin` from `1.23.1` to `1.24.0`
- Updated `@tanstack/router-plugin` from `1.158.4` to `1.159.5`
- Updated `drizzle-kit` from `0.31.8` to `0.31.9`
- Updated `esrap` from `2.2.2` to `2.2.3`
- Updated `msw` from `2.12.9` to `2.12.10`
- Updated `@luxass/eslint-config` from `7.0.1` to `7.1.0`
- Updated `@typescript-eslint/utils` from `8.54.0` to `8.55.0`
- Updated `@eslint-react/eslint-plugin` from `2.12.2` to `2.12.4`
- Updated `ai` from `6.0.77` to `6.0.79`
- Updated `wrangler` from `4.63.0` to `4.64.0`
- Updated `@cloudflare/workers-types` from `4.20260207.0` to `4.20260210.0`
- Updated `h3` from `2.0.1-rc.11` to `2.0.1-rc.14`
- Updated `@types/react` from `19.2.13` to `19.2.14`
- Updated `@tanstack/react-router` and related packages to `1.159.5`
- Updated `fumadocs-core` and `fumadocs-ui` to `16.5.4`
- Updated `packageManager` in `moonbeam`, `tsconfig`, and `vscode` to `pnpm@10.29.3`
Updated `turbo` to version 2.8.7, `nanotar` to 0.2.1, `vite-tsconfig-paths` to 6.1.1, and `@luxass/eslint-config` to 7.2.0 in the `pnpm-workspace.yaml` file. These updates include minor improvements and bug fixes.
- Moved `NON_RENDERABLE_EXTENSIONS` and `getFileTypeDescription` to a new `lib/file-explorer.ts` file for better organization.
- Updated imports in relevant components to use the new utility functions.
- Improved code readability and maintainability by consolidating related logic.
- Introduced `createMemoryBackend` and `createMemorySource` for in-memory data handling.
- Implemented deduplication and range expansion transforms with `createDeduplicateTransform` and `createExpandRangesTransform`.
- Added normalization and sorting transforms with `createNormalizeTransform` and `createSortTransform`.
- Enhanced utility functions for array manipulation and parsing.
- Updated pipeline presets to utilize new sources and transforms.
Updated the `@ucdjs/release-scripts` package version from `0.1.0-beta.24` to `0.1.0-beta.25` in both `pnpm-lock.yaml` and `pnpm-workspace.yaml` to ensure consistency across the project.
- Implemented `lockfile` and `snapshot` routes to handle versioned data retrieval.
- Added tests for both routes to ensure correct functionality and error handling.
- Introduced utility functions for path transformations in `path-utils`.
- Added a search form to the sidebar for quick navigation.
- Integrated `ThemeToggle` component for theme switching.
- Improved sidebar header layout for better responsiveness.
- Added new routes for the file explorer under the `(explorer)` scope.
- Created `DirectoryExplorerPage` and `FileViewerPage` components to handle directory and file viewing.
- Integrated search functionality and loading states for file exploration.
- Implemented skeleton loading for better user experience during data fetching.
- Introduced new route for syntax highlighting of UCD files using Shiki.
- Added eligibility checks for file types and sizes.
- Implemented error handling for unsupported media types and payload size limits.
- Updated `package.json` and lock files to include `shiki` and `shiki-stream` dependencies.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch shiki-endpoint

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

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

@github-actions
Copy link
Copy Markdown
Contributor

🌏 Preview Deployments

Application Status Preview URL
API ⏳ In Progress N/A
Store ⏳ In Progress N/A
Website ⏳ In Progress N/A
Documentation ⏳ In Progress N/A

Built from commit: ff2ae8f42104a78184f46a78759dac8f58230d10


🤖 This comment will be updated automatically when you push new commits to this PR.

@github-actions
Copy link
Copy Markdown
Contributor

📋 OpenAPI Schema Analysis

Summary

API Endpoints

Change Type Count Details
🟢 Added 1 New API endpoints
🔴 Removed 0
🟡 Modified 0 Endpoints with method changes
📊 Method Changes +1 / -0 Added/Removed HTTP methods

Overall Status

Status Result
⚠️ Breaking Changes No - No breaking changes detected

Detailed Changes

🟢 Added Endpoints (1)
Path Methods Description
/api/v1/files/__shiki/{wildcard} GET No description

🤖 This comment is automatically updated when you push new commits.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 5.76923% with 49 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/worker-utils/src/content-validation.ts 4.54% 13 Missing and 29 partials ⚠️
packages/worker-utils/src/index.ts 0.00% 5 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

2 participants