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:
1 parent
f708f63fa9
commit
beab6886f4
2 files changed
+7
-2
No files matched your search
@@ -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",
|
||||
`{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user