Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shiki to fix diff code highlighting #2338

Merged
merged 7 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lucky-feet-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': minor
---

Update shiki for code block syntax highlighting, with support for more languages and fixes for diffs. It also patches the deployment on Cloudflare to support edge functions larger than 4MB.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"@changesets/cli": "^2.27.7",
"prettier": "^3.0.3",
"turbo": "^2.0.9"
},
"patchedDependencies": {
"@vercel/[email protected]": "patches/@vercel%[email protected]"
}
}
2 changes: 1 addition & 1 deletion packages/gitbook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"remark-rehype": "^11.1.0",
"rison": "^0.1.1",
"server-only": "^0.0.1",
"shiki": "^1.2.0",
"shiki": "^1.11.1",
"tailwind-merge": "^2.2.0",
"tailwind-shades": "^1.1.2",
"unified": "^11.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
--shiki-token-string-expression: #6a4906;
--shiki-token-punctuation: theme('colors.pomegranate.700/.92');
--shiki-token-link: theme('colors.dark.DEFAULT');
--shiki-token-inserted: #22863a;
--shiki-token-deleted: #b31d28;
--shiki-token-changed: #8250df;
}

html.dark {
Expand All @@ -22,4 +25,7 @@ html.dark {
--shiki-token-string-expression: theme('colors.light.4');
--shiki-token-punctuation: #acc6ee;
--shiki-token-link: theme('colors.pomegranate.400');
--shiki-token-inserted: #85e89d;
--shiki-token-deleted: #fdaeb7;
--shiki-token-changed: #56b6c2;
}
13 changes: 13 additions & 0 deletions patches/@vercel%[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/index.js b/dist/index.js
index 7f9eaa2526e5fad42420f590bb733e5670766e63..302274144d28dde2b9ba8f9018281d2867f79299 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -9484,7 +9484,7 @@ var import_path = require("path");
// src/constants.ts
var KIB = 1024;
var MIB = 1024 * KIB;
-var EDGE_FUNCTION_SIZE_LIMIT = 4 * MIB;
+var EDGE_FUNCTION_SIZE_LIMIT = 10 * MIB;
var MAX_UNCOMPRESSED_LAMBDA_SIZE = 250 * MIB;
var LAMBDA_RESERVED_UNCOMPRESSED_SIZE = 2.5 * MIB;
var LAMBDA_RESERVED_COMPRESSED_SIZE = 250 * KIB;
Loading