diff --git a/docs/package.json b/docs/package.json index 967ef23a..fa4c9b73 100644 --- a/docs/package.json +++ b/docs/package.json @@ -27,7 +27,7 @@ "cpx": "^1.5.0", "jsom": "^1.0.0", "sass": "^1.69.5", - "shiki": "^1.4.0", + "shiki": "^3.4.0", "svelte": "catalog:", "svelte-check": "catalog:", "tailwindcss": "^3.3.5", diff --git a/packages/carta-md/package.json b/packages/carta-md/package.json index e4546fae..d45d4a5b 100644 --- a/packages/carta-md/package.json +++ b/packages/carta-md/package.json @@ -46,7 +46,7 @@ "remark-gfm": "^4.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.0", - "shiki": "^1.4.0", + "shiki": "^3.4.0", "unified": "^11.0.5" }, "keywords": [ diff --git a/packages/carta-md/src/lib/internal/highlight.ts b/packages/carta-md/src/lib/internal/highlight.ts index 180a7c0b..bcdfc946 100644 --- a/packages/carta-md/src/lib/internal/highlight.ts +++ b/packages/carta-md/src/lib/internal/highlight.ts @@ -236,7 +236,7 @@ async function getManager() { // to prevent multiple calls to getManager from creating multiple instances // since shiki.getHighlighter is an async function. manager = (async () => ({ - shikiHighlighter: await shiki.getHighlighter({ + shikiHighlighter: await shiki.createHighlighter({ langs: [], themes: [] }), diff --git a/packages/plugin-code/package.json b/packages/plugin-code/package.json index dbabf5e6..b70346a0 100644 --- a/packages/plugin-code/package.json +++ b/packages/plugin-code/package.json @@ -16,7 +16,7 @@ "build": "tsc && tscp" }, "devDependencies": { - "@shikijs/rehype": "^1.4.0", + "@shikijs/rehype": "^3.4.0", "@types/node": "^18.16.3", "carta-md": "workspace:*", "typescript": "catalog:", @@ -30,7 +30,7 @@ ], "version": "4.0.0", "dependencies": { - "@shikijs/rehype": "^1.4.0", + "@shikijs/rehype": "^3.4.0", "unified": "^11.0.5" }, "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64469f45..7cbc052a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -193,8 +193,8 @@ importers: specifier: ^1.69.5 version: 1.69.5 shiki: - specifier: ^1.4.0 - version: 1.4.0 + specifier: ^3.4.0 + version: 3.4.0 svelte: specifier: 'catalog:' version: 5.20.1 @@ -235,8 +235,8 @@ importers: specifier: ^11.1.0 version: 11.1.0 shiki: - specifier: ^1.4.0 - version: 1.4.0 + specifier: ^3.4.0 + version: 3.4.0 unified: specifier: ^11.0.5 version: 11.0.5 @@ -357,8 +357,8 @@ importers: packages/plugin-code: dependencies: '@shikijs/rehype': - specifier: ^1.4.0 - version: 1.4.0 + specifier: ^3.4.0 + version: 3.4.0 unified: specifier: ^11.0.5 version: 11.0.5 @@ -1258,14 +1258,29 @@ packages: peerDependencies: semantic-release: '>=20.1.0' - '@shikijs/core@1.4.0': - resolution: {integrity: sha512-CxpKLntAi64h3j+TwWqVIQObPTED0FyXLHTTh3MKXtqiQNn2JGcMQQ362LftDbc9kYbDtrksNMNoVmVXzKFYUQ==} + '@shikijs/core@3.4.0': + resolution: {integrity: sha512-0YOzTSRDn/IAfQWtK791gs1u8v87HNGToU6IwcA3K7nPoVOrS2Dh6X6A6YfXgPTSkTwR5y6myk0MnI0htjnwrA==} - '@shikijs/rehype@1.4.0': - resolution: {integrity: sha512-Ba6QHYx+EIEvmqyNy/B49KAz3rXsTfAqYRY3KTZjPWonytokGOiJ1q/FV9l13D/ad6Qv+eWKhkAz6ITxx6ziFA==} + '@shikijs/engine-javascript@3.4.0': + resolution: {integrity: sha512-1ywDoe+z/TPQKj9Jw0eU61B003J9DqUFRfH+DVSzdwPUFhR7yOmfyLzUrFz0yw8JxFg/NgzXoQyyykXgO21n5Q==} - '@shikijs/transformers@1.4.0': - resolution: {integrity: sha512-kzvlWmWYYSeaLKRce/kgmFFORUtBtFahfXRKndor0b60ocYiXufBQM6d6w1PlMuUkdk55aor9xLvy9wy7hTEJg==} + '@shikijs/engine-oniguruma@3.4.0': + resolution: {integrity: sha512-zwcWlZ4OQuJ/+1t32ClTtyTU1AiDkK1lhtviRWoq/hFqPjCNyLj22bIg9rB7BfoZKOEOfrsGz7No33BPCf+WlQ==} + + '@shikijs/langs@3.4.0': + resolution: {integrity: sha512-bQkR+8LllaM2duU9BBRQU0GqFTx7TuF5kKlw/7uiGKoK140n1xlLAwCgXwSxAjJ7Htk9tXTFwnnsJTCU5nDPXQ==} + + '@shikijs/rehype@3.4.0': + resolution: {integrity: sha512-wm7RTSmrcmjZg+F9JRrsH0Brwi36joUMXkUWIDmBGW+XExNEi8Xjmmp2NOBXa3DujZtnL6Dbcg7V6gtZabGoXw==} + + '@shikijs/themes@3.4.0': + resolution: {integrity: sha512-YPP4PKNFcFGLxItpbU0ZW1Osyuk8AyZ24YEFaq04CFsuCbcqydMvMUTi40V2dkc0qs1U2uZFrnU6s5zI6IH+uA==} + + '@shikijs/types@3.4.0': + resolution: {integrity: sha512-EUT/0lGiE//7j5N/yTMNMT3eCWNcHJLrRKxT0NDXWIfdfSmFJKfPX7nMmRBrQnWboAzIsUziCThrYMMhjbMS1A==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} '@sindresorhus/is@4.6.0': resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} @@ -2846,12 +2861,18 @@ packages: hast-util-to-html@9.0.1: resolution: {integrity: sha512-hZOofyZANbyWo+9RP75xIDV/gq+OUKx+T46IlwERnKmfpwp81XBFbT9mi26ws+SJchA4RVUQwIBJpqEOBhMzEQ==} + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + hast-util-to-parse5@8.0.0: resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} hast-util-to-string@3.0.0: resolution: {integrity: sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==} + hast-util-to-string@3.0.1: + resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==} + hast-util-to-text@4.0.1: resolution: {integrity: sha512-RHL7Vo2n06ZocCFWqmbyhZ1pCYX/mSKdywt9YD5U6Hquu5syV+dImCXFKLFt02JoK5QxkQFS0PoVdFdPXuPffQ==} @@ -3900,6 +3921,12 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} + oniguruma-parser@0.12.1: + resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==} + + oniguruma-to-es@4.3.3: + resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -4260,6 +4287,9 @@ packages: property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} + property-information@7.0.0: + resolution: {integrity: sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==} + proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} @@ -4350,6 +4380,15 @@ packages: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} + regex-recursion@6.0.2: + resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} + + regex-utilities@2.3.0: + resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} + + regex@6.0.1: + resolution: {integrity: sha512-uorlqlzAKjKQZ5P+kTJr3eeJGSVroLKoHmquUj4zHWuR+hEyNqlXsSKlYYF5F4NI6nl7tWCs0apKJ0lmfsXAPA==} + registry-auth-token@5.1.0: resolution: {integrity: sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==} engines: {node: '>=14'} @@ -4574,8 +4613,8 @@ packages: resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} engines: {node: '>= 0.4'} - shiki@1.4.0: - resolution: {integrity: sha512-5WIn0OL8PWm7JhnTwRWXniy6eEDY234mRrERVlFa646V2ErQqwIFd2UML7e0Pq9eqSKLoMa3Ke+xbsF+DAuy+Q==} + shiki@3.4.0: + resolution: {integrity: sha512-Ni80XHcqhOEXv5mmDAvf5p6PAJqbUc/RzFeaOqk+zP5DLvTPS3j0ckvA+MI87qoxTQ5RGJDVTbdl/ENLSyyAnQ==} signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -5995,20 +6034,47 @@ snapshots: transitivePeerDependencies: - supports-color - '@shikijs/core@1.4.0': {} + '@shikijs/core@3.4.0': + dependencies: + '@shikijs/types': 3.4.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/engine-javascript@3.4.0': + dependencies: + '@shikijs/types': 3.4.0 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 4.3.3 - '@shikijs/rehype@1.4.0': + '@shikijs/engine-oniguruma@3.4.0': dependencies: - '@shikijs/transformers': 1.4.0 + '@shikijs/types': 3.4.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@3.4.0': + dependencies: + '@shikijs/types': 3.4.0 + + '@shikijs/rehype@3.4.0': + dependencies: + '@shikijs/types': 3.4.0 '@types/hast': 3.0.4 - hast-util-to-string: 3.0.0 - shiki: 1.4.0 + hast-util-to-string: 3.0.1 + shiki: 3.4.0 unified: 11.0.5 unist-util-visit: 5.0.0 - '@shikijs/transformers@1.4.0': + '@shikijs/themes@3.4.0': + dependencies: + '@shikijs/types': 3.4.0 + + '@shikijs/types@3.4.0': dependencies: - shiki: 1.4.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} '@sindresorhus/is@4.6.0': {} @@ -7864,6 +7930,20 @@ snapshots: stringify-entities: 4.0.4 zwitch: 2.0.4 + hast-util-to-html@9.0.5: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.2 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.1.0 + property-information: 7.0.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + hast-util-to-parse5@8.0.0: dependencies: '@types/hast': 3.0.4 @@ -7878,6 +7958,10 @@ snapshots: dependencies: '@types/hast': 3.0.4 + hast-util-to-string@3.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-to-text@4.0.1: dependencies: '@types/hast': 3.0.4 @@ -9058,6 +9142,14 @@ snapshots: dependencies: mimic-fn: 4.0.0 + oniguruma-parser@0.12.1: {} + + oniguruma-to-es@4.3.3: + dependencies: + oniguruma-parser: 0.12.1 + regex: 6.0.1 + regex-recursion: 6.0.2 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -9335,6 +9427,8 @@ snapshots: property-information@6.5.0: {} + property-information@7.0.0: {} + proto-list@1.2.4: {} psl@1.9.0: {} @@ -9444,6 +9538,16 @@ snapshots: extend-shallow: 3.0.2 safe-regex: 1.1.0 + regex-recursion@6.0.2: + dependencies: + regex-utilities: 2.3.0 + + regex-utilities@2.3.0: {} + + regex@6.0.1: + dependencies: + regex-utilities: 2.3.0 + registry-auth-token@5.1.0: dependencies: '@pnpm/npm-conf': 2.3.1 @@ -9759,9 +9863,16 @@ snapshots: shell-quote@1.8.2: {} - shiki@1.4.0: + shiki@3.4.0: dependencies: - '@shikijs/core': 1.4.0 + '@shikijs/core': 3.4.0 + '@shikijs/engine-javascript': 3.4.0 + '@shikijs/engine-oniguruma': 3.4.0 + '@shikijs/langs': 3.4.0 + '@shikijs/themes': 3.4.0 + '@shikijs/types': 3.4.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 signal-exit@3.0.7: {} diff --git a/tsconfig.json b/tsconfig.json index d9446599..c572822e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "checkJs": false, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "moduleResolution": "node", + "moduleResolution": "Bundler", "resolveJsonModule": false, "skipLibCheck": true, "sourceMap": true,