Skip to content

Commit 91c7f01

Browse files
committedJul 21, 2024
feat: update grammar and themes
1 parent e8d8e2b commit 91c7f01

15 files changed

+1614
-983
lines changed
 

‎docs/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
"@iconify-json/svg-spinners": "^1.1.2",
1515
"@shikijs/transformers": "workspace:*",
1616
"@shikijs/twoslash": "workspace:*",
17-
"@unocss/reset": "^0.61.3",
17+
"@unocss/reset": "^0.61.5",
1818
"@vueuse/core": "^10.11.0",
1919
"floating-vue": "^5.2.2",
2020
"pinia": "^2.1.7",
2121
"shiki": "workspace:*",
22-
"unocss": "^0.61.3",
23-
"unplugin-vue-components": "^0.27.2",
24-
"vitepress": "^1.2.3",
25-
"vue": "^3.4.31"
22+
"unocss": "^0.61.5",
23+
"unplugin-vue-components": "^0.27.3",
24+
"vitepress": "^1.3.1",
25+
"vue": "^3.4.33"
2626
}
2727
}

‎package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"version": "1.10.3",
44
"private": true,
5-
"packageManager": "pnpm@9.4.0",
5+
"packageManager": "pnpm@9.5.0",
66
"scripts": {
77
"lint": "eslint . --cache",
88
"release": "bumpp && pnpm -r publish",
@@ -14,8 +14,8 @@
1414
"prepare": "simple-git-hooks"
1515
},
1616
"devDependencies": {
17-
"@antfu/eslint-config": "^2.22.0-beta.3",
18-
"@antfu/ni": "^0.21.12",
17+
"@antfu/eslint-config": "^2.23.1",
18+
"@antfu/ni": "^0.22.0",
1919
"@antfu/utils": "^0.7.10",
2020
"@rollup/plugin-alias": "^5.1.0",
2121
"@rollup/plugin-commonjs": "^26.0.1",
@@ -30,11 +30,11 @@
3030
"@shikijs/vitepress-twoslash": "workspace:*",
3131
"@types/fs-extra": "^11.0.4",
3232
"@types/hast": "^3.0.4",
33-
"@types/node": "^20.14.10",
34-
"@vitest/coverage-v8": "^1.6.0",
33+
"@types/node": "^20.14.11",
34+
"@vitest/coverage-v8": "^2.0.3",
3535
"ansi-sequence-parser": "^1.1.1",
3636
"bumpp": "^9.4.1",
37-
"eslint": "^9.6.0",
37+
"eslint": "^9.7.0",
3838
"eslint-plugin-format": "^0.1.2",
3939
"esno": "^4.7.0",
4040
"fast-glob": "^3.3.2",
@@ -46,25 +46,25 @@
4646
"mdast-util-gfm": "^3.0.0",
4747
"mdast-util-to-hast": "^13.2.0",
4848
"ofetch": "^1.3.4",
49-
"pnpm": "^9.4.0",
50-
"prettier": "^3.3.2",
51-
"rimraf": "^5.0.8",
52-
"rollup": "^4.18.0",
49+
"pnpm": "^9.5.0",
50+
"prettier": "^3.3.3",
51+
"rimraf": "^6.0.1",
52+
"rollup": "^4.19.0",
5353
"rollup-plugin-copy": "^3.5.0",
5454
"rollup-plugin-dts": "^6.1.1",
5555
"rollup-plugin-esbuild": "^6.1.1",
5656
"rollup-plugin-typescript2": "^0.36.0",
5757
"shiki": "workspace:*",
5858
"simple-git-hooks": "^2.11.1",
59-
"taze": "^0.14.2",
59+
"taze": "^0.16.1",
6060
"typescript": "^5.5.3",
6161
"unbuild": "^2.0.0",
62-
"vite": "^5.3.3",
62+
"vite": "^5.3.4",
6363
"vite-tsconfig-paths": "^4.3.2",
6464
"vitepress-plugin-mermaid": "^2.0.16",
65-
"vitest": "^1.6.0",
65+
"vitest": "^2.0.3",
6666
"vue-tsc": "^2.0.26",
67-
"wrangler": "^3.63.1"
67+
"wrangler": "^3.65.1"
6868
},
6969
"resolutions": {
7070
"@shikijs/compat": "workspace:*",

‎packages/monaco/playground/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
},
99
"devDependencies": {
1010
"typescript": "^5.5.3",
11-
"vite": "^5.3.3"
11+
"vite": "^5.3.4"
1212
}
1313
}

‎packages/shiki/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
"@types/hast": "^3.0.4"
105105
},
106106
"devDependencies": {
107-
"tm-grammars": "^1.13.7",
108-
"tm-themes": "^1.5.1",
107+
"tm-grammars": "^1.14.0",
108+
"tm-themes": "^1.5.6",
109109
"vscode-oniguruma": "^1.7.0"
110110
}
111111
}

‎packages/shiki/src/assets/langs-bundle-full.ts

