File compileTreeSitterWasm-local.patch of Package nodejs-vscode-tree-sitter-wasm

--- vscode-tree-sitter-wasm-0.1.3/build/compileTreeSitterWasm.ts.orig	2025-02-19 10:58:02.000000000 +0100
+++ vscode-tree-sitter-wasm-0.1.3/build/compileTreeSitterWasm.ts	2025-03-08 09:34:02.448883641 +0100
@@ -13,21 +13,11 @@ export function ensureTreeSitterWasm(rep
     const treeSitterRepoPath = clone(repo, tag, undefined, repoSubpath, clonePath);
 
     console.log('Updating wasmtime');
-    child_process.execSync('cargo update -p wasmtime', {
-        cwd: treeSitterRepoPath,
-        stdio: 'inherit',
-        encoding: 'utf-8'
-    });
 
     const builtWasmPath = path.join(treeSitterRepoPath, 'lib/binding_web');
 
 
     console.log('Installing dependencies');
-    child_process.execSync('npm install', {
-        cwd: builtWasmPath,
-        stdio: 'inherit',
-        encoding: 'utf-8'
-    });
 
     console.log('Executing build-wasm script');
     child_process.execSync('npm run build', {
--- vscode-tree-sitter-wasm-0.1.3/build/git.ts.orig	2025-02-19 10:58:02.000000000 +0100
+++ vscode-tree-sitter-wasm-0.1.3/build/git.ts	2025-03-08 09:43:49.808771456 +0100
@@ -4,29 +4,17 @@
  *--------------------------------------------------------------------------------------------*/
 
 import * as path from 'path';
-import * as fs from 'fs';
-import * as child_process from 'child_process';
 
 export function clone(repo: string, tag: string | undefined, commit: string | undefined, repoSubpath: string, clonePath: string): string {
     const repoPath = path.join(clonePath, repoSubpath);
     try {
-        fs.rmSync(repoPath, { recursive: true });
     } catch (e) {
         // Ignore.
     }
     const command = `git clone ${tag ? `--branch ${tag} ` : ''}${repo} ${repoSubpath} ${commit ? '' : '--depth 1 '}--single-branch --no-tags`;
     console.log(`Executing: ${command}`);
-    child_process.execSync(command, {
-        stdio: 'inherit',
-        cwd: clonePath,
-        encoding: 'utf8'
-    });
 
     if (commit) {
-        child_process.execSync(`git checkout ${commit}`, {
-            stdio: 'inherit',
-            cwd: repoPath,
-            encoding: 'utf8'});
     }
 
     return repoPath;
openSUSE Build Service is sponsored by