fix(web): import dependency-heavy Open VSX themes (#7642)

Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <[email protected]>
This commit is contained in:
t3-code[bot]andmaria authored and GitHub committed 2026-08-20 03:11:20 -04:00
1 parent f708f63fa9
commit beab6886f4
2 files changed
+7 -2

No files matched your search

+5
View File
@@ -293,6 +293,11 @@ describe("Open VSX themes", () => {
it("downloads a verified VSIX, reads JSONC includes, and pairs contributed variants", async () => {
const zip = new JSZip();
zip.file("extension/.gitkeep", "");
// Theme extensions sometimes publish their development dependencies too.
// Those unused files should not prevent importing the small theme payload.
for (let index = 0; index < 3_000; index += 1) {
zip.file(`extension/node_modules/package-${index}.js`, "");
}
zip.file(
"extension/themes/base.jsonc",
`{
+2 -2
View File
@@ -17,8 +17,8 @@ const MAX_DETAIL_BYTES = 256 * 1024;
const MAX_MANIFEST_BYTES = 256 * 1024;
const SEARCH_REQUEST_TIMEOUT_MS = 10_000;
const MAX_THEME_BYTES = 256 * 1024;
const MAX_ZIP_ENTRIES = 2_000;
const MAX_UNCOMPRESSED_BYTES = 50 * 1024 * 1024;
const MAX_ZIP_ENTRIES = 5_000;
const MAX_UNCOMPRESSED_BYTES = 100 * 1024 * 1024;
const MAX_COMPRESSION_RATIO = 200;
const MAX_THEMES_PER_EXTENSION = 40;
const MAX_INCLUDE_DEPTH = 8;