Pārlūkot izejas kodu

chore: generate

GitHub Action 1 mēnesi atpakaļ
vecāks
revīzija
825dfd48b1
1 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. 7 4
      nix/scripts/patch-wasm.ts

+ 7 - 4
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)