File do-not-gulp-all-memory.patch of Package code

Do not run multiple gulp tasks in parallel. It tries to run them in the same process, leading to OOM errors on 32-bit

--- a/build/gulpfile.js
+++ b/build/gulpfile.js
@@ -31,7 +31,7 @@
 gulp.task(watchClientTask);
 
 // All
-const _compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask, compileExtensionMediaTask));
+const _compileTask = task.define('compile', task.series(monacoTypecheckTask, compileClientTask, compileExtensionsTask, compileExtensionMediaTask));
 gulp.task(_compileTask);
 
 gulp.task(task.define('watch', task.parallel(/* monacoTypecheckWatchTask, */ watchClientTask, watchExtensionsTask)));
--- a/build/gulpfile.extensions.js
+++ b/build/gulpfile.extensions.js
@@ -204,7 +204,7 @@
 const transpileExtensionsTask = task.define('transpile-extensions', task.parallel(...tasks.map(t => t.transpileTask)));
 gulp.task(transpileExtensionsTask);
 
-const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask)));
+const compileExtensionsTask = task.define('compile-extensions', task.series(...tasks.map(t => t.compileTask)));
 gulp.task(compileExtensionsTask);
 exports.compileExtensionsTask = compileExtensionsTask;
 
--- a/package.json	2022-08-03 07:14:29.000000000 +0200
+++ b/package.json	2022-08-04 21:00:46.379379101 +0200
@@ -31,5 +31,5 @@
     "kill-watch-extensionsd": "deemon --kill yarn watch-extensions",
     "precommit": "node build/hygiene.js",
-    "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js",
+    "gulp": "node --max_old_space_size=4000 --optimize_for_size ./node_modules/gulp/bin/gulp.js",
     "electron": "node build/lib/electron",
     "7z": "7z",
openSUSE Build Service is sponsored by