From f35e72479a47ee02d4110d0d16c4713298a3f30e Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sat, 24 Dec 2022 23:44:25 +0100 Subject: [PATCH] update shiki to v0.12.1 (#940) --- .changeset/plenty-experts-push.md | 5 ++ docs/pages/docs/guide/syntax-highlighting.mdx | 2 - packages/nextra/package.json | 4 +- packages/nextra/src/theme.json | 2 +- packages/nextra/styles/variables.css | 2 - pnpm-lock.yaml | 67 +++++++++---------- 6 files changed, 38 insertions(+), 44 deletions(-) create mode 100644 .changeset/plenty-experts-push.md diff --git a/.changeset/plenty-experts-push.md b/.changeset/plenty-experts-push.md new file mode 100644 index 0000000000..10a3b138b2 --- /dev/null +++ b/.changeset/plenty-experts-push.md @@ -0,0 +1,5 @@ +--- +'nextra': patch +--- + +update shiki to v0.12.1 diff --git a/docs/pages/docs/guide/syntax-highlighting.mdx b/docs/pages/docs/guide/syntax-highlighting.mdx index 72eb6b9ddc..864ec3eec8 100644 --- a/docs/pages/docs/guide/syntax-highlighting.mdx +++ b/docs/pages/docs/guide/syntax-highlighting.mdx @@ -141,8 +141,6 @@ Nextra uses CSS variables to define the colors for tokens. You can inject a [glo --shiki-token-string-expression: #22863a; --shiki-token-punctuation: #212121; --shiki-token-link: #22863a; - --nextra-shiki-deleted: #f00; - --nextra-shiki-inserted: #f00; } .dark { diff --git a/packages/nextra/package.json b/packages/nextra/package.json index 6c968f942f..c91224bc6e 100644 --- a/packages/nextra/package.json +++ b/packages/nextra/package.json @@ -76,7 +76,7 @@ "format": "prettier --ignore-path ../../.gitignore --write --list-different ." }, "dependencies": { - "@mdx-js/mdx": "^2.1.3", + "@mdx-js/mdx": "^2.1.5", "@napi-rs/simple-git": "^0.1.8", "github-slugger": "^2.0.0", "graceful-fs": "^4.2.10", @@ -85,7 +85,7 @@ "rehype-pretty-code": "0.6.0", "remark-gfm": "^3.0.1", "remark-reading-time": "^2.0.1", - "shiki": "0.10.1", + "shiki": "0.12.1", "slash": "^3.0.0", "title": "^3.5.3", "unist-util-visit": "^4.1.1" diff --git a/packages/nextra/src/theme.json b/packages/nextra/src/theme.json index 36a7e6d8e6..f3fafff909 100644 --- a/packages/nextra/src/theme.json +++ b/packages/nextra/src/theme.json @@ -1,6 +1,6 @@ { "name": "css-variables", - "type": "light", + "type": "css", "colors": { "editor.foreground": "#000001", "editor.background": "#000002" diff --git a/packages/nextra/styles/variables.css b/packages/nextra/styles/variables.css index 6f5f0765c1..353566d711 100644 --- a/packages/nextra/styles/variables.css +++ b/packages/nextra/styles/variables.css @@ -10,8 +10,6 @@ --shiki-token-string-expression: #22863a; --shiki-token-punctuation: #212121; --shiki-token-link: #22863a; - --nextra-shiki-deleted: #f00; - --nextra-shiki-inserted: #f00; } .dark { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bfed2d87d5..6b28655c33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,7 +124,7 @@ importers: packages/nextra: specifiers: - '@mdx-js/mdx': ^2.1.3 + '@mdx-js/mdx': ^2.1.5 '@napi-rs/simple-git': ^0.1.8 '@types/github-slugger': ^1.3.0 '@types/graceful-fs': ^4.1.5 @@ -142,23 +142,23 @@ importers: rehype-pretty-code: 0.6.0 remark-gfm: ^3.0.1 remark-reading-time: ^2.0.1 - shiki: 0.10.1 + shiki: 0.12.1 slash: ^3.0.0 title: ^3.5.3 unified: ^10.1.2 unist-util-visit: ^4.1.1 vitest: ^0.21.0 dependencies: - '@mdx-js/mdx': 2.1.3 + '@mdx-js/mdx': 2.2.1 '@napi-rs/simple-git': 0.1.8 github-slugger: 2.0.0 graceful-fs: 4.2.10 gray-matter: 4.0.3 rehype-mdx-title: 2.0.0 - rehype-pretty-code: 0.6.0_shiki@0.10.1 + rehype-pretty-code: 0.6.0_shiki@0.12.1 remark-gfm: 3.0.1 remark-reading-time: 2.0.1 - shiki: 0.10.1 + shiki: 0.12.1 slash: 3.0.0 title: 3.5.3 unist-util-visit: 4.1.1 @@ -638,8 +638,8 @@ packages: read-yaml-file: 1.1.0 dev: true - /@mdx-js/mdx/2.1.3: - resolution: {integrity: sha512-ahbb47HJIJ4xnifaL06tDJiSyLEy1EhFAStO7RZIm3GTa7yGW3NGhZaj+GUCveFgl5oI54pY4BgiLmYm97y+zg==} + /@mdx-js/mdx/2.2.1: + resolution: {integrity: sha512-hZ3ex7exYLJn6FfReq8yTvA6TE53uW9UHJQM9IlSauOuS55J9y8RtA7W+dzp6Yrzr00/U1sd7q+Wf61q6SfiTQ==} dependencies: '@types/estree-jsx': 1.0.0 '@types/mdx': 2.0.2 @@ -995,13 +995,13 @@ packages: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: '@types/eslint': 8.4.5 - '@types/estree': 0.0.51 + '@types/estree': 1.0.0 dev: true /@types/eslint/8.4.5: resolution: {integrity: sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==} dependencies: - '@types/estree': 0.0.51 + '@types/estree': 1.0.0 '@types/json-schema': 7.0.11 dev: true @@ -1022,7 +1022,6 @@ packages: /@types/estree/1.0.0: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} - dev: false /@types/flexsearch/0.7.3: resolution: {integrity: sha512-HXwADeHEP4exXkCIwy2n1+i0f1ilP1ETQOH5KDOugjkTFZPntWo0Gr8stZOaebkxsdx+k0X/K6obU/+it07ocg==} @@ -1337,12 +1336,12 @@ packages: resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} dev: true - /acorn-import-assertions/1.8.0_acorn@8.7.1: + /acorn-import-assertions/1.8.0_acorn@8.8.0: resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==} peerDependencies: acorn: ^8 dependencies: - acorn: 8.7.1 + acorn: 8.8.0 dev: true /acorn-jsx/5.3.2_acorn@8.8.0: @@ -1371,12 +1370,6 @@ packages: hasBin: true dev: true - /acorn/8.7.1: - resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /acorn/8.8.0: resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} engines: {node: '>=0.4.0'} @@ -3443,8 +3436,8 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true - /jsonc-parser/3.1.0: - resolution: {integrity: sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==} + /jsonc-parser/3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: false /jsonfile/4.0.0: @@ -4981,7 +4974,7 @@ packages: unist-util-visit: 4.1.1 dev: false - /rehype-pretty-code/0.6.0_shiki@0.10.1: + /rehype-pretty-code/0.6.0_shiki@0.12.1: resolution: {integrity: sha512-VfntYoWYOBVURXYDdB8p/E1sZTm2W5ry89fJyY94WJAo1jUH/5sVhDC7cX5PPnksMyW9PYMxRLNfjkBpSgJrzQ==} engines: {node: ^12.16.0 || >=13.2.0} peerDependencies: @@ -4990,7 +4983,7 @@ packages: hash-obj: 4.0.0 nanoid: 4.0.0 parse-numeric-range: 1.3.0 - shiki: 0.10.1 + shiki: 0.12.1 dev: false /remark-gfm/3.0.1: @@ -5197,12 +5190,12 @@ packages: resolution: {integrity: sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==} dev: true - /shiki/0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + /shiki/0.12.1: + resolution: {integrity: sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==} dependencies: - jsonc-parser: 3.1.0 - vscode-oniguruma: 1.6.2 - vscode-textmate: 5.2.0 + jsonc-parser: 3.2.0 + vscode-oniguruma: 1.7.0 + vscode-textmate: 8.0.0 dev: false /side-channel/1.0.4: @@ -5526,7 +5519,7 @@ packages: hasBin: true dependencies: '@jridgewell/source-map': 0.3.2 - acorn: 8.7.1 + acorn: 8.8.0 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -6103,12 +6096,12 @@ packages: - supports-color dev: true - /vscode-oniguruma/1.6.2: - resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} + /vscode-oniguruma/1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: false - /vscode-textmate/5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + /vscode-textmate/8.0.0: + resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: false /watchpack/2.4.0: @@ -6149,8 +6142,8 @@ packages: '@webassemblyjs/ast': 1.11.1 '@webassemblyjs/wasm-edit': 1.11.1 '@webassemblyjs/wasm-parser': 1.11.1 - acorn: 8.7.1 - acorn-import-assertions: 1.8.0_acorn@8.7.1 + acorn: 8.8.0 + acorn-import-assertions: 1.8.0_acorn@8.8.0 browserslist: 4.21.2 chrome-trace-event: 1.0.3 enhanced-resolve: 5.10.0 @@ -6401,7 +6394,7 @@ packages: react: '>=16.13.1' react-dom: '>=16.13.1' dependencies: - '@mdx-js/mdx': 2.1.3 + '@mdx-js/mdx': 2.2.1 '@napi-rs/simple-git': 0.1.8 github-slugger: 2.0.0 graceful-fs: 4.2.10 @@ -6410,10 +6403,10 @@ packages: react: 18.2.0 react-dom: 18.2.0_react@18.2.0 rehype-mdx-title: 2.0.0 - rehype-pretty-code: 0.6.0_shiki@0.10.1 + rehype-pretty-code: 0.6.0_shiki@0.12.1 remark-gfm: 3.0.1 remark-reading-time: 2.0.1 - shiki: 0.10.1 + shiki: 0.12.1 slash: 3.0.0 title: 3.5.3 unist-util-visit: 4.1.1