The open source coding agent.
TypeScript
chore: generate
GitHub Action825dfd48b1a3
diff --git a/nix/scripts/patch-wasm.ts b/nix/scripts/patch-wasm.tsindex 75d6a73d9d0..88a06c2bd2b 100644--- a/nix/scripts/patch-wasm.ts+++ b/nix/scripts/patch-wasm.ts@@ -31,10 +31,13 @@ for (const [name, wasmPath] of byName) {next = next.replaceAll("tree-sitter.wasm", mainWasm).replaceAll("web-tree-sitter/tree-sitter.wasm", mainWasm)// Collapse any relative prefixes before absolute store paths (e.g., "../../../..//nix/store/...")-const nixStorePrefix = process.env.NIX_STORE || "/nix/store";+const nixStorePrefix = process.env.NIX_STORE || "/nix/store"next = next.replace(/(\.\/)+/g, "./")-next = next.replace(new RegExp(`(\\.\\.\\/)+\\/{1,2}(${nixStorePrefix.replace(/^\//, '').replace(/\//g, "\\/")}[^"']+)`, 'g'), '/$2')-next = next.replace(new RegExp(`(["'])\\/{2,}(\\/${nixStorePrefix.replace(/\//g, "\\/")}[^"']+)(["'])`, 'g'), '$1$2$3')-next = next.replace(new RegExp(`(["'])\\/\\/(${nixStorePrefix.replace(/\//g, "\\/")}[^"']+)(["'])`, 'g'), '$1$2$3')+next = next.replace(+ new RegExp(`(\\.\\.\\/)+\\/{1,2}(${nixStorePrefix.replace(/^\//, "").replace(/\//g, "\\/")}[^"']+)`, "g"),+ "/$2",+)+next = next.replace(new RegExp(`(["'])\\/{2,}(\\/${nixStorePrefix.replace(/\//g, "\\/")}[^"']+)(["'])`, "g"), "$1$2$3")+next = next.replace(new RegExp(`(["'])\\/\\/(${nixStorePrefix.replace(/\//g, "\\/")}[^"']+)(["'])`, "g"), "$1$2$3")if (next !== content) fs.writeFileSync(file, next)