diff --git a/compress/decompress.ts b/compress/decompress.ts index f1c9b6a..a8261a4 100644 --- a/compress/decompress.ts +++ b/compress/decompress.ts @@ -76,7 +76,7 @@ export async function decompress(inputs: Uint8Array[] | string[] = [], opts: Com // Compress all binary contents according to the compression map const compressedContent = await Promise.all( - contents.map((content) => compressionMap(content)) + contents.map((content) => compressionMap(content as Uint8Array)) ); // Convert sizes to human readable formats, e.g. 10000 bytes to 10MB diff --git a/compress/deno/zstd/zstd.deno.d.ts b/compress/deno/zstd/zstd.deno.d.ts new file mode 100644 index 0000000..2057d74 --- /dev/null +++ b/compress/deno/zstd/zstd.deno.d.ts @@ -0,0 +1,2 @@ +declare const Module: any; +export default Module; diff --git a/core/package.json b/core/package.json index 33b06b7..4f682db 100644 --- a/core/package.json +++ b/core/package.json @@ -35,6 +35,7 @@ "./plugins/tar": "./plugins/tar.ts" }, "dependencies": { + "@bundle/compress": "workspace:*", "@bundle/utils": "workspace:*", "@logtape/logtape": "npm:@jsr/logtape__logtape@^2", "@std/tar": "npm:@jsr/std__tar@^0", diff --git a/utils/resolve-conditions.ts b/utils/resolve-conditions.ts index 5b4e1dd..ade4265 100644 --- a/utils/resolve-conditions.ts +++ b/utils/resolve-conditions.ts @@ -199,8 +199,9 @@ export function detectRuntime(): ResolveRuntime | null { } // Check for Node.js with Electron - if (typeof globalThis?.process !== "undefined" && globalThis?.process?.versions) { - if (globalThis?.process?.versions?.electron) { + const processLike = (globalThis as unknown as { process?: any }).process; + if (typeof processLike !== "undefined" && processLike?.versions) { + if (processLike?.versions?.electron) { // Check if we're in main or renderer if (typeof window !== "undefined") { return "electron-renderer";