Skip to content

Commit

Permalink
feat: upgrade shiki
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 10, 2024
1 parent 5642949 commit aa5e039
Show file tree
Hide file tree
Showing 4 changed files with 1,090 additions and 647 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"private": true,
"packageManager": "pnpm@9.9.0",
"packageManager": "pnpm@9.10.0",
"description": "Collection of TextMate grammars and themes in JSON",
"scripts": {
"build": "pnpm -r build",
Expand All @@ -18,16 +18,16 @@
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "^3.2.0",
"@antfu/eslint-config": "^3.5.0",
"@antfu/ni": "^0.23.0",
"@antfu/utils": "^0.7.10",
"@iconify-json/svg-spinners": "^1.2.0",
"@shikijs/core": "^1.16.2",
"@shikijs/core": "^1.16.3",
"@types/adm-zip": "^0.5.5",
"@types/cson": "^7.20.3",
"@types/js-yaml": "^4.0.9",
"@types/json-stable-stringify": "^1.0.36",
"@types/node": "^22.5.3",
"@types/node": "^22.5.4",
"@types/semver": "^7.5.8",
"@vitest/expect": "^2.0.5",
"adm-zip": "^0.5.16",
Expand All @@ -36,7 +36,7 @@
"chalk": "^5.3.0",
"cson": "^8.4.0",
"dotenv": "^16.4.5",
"eslint": "^9.9.1",
"eslint": "^9.10.0",
"esno": "^4.7.0",
"fast-glob": "^3.3.2",
"fast-plist": "^0.1.3",
Expand All @@ -46,14 +46,14 @@
"lint-staged": "^15.2.10",
"octokit": "^4.0.2",
"ofetch": "^1.3.4",
"oniguruma-to-js": "^0.3.1",
"oniguruma-to-js": "^0.3.3",
"p-limit": "^6.1.0",
"pnpm": "^9.9.0",
"pnpm": "^9.10.0",
"rimraf": "^6.0.1",
"semver": "^7.6.3",
"simple-git": "^3.26.0",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"unbuild": "^2.0.0",
"vite": "^5.4.3",
"vitest": "^2.0.5",
Expand Down
8 changes: 4 additions & 4 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"test": "vitest"
},
"dependencies": {
"@shikijs/core": "^1.16.2",
"@shikijs/core": "^1.16.3",
"@vueuse/core": "^11.0.3",
"vue": "^3.5.1",
"vue": "^3.5.3",
"vue-router": "^4.4.3"
},
"devDependencies": {
Expand All @@ -22,12 +22,12 @@
"@unocss/reset": "^0.62.3",
"@vitejs/plugin-vue": "^5.1.3",
"@vue-macros/volar": "^0.27.4",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"unocss": "^0.62.3",
"unplugin-auto-import": "^0.18.2",
"unplugin-vue-components": "^0.27.4",
"unplugin-vue-macros": "^2.11.6",
"unplugin-vue-router": "^0.10.7",
"unplugin-vue-router": "^0.10.8",
"vite": "^5.4.3",
"vitest": "^2.0.5",
"vue-tsc": "^2.1.6"
Expand Down
8 changes: 4 additions & 4 deletions playground/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup lang="ts">
import type { HighlighterCore } from '@shikijs/core'
import { createHighlighterCore, createJavaScriptRegexEngine, createWasmOnigEngine } from '@shikijs/core'
import { themes } from '../../packages/tm-themes/index'
import type { HighlighterCore } from '@shikijs/core'
import { grammars, injections } from '../../packages/tm-grammars/index'
import { themes } from '../../packages/tm-themes/index'
import { dependencies } from '../package.json'
import Badge from './Badge.vue'
import SegmentControl from './SegmentControl.vue'
import { engine, grammar, isDark, theme } from './state'
import Badge from './Badge.vue'
const embedded = ref<string[]>([])
const error = ref<any>(null)
Expand Down Expand Up @@ -331,7 +331,7 @@ if (import.meta.hot) {
<div v-if="error" text-red bg-red:10 p4 rounded flex-none>
{{ error }}
</div>
<div v-if="output" relative of-x-scroll flex-none>
<div v-if="output && !error" relative of-x-scroll flex-none>
<div
transition-all duration-500 :class="isFetching ? 'blur-3px' : ''"
v-html="output"
Expand Down
Loading

0 comments on commit aa5e039

Please sign in to comment.