File no-comments-pretty-printing-and-sourcemaps.patch of Package signal-desktop

Disable pretty-printing of generated code and do not output comments.
Also remove build:dns-fallback which is a completely broken build step which we need to download the output of (see prepare vendor script for details)



--- Signal-Desktop-6.40.0/tsconfig.json.old
+++ Signal-Desktop-6.40.0/tsconfig.json
@@ -18,6 +18,7 @@
     // "outFile": "./",                       // Concatenate and emit output to single file.
     // "outDir": "./",                        // Redirect output structure to the directory.
     "rootDir": "./", // Specify the root directory of input files. Use to control the output directory structure with --outDir.
+    "removeComments": true,
     // "removeComments": true,                // Do not emit comments to output.
     // "noEmit": true,                        // Do not emit outputs.
     // "importHelpers": true,                 // Import emit helpers from 'tslib'.
--- Signal-Desktop-7.15.0/package.json.orig	2024-07-03 02:24:08.000000000 +0200
+++ Signal-Desktop-7.15.0/package.json	2024-07-04 21:15:56.061981892 +0200
@@ -19,7 +19,7 @@
     "postinstall": "npm run build:acknowledgments && patch-package && npm run electron:install-app-deps",
     "postuninstall": "npm run build:acknowledgments",
     "start": "electron .",
-    "generate": "npm-run-all build-protobuf build:esbuild build:icu-types build:compact-locales sass get-expire-time copy-components",
+    "generate": "npm-run-all build-protobuf build:esbuild:prod build:icu-types build:compact-locales sass get-expire-time copy-components",
     "build-release": "npm run build",
     "sign-release": "node ts/updater/generateSignature.js",
     "notarize": "echo 'No longer necessary'",
@@ -31,8 +31,8 @@
     "mark-unusued-strings-deleted": "ts-node ./ts/scripts/mark-unused-strings-deleted.ts",
     "get-expire-time": "node ts/scripts/get-expire-time.js",
     "copy-components": "node ts/scripts/copy.js",
-    "sass": "sass stylesheets/manifest.scss:stylesheets/manifest.css stylesheets/manifest_bridge.scss:stylesheets/manifest_bridge.css",
-    "build-module-protobuf": "pbjs --target static-module --force-long --no-typeurl --no-verify --no-create --no-convert --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --no-comments --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js",
+    "sass": "sass --no-source-map --style=compressed stylesheets/manifest.scss:stylesheets/manifest.css stylesheets/manifest_bridge.scss:stylesheets/manifest_bridge.css",
+    "build-module-protobuf": "pbjs --target static-module --force-long --no-beautify --no-typeurl --no-verify --no-create --no-convert --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --no-comments --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js",
     "clean-module-protobuf": "rm -f ts/protobuf/compiled.d.ts ts/protobuf/compiled.js",
     "build-protobuf": "npm run build-module-protobuf",
     "clean-protobuf": "npm run clean-module-protobuf",
--- Signal-Desktop-6.40.0/scripts/esbuild.js.old
+++ Signal-Desktop-6.40.0/scripts/esbuild.js
@@ -14,6 +14,7 @@ const isProd = process.argv.some(argv =>
 const nodeDefaults = {
   platform: 'node',
   target: 'esnext',
+  minifyWhitespace: isProd,
   // Disabled even in dev because the debugger is broken
   sourcemap: false,
   // Otherwise React components get renamed
openSUSE Build Service is sponsored by