+10
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,14 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
608608
'name': 'LaTeX',
609609
'import': (() => import('./langs/latex')) as DynamicImportLanguageRegistration
610610
},
611+
{
612+
'id': 'lean',
613+
'name': 'Lean 4',
614+
'aliases': [
615+
'lean4'
616+
],
617+
'import': (() => import('./langs/lean')) as DynamicImportLanguageRegistration
618+
},
611619
{
612620
'id': 'less',
613621
'name': 'Less',
@@ -1388,6 +1396,8 @@ export type BundledLanguage =
13881396
| 'kts'
13891397
| 'kusto'
13901398
| 'latex'
1399+
| 'lean'
1400+
| 'lean4'
13911401
| 'less'
13921402
| 'liquid'
13931403
| 'lisp'

‎packages/shiki/src/assets/themes.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ export const bundledThemesInfo: BundledThemeInfo[] = [
5252
},
5353
{
5454
"id": "dracula",
55-
"displayName": "Dracula",
55+
"displayName": "Dracula Theme",
5656
"type": "dark",
5757
"import": (() => import('./themes/dracula')) as unknown as DynamicImportThemeRegistration
5858
},
5959
{
6060
"id": "dracula-soft",
61-
"displayName": "Dracula Soft",
61+
"displayName": "Dracula Theme Soft",
6262
"type": "dark",
6363
"import": (() => import('./themes/dracula-soft')) as unknown as DynamicImportThemeRegistration
6464
},

‎packages/shiki/test/bundle.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ it('bundle-full', async () => {
77
}))
88

99
expect(highlighter.getLoadedLanguages().length)
10-
.toMatchInlineSnapshot(`296`)
10+
.toMatchInlineSnapshot(`299`)
1111
})
1212

1313
it('bundle-web', async () => {
@@ -17,5 +17,5 @@ it('bundle-web', async () => {
1717
}))
1818

1919
expect(highlighter.getLoadedLanguages().length)
20-
.toMatchInlineSnapshot(`83`)
20+
.toMatchInlineSnapshot(`84`)
2121
})

‎packages/shiki/test/injections.test.ts

+28-7
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ it('injections-side-effects vue', async () => {
5252
expect(before).not.toEqual(after)
5353
})
5454

55-
// It seems that angular-html is not correctly highlighted in the recent update. Bring this back once fixed.
56-
it.skip('injections-side-effects angular-html', async () => {
55+
it('injections-side-effects angular-html', async () => {
5756
const highlighter = await createHighlighterCore({
5857
themes: [
5958
vl,
@@ -63,7 +62,23 @@ it.skip('injections-side-effects angular-html', async () => {
6362
],
6463
})
6564

66-
const code = `<div [ ngStyle ]="{'max-width.px': i * 2 + 5}"></div>`
65+
const code = `<h2>Hero List</h2>
66+
67+
<p><em>Select a hero from the list to see details.</em></p>
68+
69+
@if (heroes.length > 0) {
70+
<ul>
71+
<li *ngFor="let hero of heroes">
72+
@let isSelected = hero === selectedHero;
73+
<button type="button" (click)="selectHero(hero)" [class.selected]="isSelected">
74+
{{hero.name}}
75+
</button>
76+
</li>
77+
</ul>
78+
}
79+
80+
<app-hero-detail *ngIf="selectedHero" [hero]="selectedHero"></app-hero-detail>
81+
`
6782

6883
const before = highlighter.codeToHtml(code, { lang: 'html', theme: 'vitesse-light' })
6984
expect(before)
@@ -92,6 +107,7 @@ it.skip('injections-side-effects angular-html', async () => {
92107
"css",
93108
"html",
94109
"angular-expression",
110+
"angular-let-declaration",
95111
"angular-template",
96112
"angular-template-blocks",
97113
"angular-html",
@@ -126,10 +142,15 @@ import { CartService } from './cart.service';
126142
type="button"
127143
[routerLink]="'/cart'"
128144
>
129-
@if (cartService.length > 0) {
130-
<div>
131-
{{ cartService.length }}
132-
</div>
145+
@if (heroes.length > 0) {
146+
<ul>
147+
<li *ngFor="let hero of heroes">
148+
@let isSelected = hero === selectedHero;
149+
<button type="button" (click)="selectHero(hero)" [class.selected]="isSelected">
150+
{{hero.name}}
151+
</button>
152+
</li>
153+
</ul>
133154
}
134155
Cart
135156
</button>

‎packages/shiki/test/out/injections-side-effects-angular-after.html

+17-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/shiki/test/out/injections-side-effects-angular-before.html

+17-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/shiki/test/out/injections-side-effects-angular-ts-after.html

+10-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/shiki/test/out/injections-side-effects-angular-ts-before.html

+9-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/twoslash/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"devDependencies": {
6262
"@iconify-json/carbon": "^1.1.36",
63-
"@iconify-json/codicon": "^1.1.49",
63+
"@iconify-json/codicon": "^1.1.50",
6464
"@shikijs/twoslash": "^3.1.2",
6565
"hast-util-from-html": "^2.0.1",
6666
"typescript": "^5.5.3"

‎packages/vitepress-twoslash/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
"shiki": "workspace:*",
6262
"twoslash": "^0.2.9",
6363
"twoslash-vue": "^0.2.9",
64-
"vue": "^3.4.31"
64+
"vue": "^3.4.33"
6565
}
6666
}

‎pnpm-lock.yaml

+1,495-937
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.