File no-comments-or-sourcemaps.patch of Package signal-desktop

--- 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'.
--- vendor/node_modules/@signalapp/libsignal-client/tsconfig.json.old
+++ vendor/node_modules/@signalapp/libsignal-client/tsconfig.json
@@ -5,7 +5,8 @@
     "declaration": true,
     "outDir": "./dist",
     "strict": true,
-    "sourceMap": true
+    "removeComments": true,
+    "sourceMap": false
   },
   "include": ["ts/**/*.ts"]
 }
--- Signal-Desktop-6.40.0/package.json.old
+++ Signal-Desktop-6.40.0/package.json
@@ -19,7 +19,7 @@
     "postinstall": "yarn build:acknowledgments && patch-package && yarn electron:install-app-deps",
     "postuninstall": "yarn build:acknowledgments",
     "start": "electron .",
-    "generate": "npm-run-all build-protobuf build:esbuild build:dns-fallback build:icu-types sass get-expire-time copy-components",
+    "generate": "npm-run-all build-protobuf build:esbuild:prod build:icu-types sass get-expire-time copy-components",
     "build-release": "yarn run build",
     "sign-release": "node ts/updater/generateSignature.js",
     "notarize": "echo 'No longer necessary'",
@@ -27,8 +27,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": "yarn build-module-protobuf",
     "clean-protobuf": "yarn 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',
+  minify: isProd,
   // Disabled even in dev because the debugger is broken
   sourcemap: false,
   // Otherwise React components get renamed
openSUSE Build Service is sponsored by