From 685a67c220d33670df13fd56b1cfcd3b6445d4c4 Mon Sep 17 00:00:00 2001 From: "wkylin.w@gmail.com" Date: Tue, 21 Jan 2025 14:43:32 +0800 Subject: [PATCH] feat: shiki --- package-lock.json | 84 +++++++++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8781b249..40849a50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -110,7 +110,6 @@ "resize-observer-polyfill": "^1.5.1", "sanitize.css": "^13.0.0", "screenfull": "^6.0.2", - "shiki": "^1.28.0", "sse.js": "^2.5.0", "styled-components": "^6.1.14", "three": "^0.172.0", @@ -233,6 +232,7 @@ "scripty": "^2.1.1", "serve": "^14.2.4", "shelljs": "^0.8.5", + "shiki": "^2.0.3", "standard": "^17.1.2", "standard-version": "^9.5.0", "style-loader": "^4.0.0", @@ -7284,62 +7284,68 @@ "license": "MIT" }, "node_modules/@shikijs/core": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/@shikijs/core/-/core-1.28.0.tgz", - "integrity": "sha512-ij3palSqryLlVxtjD5lCJdrb2FLFVetsJq9P+9q4Sogpt7jLk5bO5hVqdloBbfLYQVQLOpDy0HD5MB6QnNqJUw==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@shikijs/core/-/core-2.0.3.tgz", + "integrity": "sha512-dhbLagx1As0BmaNGUTxJ/qshb4MPyKYIvjCcd7y1utDToebUS4BZI3FH+WVCJF3/VwWWKOhuzX4lgjOb7qtSjQ==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/engine-javascript": "1.28.0", - "@shikijs/engine-oniguruma": "1.28.0", - "@shikijs/types": "1.28.0", + "@shikijs/engine-javascript": "2.0.3", + "@shikijs/engine-oniguruma": "2.0.3", + "@shikijs/types": "2.0.3", "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.4" } }, "node_modules/@shikijs/engine-javascript": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/@shikijs/engine-javascript/-/engine-javascript-1.28.0.tgz", - "integrity": "sha512-BXBJxmb93hsiHpxUU+zH0JAuPqj67SzYNcW/m8wQyrImw4e+aTuP5NWFbKGfC86znP2k3bsH+uK/hudM3kM17Q==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@shikijs/engine-javascript/-/engine-javascript-2.0.3.tgz", + "integrity": "sha512-GMmfP8xEmUl0H7RXo4VTFYqAWzAADtlghA9perlm6mzuo0n/Ih+owh57ZLWBMMe/N1TUMis4SGJRvx31HtK3jg==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.28.0", + "@shikijs/types": "2.0.3", "@shikijs/vscode-textmate": "^10.0.1", "oniguruma-to-es": "^2.2.0" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.28.0.tgz", - "integrity": "sha512-wjjaENuz0ExgYbhejq1iUNGQka0Vp1xQlwYdvEJ5zanjdqVUK8i8Ge+6LeXn5ZUIhQwaIz1qgq+LvUiLeUZR3g==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@shikijs/engine-oniguruma/-/engine-oniguruma-2.0.3.tgz", + "integrity": "sha512-MicRzo0aNaS18yXBnXjYFLnzi5Sh3NUHtm/WXzavtpGiWd75gRdZsZDMceeFyTL9MMy9iGifK2JePXY5dlZHIA==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.28.0", + "@shikijs/types": "2.0.3", "@shikijs/vscode-textmate": "^10.0.1" } }, "node_modules/@shikijs/langs": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/@shikijs/langs/-/langs-1.28.0.tgz", - "integrity": "sha512-wnykS0viZwPOBzSslDSh3oWyip8E5PWsN4tS3uvdsYRPBIz1QTmGys3Nc9YM1ItGlwfPjqRV7iRXNssLsGCj1w==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@shikijs/langs/-/langs-2.0.3.tgz", + "integrity": "sha512-L+QcwH6tjVY21xDxe3etR+C+33mAbkyQVvUIsszwnQrRVI54r7VPNTMVWR4EbZfPFwWmwLCoO83V5YiBWusvVg==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.28.0" + "@shikijs/types": "2.0.3" } }, "node_modules/@shikijs/themes": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/@shikijs/themes/-/themes-1.28.0.tgz", - "integrity": "sha512-CEsGrAtykammHUER3VIfuRm0F8l+2+pjTeaJWAFSOxJzXoHaHqNNEh0fmMeLSOn87W0zc3+ICZaA92oOs5kIWQ==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@shikijs/themes/-/themes-2.0.3.tgz", + "integrity": "sha512-NFnArltjzmYAssn1SLIFlKX9HJEL9K12z0uBB0tg579hW6UHIXwfd+AhsaB/+cXYLix2YuN5uEPJpqtRN2zi0A==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.28.0" + "@shikijs/types": "2.0.3" } }, "node_modules/@shikijs/types": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/@shikijs/types/-/types-1.28.0.tgz", - "integrity": "sha512-Vf0jiHlE5afPV5h5jL+yfhfOkbgsAC810oVxplIzAsfYCE5Xxq/PaBl2PAGzuVYK9RkC/8V+3ct7MKPYjnkXUQ==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@shikijs/types/-/types-2.0.3.tgz", + "integrity": "sha512-jyP6NMdWkbBpEn3WqqH8TCfkzE52/hS7msKGJAvxcwyQQah7+hU8x7ejFhCVoxrBaW001v+ID4zl3wspcDSaaw==", + "dev": true, "license": "MIT", "dependencies": { "@shikijs/vscode-textmate": "^10.0.1", @@ -7350,6 +7356,7 @@ "version": "10.0.1", "resolved": "https://registry.npmmirror.com/@shikijs/vscode-textmate/-/vscode-textmate-10.0.1.tgz", "integrity": "sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==", + "dev": true, "license": "MIT" }, "node_modules/@sinclair/typebox": { @@ -16840,6 +16847,7 @@ "version": "1.0.0", "resolved": "https://registry.npmmirror.com/emoji-regex-xs/-/emoji-regex-xs-1.0.0.tgz", "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==", + "dev": true, "license": "MIT" }, "node_modules/emojis-list": { @@ -21473,6 +21481,7 @@ "version": "9.0.4", "resolved": "https://registry.npmmirror.com/hast-util-to-html/-/hast-util-to-html-9.0.4.tgz", "integrity": "sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==", + "dev": true, "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", @@ -29716,6 +29725,7 @@ "version": "2.2.0", "resolved": "https://registry.npmmirror.com/oniguruma-to-es/-/oniguruma-to-es-2.2.0.tgz", "integrity": "sha512-EEsso27ri0sf+t4uRFEj5C5gvXQj0d0w1Y2qq06b+hDLBnvzO1rWTwEW4C7ytan6nhg4WPwE26eLoiPhHUbvKg==", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex-xs": "^1.0.0", @@ -35167,6 +35177,7 @@ "version": "5.1.1", "resolved": "https://registry.npmmirror.com/regex/-/regex-5.1.1.tgz", "integrity": "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==", + "dev": true, "license": "MIT", "dependencies": { "regex-utilities": "^2.3.0" @@ -35176,6 +35187,7 @@ "version": "5.1.1", "resolved": "https://registry.npmmirror.com/regex-recursion/-/regex-recursion-5.1.1.tgz", "integrity": "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w==", + "dev": true, "license": "MIT", "dependencies": { "regex": "^5.1.1", @@ -35186,6 +35198,7 @@ "version": "2.3.0", "resolved": "https://registry.npmmirror.com/regex-utilities/-/regex-utilities-2.3.0.tgz", "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", + "dev": true, "license": "MIT" }, "node_modules/regexp-tree": { @@ -36811,17 +36824,18 @@ } }, "node_modules/shiki": { - "version": "1.28.0", - "resolved": "https://registry.npmmirror.com/shiki/-/shiki-1.28.0.tgz", - "integrity": "sha512-Ljei3Kg+nR5AwDh32mOuEM7oqaesQeqcu9x4MzOoYMhE9wENvuxUElpk6rjoykrrG08HKz+p/Iup1A5UPIPfyQ==", + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/shiki/-/shiki-2.0.3.tgz", + "integrity": "sha512-njF3iF97mxWcEFxxB591EeVFgf5VPpXJKFIB3RCFSkcgINetMIb+9CfNInmzkz8BlPWlEEY1nSGd0F1807YhCg==", + "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "1.28.0", - "@shikijs/engine-javascript": "1.28.0", - "@shikijs/engine-oniguruma": "1.28.0", - "@shikijs/langs": "1.28.0", - "@shikijs/themes": "1.28.0", - "@shikijs/types": "1.28.0", + "@shikijs/core": "2.0.3", + "@shikijs/engine-javascript": "2.0.3", + "@shikijs/engine-oniguruma": "2.0.3", + "@shikijs/langs": "2.0.3", + "@shikijs/themes": "2.0.3", + "@shikijs/types": "2.0.3", "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4" } diff --git a/package.json b/package.json index bc4b9d2f..d867ba6d 100644 --- a/package.json +++ b/package.json @@ -193,6 +193,7 @@ "scripty": "^2.1.1", "serve": "^14.2.4", "shelljs": "^0.8.5", + "shiki": "^2.0.3", "standard": "^17.1.2", "standard-version": "^9.5.0", "style-loader": "^4.0.0", @@ -312,7 +313,6 @@ "resize-observer-polyfill": "^1.5.1", "sanitize.css": "^13.0.0", "screenfull": "^6.0.2", - "shiki": "^1.28.0", "sse.js": "^2.5.0", "styled-components": "^6.1.14", "three": "^0.172.0",