Update prettier to 3.3.3

This commit is contained in:
Fedor Indutny 2024-07-23 17:57:14 -07:00 committed by GitHub
parent 2c0df0e9be
commit 1fca1473a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
113 changed files with 462 additions and 406 deletions

View file

@ -2348,12 +2348,15 @@ async function requestShutdown() {
// exits the app before we've set everything up in preload() (so the browser isn't // exits the app before we've set everything up in preload() (so the browser isn't
// yet listening for these events), or if there are a whole lot of stacked-up tasks. // yet listening for these events), or if there are a whole lot of stacked-up tasks.
// Note: two minutes is also our timeout for SQL tasks in data.js in the browser. // Note: two minutes is also our timeout for SQL tasks in data.js in the browser.
timeout = setTimeout(() => { timeout = setTimeout(
() => {
getLogger().error( getLogger().error(
'requestShutdown: Response never received; forcing shutdown.' 'requestShutdown: Response never received; forcing shutdown.'
); );
resolveFn(); resolveFn();
}, 2 * 60 * 1000); },
2 * 60 * 1000
);
}); });
try { try {

View file

@ -1,7 +1,7 @@
<!-- Copyright 2014 Signal Messenger, LLC --> <!-- Copyright 2014 Signal Messenger, LLC -->
<!-- SPDX-License-Identifier: AGPL-3.0-only --> <!-- SPDX-License-Identifier: AGPL-3.0-only -->
<!DOCTYPE html> <!doctype html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View file

@ -1,5 +1,5 @@
<!-- Derived from Chromium WebRTC Internals Dashboard - see Acknowledgements for full license details --> <!-- Derived from Chromium WebRTC Internals Dashboard - see Acknowledgements for full license details -->
<!DOCTYPE html> <!doctype html>
<html dir="auto"> <html dir="auto">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View file

@ -1,7 +1,7 @@
<!-- Copyright 2020 Signal Messenger, LLC --> <!-- Copyright 2020 Signal Messenger, LLC -->
<!-- SPDX-License-Identifier: AGPL-3.0-only --> <!-- SPDX-License-Identifier: AGPL-3.0-only -->
<!DOCTYPE html> <!doctype html>
<html> <html>
<head> <head>
<meta <meta

233
package-lock.json generated
View file

@ -126,9 +126,9 @@
"@electron/fuses": "1.5.0", "@electron/fuses": "1.5.0",
"@electron/notarize": "2.1.0", "@electron/notarize": "2.1.0",
"@formatjs/intl": "2.6.7", "@formatjs/intl": "2.6.7",
"@indutny/parallel-prettier": "3.0.0",
"@indutny/rezip-electron": "1.3.1", "@indutny/rezip-electron": "1.3.1",
"@indutny/symbolicate-mac": "2.3.0", "@indutny/symbolicate-mac": "2.3.0",
"@mixer/parallel-prettier": "2.0.3",
"@signalapp/mock-server": "6.6.0", "@signalapp/mock-server": "6.6.0",
"@storybook/addon-a11y": "8.1.11", "@storybook/addon-a11y": "8.1.11",
"@storybook/addon-actions": "8.1.11", "@storybook/addon-actions": "8.1.11",
@ -236,7 +236,7 @@
"pixelmatch": "5.3.0", "pixelmatch": "5.3.0",
"playwright": "1.45.0", "playwright": "1.45.0",
"pngjs": "7.0.0", "pngjs": "7.0.0",
"prettier": "2.8.0", "prettier": "3.3.3",
"protobufjs-cli": "1.1.1", "protobufjs-cli": "1.1.1",
"resedit": "2.0.2", "resedit": "2.0.2",
"resolve-url-loader": "5.0.0", "resolve-url-loader": "5.0.0",
@ -4048,6 +4048,36 @@
"node": ">=10.0.0" "node": ">=10.0.0"
} }
}, },
"node_modules/@indutny/parallel-prettier": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@indutny/parallel-prettier/-/parallel-prettier-3.0.0.tgz",
"integrity": "sha512-v6WkYfLUYfDELBsynhrMpDxLMZZ7LRhfB1hfeb4ERoViW5zb7aovfAsNjiZrWH4k0KZcCi3iMNF+d9i8h0UmzA==",
"dev": true,
"dependencies": {
"chalk": "^4.1.0",
"commander": "^7.0.0",
"glob-stream": "^7.0.0",
"ignore": "^5.1.8",
"ora": "^5.3.0",
"prettier": "^3.0.3",
"rxjs": "^6.6.3"
},
"bin": {
"pprettier": "dist/index.js"
},
"peerDependencies": {
"prettier": "^3.0.0"
}
},
"node_modules/@indutny/parallel-prettier/node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true,
"engines": {
"node": ">= 10"
}
},
"node_modules/@indutny/rezip-electron": { "node_modules/@indutny/rezip-electron": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/@indutny/rezip-electron/-/rezip-electron-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@indutny/rezip-electron/-/rezip-electron-1.3.1.tgz",
@ -4990,36 +5020,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/@mixer/parallel-prettier": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@mixer/parallel-prettier/-/parallel-prettier-2.0.3.tgz",
"integrity": "sha512-42ImvDusmxjpQLHEmZrljV/+L9ynfmaTe5ooLMTTLyELulUJtJW8vBXCadQdodfZ5wjr2Sg3YGIzWE0rnBsfDg==",
"dev": true,
"dependencies": {
"chalk": "^4.1.0",
"commander": "^7.0.0",
"glob-stream": "^7.0.0",
"ignore": "^5.1.8",
"ora": "^5.3.0",
"prettier": "^2.0.4",
"rxjs": "^6.6.3"
},
"bin": {
"pprettier": "dist/index.js"
},
"peerDependencies": {
"prettier": "^2.0.0"
}
},
"node_modules/@mixer/parallel-prettier/node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true,
"engines": {
"node": ">= 10"
}
},
"node_modules/@ndelangen/get-tarball": { "node_modules/@ndelangen/get-tarball": {
"version": "3.0.9", "version": "3.0.9",
"resolved": "https://registry.npmjs.org/@ndelangen/get-tarball/-/get-tarball-3.0.9.tgz", "resolved": "https://registry.npmjs.org/@ndelangen/get-tarball/-/get-tarball-3.0.9.tgz",
@ -5327,6 +5327,18 @@
"node": ">=14" "node": ">=14"
} }
}, },
"node_modules/@pkgr/core": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
"integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
"dev": true,
"engines": {
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/unts"
}
},
"node_modules/@popperjs/core": { "node_modules/@popperjs/core": {
"version": "2.11.6", "version": "2.11.6",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
@ -8620,21 +8632,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/@storybook/cli/node_modules/prettier": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/@storybook/cli/node_modules/semver": { "node_modules/@storybook/cli/node_modules/semver": {
"version": "7.6.2", "version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
@ -8782,21 +8779,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/@storybook/codemod/node_modules/prettier": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/@storybook/codemod/node_modules/semver": { "node_modules/@storybook/codemod/node_modules/semver": {
"version": "6.3.1", "version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
@ -17883,21 +17865,21 @@
"dev": true "dev": true
}, },
"node_modules/duplexify": { "node_modules/duplexify": {
"version": "4.1.2", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz",
"integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==", "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"end-of-stream": "^1.4.1", "end-of-stream": "^1.4.1",
"inherits": "^2.0.3", "inherits": "^2.0.3",
"readable-stream": "^3.1.1", "readable-stream": "^3.1.1",
"stream-shift": "^1.0.0" "stream-shift": "^1.0.2"
} }
}, },
"node_modules/duplexify/node_modules/readable-stream": { "node_modules/duplexify/node_modules/readable-stream": {
"version": "3.6.0", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"inherits": "^2.0.3", "inherits": "^2.0.3",
@ -17908,15 +17890,6 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/duplexify/node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/eastasianwidth": { "node_modules/eastasianwidth": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
@ -19747,19 +19720,33 @@
} }
}, },
"node_modules/eslint-plugin-prettier": { "node_modules/eslint-plugin-prettier": {
"version": "3.1.4", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz",
"integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==", "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"prettier-linter-helpers": "^1.0.0" "prettier-linter-helpers": "^1.0.0",
"synckit": "^0.9.1"
}, },
"engines": { "engines": {
"node": ">=6.0.0" "node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint-plugin-prettier"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": ">=5.0.0", "@types/eslint": ">=8.0.0",
"prettier": ">=1.13.0" "eslint": ">=8.0.0",
"eslint-config-prettier": "*",
"prettier": ">=3.0.0"
},
"peerDependenciesMeta": {
"@types/eslint": {
"optional": true
},
"eslint-config-prettier": {
"optional": true
}
} }
}, },
"node_modules/eslint-plugin-react": { "node_modules/eslint-plugin-react": {
@ -21697,16 +21684,16 @@
} }
}, },
"node_modules/glob-stream/node_modules/glob": { "node_modules/glob-stream/node_modules/glob": {
"version": "7.2.0", "version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported", "deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
"inflight": "^1.0.4", "inflight": "^1.0.4",
"inherits": "2", "inherits": "2",
"minimatch": "^3.0.4", "minimatch": "^3.1.1",
"once": "^1.3.0", "once": "^1.3.0",
"path-is-absolute": "^1.0.0" "path-is-absolute": "^1.0.0"
}, },
@ -21730,9 +21717,9 @@
} }
}, },
"node_modules/glob-stream/node_modules/readable-stream": { "node_modules/glob-stream/node_modules/readable-stream": {
"version": "3.6.0", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"inherits": "^2.0.3", "inherits": "^2.0.3",
@ -21743,15 +21730,6 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/glob-stream/node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/glob-to-regexp": { "node_modules/glob-to-regexp": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
@ -30059,15 +30037,15 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "2.8.0", "version": "3.3.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
"integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==", "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
"dev": true, "dev": true,
"bin": { "bin": {
"prettier": "bin-prettier.js" "prettier": "bin/prettier.cjs"
}, },
"engines": { "engines": {
"node": ">=10.13.0" "node": ">=14"
}, },
"funding": { "funding": {
"url": "https://github.com/prettier/prettier?sponsor=1" "url": "https://github.com/prettier/prettier?sponsor=1"
@ -32288,9 +32266,9 @@
} }
}, },
"node_modules/rxjs/node_modules/tslib": { "node_modules/rxjs/node_modules/tslib": {
"version": "1.10.0", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true "dev": true
}, },
"node_modules/safe-buffer": { "node_modules/safe-buffer": {
@ -33342,9 +33320,9 @@
} }
}, },
"node_modules/stream-shift": { "node_modules/stream-shift": {
"version": "1.0.0", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz",
"integrity": "sha512-Afuc4BKirbx0fwm9bKOehZPG01DJkm/4qbklw4lo9nMPqd2x0kZTLcgwQUXdGiPPY489l3w8cQ5xEEAGbg8ACQ==", "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==",
"dev": true "dev": true
}, },
"node_modules/streamsearch": { "node_modules/streamsearch": {
@ -34107,6 +34085,28 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/synckit": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz",
"integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==",
"dev": true,
"dependencies": {
"@pkgr/core": "^0.1.0",
"tslib": "^2.6.2"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/unts"
}
},
"node_modules/synckit/node_modules/tslib": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
"dev": true
},
"node_modules/tabbable": { "node_modules/tabbable": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.2.1.tgz", "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.2.1.tgz",
@ -34491,15 +34491,6 @@
"xtend": "~4.0.0" "xtend": "~4.0.0"
} }
}, },
"node_modules/through2-filter/node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true,
"engines": {
"node": ">=0.4"
}
},
"node_modules/thunky": { "node_modules/thunky": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz",

View file

@ -208,9 +208,9 @@
"@electron/fuses": "1.5.0", "@electron/fuses": "1.5.0",
"@electron/notarize": "2.1.0", "@electron/notarize": "2.1.0",
"@formatjs/intl": "2.6.7", "@formatjs/intl": "2.6.7",
"@indutny/parallel-prettier": "3.0.0",
"@indutny/rezip-electron": "1.3.1", "@indutny/rezip-electron": "1.3.1",
"@indutny/symbolicate-mac": "2.3.0", "@indutny/symbolicate-mac": "2.3.0",
"@mixer/parallel-prettier": "2.0.3",
"@signalapp/mock-server": "6.6.0", "@signalapp/mock-server": "6.6.0",
"@storybook/addon-a11y": "8.1.11", "@storybook/addon-a11y": "8.1.11",
"@storybook/addon-actions": "8.1.11", "@storybook/addon-actions": "8.1.11",
@ -318,7 +318,7 @@
"pixelmatch": "5.3.0", "pixelmatch": "5.3.0",
"playwright": "1.45.0", "playwright": "1.45.0",
"pngjs": "7.0.0", "pngjs": "7.0.0",
"prettier": "2.8.0", "prettier": "3.3.3",
"protobufjs-cli": "1.1.1", "protobufjs-cli": "1.1.1",
"resedit": "2.0.2", "resedit": "2.0.2",
"resolve-url-loader": "5.0.0", "resolve-url-loader": "5.0.0",
@ -350,6 +350,9 @@
}, },
"@types/react": "17.0.45", "@types/react": "17.0.45",
"@types/react-dom": "17.0.17", "@types/react-dom": "17.0.17",
"eslint-config-airbnb-typescript-prettier": {
"eslint-plugin-prettier": "5.2.1"
},
"fabric": { "fabric": {
"canvas": "$nop", "canvas": "$nop",
"jsdom": "$nop" "jsdom": "$nop"

View file

@ -193,7 +193,7 @@ async function main() {
].join('\n'); ].join('\n');
const prettierConfig = await prettier.resolveConfig(destinationPath); const prettierConfig = await prettier.resolveConfig(destinationPath);
const output = prettier.format(unformattedOutput, { const output = await prettier.format(unformattedOutput, {
...prettierConfig, ...prettierConfig,
filepath: destinationPath, filepath: destinationPath,
}); });

View file

@ -12,8 +12,17 @@
} }
/* Farsi (Persian) */ /* Farsi (Persian) */
&:lang(fa) { &:lang(fa) {
font-family: 'Vazirmatn', -apple-system, system-ui, BlinkMacSystemFont, font-family:
'Segoe UI', Tahoma, 'Noto Sans Arabic', Helvetica, Arial, sans-serif; 'Vazirmatn',
-apple-system,
system-ui,
BlinkMacSystemFont,
'Segoe UI',
Tahoma,
'Noto Sans Arabic',
Helvetica,
Arial,
sans-serif;
} }
/* Urdu */ /* Urdu */
&:lang(ur) { &:lang(ur) {
@ -316,7 +325,9 @@ $rtl-icon-map: (
// Other // Other
@mixin popper-shadow() { @mixin popper-shadow() {
box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3), 0px 0px 8px rgba(0, 0, 0, 0.05); box-shadow:
0px 8px 20px rgba(0, 0, 0, 0.3),
0px 0px 8px rgba(0, 0, 0, 0.05);
@media (forced-colors: active) { @media (forced-colors: active) {
border: 1px solid WindowText; border: 1px solid WindowText;

View file

@ -408,7 +408,9 @@ $message-padding-horizontal: 12px;
background: transparent; background: transparent;
border: 1px solid $color-gray-20; border: 1px solid $color-gray-20;
animation: module-message__select-checkbox--fadeIn 0.2s ease-out; animation: module-message__select-checkbox--fadeIn 0.2s ease-out;
transition: background 0.1s ease-out, border-color 0.1s ease-out; transition:
background 0.1s ease-out,
border-color 0.1s ease-out;
&::before { &::before {
content: ''; content: '';
@ -4024,8 +4026,12 @@ button.module-image__border-overlay:focus {
line-height: 0; line-height: 0;
overflow: hidden; overflow: hidden;
border-radius: 10px; border-radius: 10px;
transition: top 200ms linear, inset-inline-start 200ms linear, transition:
transform 200ms linear, width 200ms linear, height 200ms linear; top 200ms linear,
inset-inline-start 200ms linear,
transform 200ms linear,
width 200ms linear,
height 200ms linear;
@media (prefers-reduced-motion) { @media (prefers-reduced-motion) {
transition: none; transition: none;
@ -4295,7 +4301,9 @@ button.module-image__border-overlay:focus {
backface-visibility: hidden; backface-visibility: hidden;
background-color: $color-gray-95; background-color: $color-gray-95;
border-radius: 4px; border-radius: 4px;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.05), 0px 8px 20px rgba(0, 0, 0, 0.3); box-shadow:
0px 0px 8px rgba(0, 0, 0, 0.05),
0px 8px 20px rgba(0, 0, 0, 0.3);
cursor: grab; cursor: grab;
height: 158px; height: 158px;
position: fixed; position: fixed;

View file

@ -2,8 +2,18 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
// Note: Add language-specific fallbacks in @localized-fonts mixin // Note: Add language-specific fallbacks in @localized-fonts mixin
$inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui, $inter:
'Segoe UI', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; Inter,
'Source Sans Pro',
'Source Han Sans',
-apple-system,
system-ui,
'Segoe UI',
'Noto Sans',
'Helvetica Neue',
Helvetica,
Arial,
sans-serif;
// Note: This font-family is checked for in matchMonospace, to support paste scenarios // Note: This font-family is checked for in matchMonospace, to support paste scenarios
$monospace: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, $monospace: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo,

View file

@ -53,7 +53,9 @@
background: $color-gray-02; background: $color-gray-02;
border-radius: 100%; border-radius: 100%;
bottom: 4px; bottom: 4px;
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2); box-shadow:
0px 4px 16px rgba(0, 0, 0, 0.12),
0px 2px 4px rgba(0, 0, 0, 0.2);
display: flex; display: flex;
height: 28px; height: 28px;
justify-content: center; justify-content: center;
@ -75,7 +77,9 @@
align-items: center; align-items: center;
background-color: $color-white; background-color: $color-white;
border-radius: 100%; border-radius: 100%;
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2); box-shadow:
0px 4px 16px rgba(0, 0, 0, 0.12),
0px 2px 4px rgba(0, 0, 0, 0.2);
display: flex; display: flex;
height: 24px; height: 24px;
justify-content: center; justify-content: center;

View file

@ -60,7 +60,9 @@
align-items: center; align-items: center;
background-color: $color-white; background-color: $color-white;
border-radius: 100%; border-radius: 100%;
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2); box-shadow:
0px 4px 16px rgba(0, 0, 0, 0.12),
0px 2px 4px rgba(0, 0, 0, 0.2);
display: none; display: none;
height: 20px; height: 20px;
justify-content: center; justify-content: center;

View file

@ -4,7 +4,9 @@
.module-Button { .module-Button {
@mixin focus-box-shadow($inner-color, $outer-color) { @mixin focus-box-shadow($inner-color, $outer-color) {
&:focus { &:focus {
box-shadow: 0 0 0 1px $inner-color, 0 0 0 4px $outer-color; box-shadow:
0 0 0 1px $inner-color,
0 0 0 4px $outer-color;
} }
} }

View file

@ -97,7 +97,9 @@
@include keyboard-mode { @include keyboard-mode {
&:focus { &:focus {
box-shadow: 0 0 0 1px $color-gray-80, 0 0 0 3px $color-ultramarine !important; box-shadow:
0 0 0 1px $color-gray-80,
0 0 0 3px $color-ultramarine !important;
} }
} }
} }

View file

@ -147,7 +147,9 @@
max-width: 64px; max-width: 64px;
margin-inline: 10px; margin-inline: 10px;
transition: margin-inline-start 0.3s ease-out, opacity 0.3s ease-out; transition:
margin-inline-start 0.3s ease-out,
opacity 0.3s ease-out;
@media (prefers-reduced-motion) { @media (prefers-reduced-motion) {
transition: none; transition: none;
} }

View file

@ -119,7 +119,9 @@
&:focus { &:focus {
outline: none; outline: none;
@include keyboard-mode { @include keyboard-mode {
box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-ultramarine; box-shadow:
0 0 0 2px $color-white,
0 0 0 4px $color-ultramarine;
} }
} }

View file

@ -140,7 +140,9 @@
transition: opacity ease 200ms; transition: opacity ease 200ms;
// The same box-shadow in popper-shadow mixin, just halved // The same box-shadow in popper-shadow mixin, just halved
box-shadow: 0px 4px 10px rgba(0, 0, 0, 30%), 0px 0px 4px rgba(0, 0, 0, 5%); box-shadow:
0px 4px 10px rgba(0, 0, 0, 30%),
0px 0px 4px rgba(0, 0, 0, 5%);
@include light-theme() { @include light-theme() {
background: $color-white; background: $color-white;

View file

@ -156,7 +156,9 @@
margin-inline-end: var(--button-spacing); margin-inline-end: var(--button-spacing);
min-width: $icon-size; min-width: $icon-size;
padding: 2px; padding: 2px;
transition: margin-inline-end 200ms ease-out, opacity 200ms ease-out, transition:
margin-inline-end 200ms ease-out,
opacity 200ms ease-out,
background 100ms ease-out; background 100ms ease-out;
width: $icon-size; width: $icon-size;

View file

@ -61,7 +61,9 @@
} }
.Inbox__logo__part--animated { .Inbox__logo__part--animated {
transition: opacity 250ms, transform 250ms; transition:
opacity 250ms,
transform 250ms;
} }
@for $i from 1 through 16 { @for $i from 1 through 16 {

View file

@ -17,7 +17,9 @@
align-items: center; align-items: center;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
box-shadow: 0 1px 4px $color-black-alpha-05, 0 10px 16px $color-black-alpha-20; box-shadow:
0 1px 4px $color-black-alpha-05,
0 10px 16px $color-black-alpha-20;
display: inline-flex; display: inline-flex;
flex-direction: row; flex-direction: row;
padding-block: 3px; padding-block: 3px;

View file

@ -204,12 +204,16 @@ $SafetyTipsModal__paddingBlock: 24px;
&:focus { &:focus {
@include keyboard-mode { @include keyboard-mode {
&::before { &::before {
box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-accent-blue; box-shadow:
0 0 0 2px $color-white,
0 0 0 4px $color-accent-blue;
} }
} }
@include dark-keyboard-mode { @include dark-keyboard-mode {
&::before { &::before {
box-shadow: 0 0 0 2px $color-gray-80, 0 0 0 4px $color-accent-blue; box-shadow:
0 0 0 2px $color-gray-80,
0 0 0 4px $color-accent-blue;
} }
} }
} }

View file

@ -14,7 +14,8 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0px 0px 2px $color-black-alpha-20, box-shadow:
0px 0px 2px $color-black-alpha-20,
0px 2px 6px $color-black-alpha-12; 0px 2px 6px $color-black-alpha-12;
@include light-theme { @include light-theme {

View file

@ -8,7 +8,9 @@
align-items: stretch; align-items: stretch;
border-radius: $border-radius-px; border-radius: $border-radius-px;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.05), 0px 4px 12px rgba(0, 0, 0, 0.3); box-shadow:
0px 0px 4px rgba(0, 0, 0, 0.05),
0px 4px 12px rgba(0, 0, 0, 0.3);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
user-select: none; user-select: none;

View file

@ -22,7 +22,9 @@
width: 2px; width: 2px;
border-radius: 2px; border-radius: 2px;
transition: height 250ms, background 250ms; transition:
height 250ms,
background 250ms;
&:not(:first-of-type) { &:not(:first-of-type) {
margin-inline-start: 2px; margin-inline-start: 2px;

View file

@ -1133,9 +1133,8 @@ export class ConversationController {
log.warn( log.warn(
`${logId}: Ensure that all V1 groups have new conversationId instead of old` `${logId}: Ensure that all V1 groups have new conversationId instead of old`
); );
const groups = await this.getAllGroupsInvolvingServiceId( const groups =
obsoleteServiceId await this.getAllGroupsInvolvingServiceId(obsoleteServiceId);
);
groups.forEach(group => { groups.forEach(group => {
const members = group.get('members'); const members = group.get('members');
const withoutObsolete = without(members, obsoleteId); const withoutObsolete = without(members, obsoleteId);

View file

@ -723,7 +723,7 @@ export function decryptProfile(data: Uint8Array, key: Uint8Array): Uint8Array {
export function encryptProfileItemWithPadding( export function encryptProfileItemWithPadding(
item: Uint8Array, item: Uint8Array,
profileKey: Uint8Array, profileKey: Uint8Array,
paddedLengths: typeof PaddedLengths[keyof typeof PaddedLengths] paddedLengths: (typeof PaddedLengths)[keyof typeof PaddedLengths]
): Uint8Array { ): Uint8Array {
const paddedLength = paddedLengths.find( const paddedLength = paddedLengths.find(
(length: number) => item.byteLength <= length (length: number) => item.byteLength <= length

View file

@ -136,7 +136,7 @@ const triggerEvents = function (
function trigger< function trigger<
T extends Backbone.Events & { T extends Backbone.Events & {
_events: undefined | Record<string, ReadonlyArray<InternalBackboneEvent>>; _events: undefined | Record<string, ReadonlyArray<InternalBackboneEvent>>;
} },
>(this: T, name: string, ...args: Array<unknown>): T { >(this: T, name: string, ...args: Array<unknown>): T {
if (!this._events) return this; if (!this._events) return this;
if (!eventsApi(this, name, args)) return this; if (!eventsApi(this, name, args)) return this;

View file

@ -96,9 +96,8 @@ async function downloadBadgeImageFile(url: string): Promise<string> {
} }
const imageFileData = await server.getBadgeImageFile(url); const imageFileData = await server.getBadgeImageFile(url);
const localPath = await window.Signal.Migrations.writeNewBadgeImageFileData( const localPath =
imageFileData await window.Signal.Migrations.writeNewBadgeImageFileData(imageFileData);
);
await window.Signal.Data.badgeImageFileDownloaded(url, localPath); await window.Signal.Data.badgeImageFileDownloaded(url, localPath);

View file

@ -92,7 +92,7 @@ const createActiveDirectCallProp = (
hasRemoteVideo: boolean; hasRemoteVideo: boolean;
presenting: boolean; presenting: boolean;
title: string; title: string;
} },
], ],
}); });

View file

@ -397,9 +397,8 @@ function CustomColorBubble({
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
const conversations = await getConversationsWithCustomColor( const conversations =
colorId await getConversationsWithCustomColor(colorId);
);
if (!conversations.length) { if (!conversations.length) {
onDelete(); onDelete();
} else { } else {

View file

@ -506,7 +506,12 @@ export const CompositionArea = memo(function CompositionArea({
) { ) {
inputApiRef.current.reset(); inputApiRef.current.reset();
} }
}, [messageCompositionId, sendCounter, previousMessageCompositionId, previousSendCounter]); }, [
messageCompositionId,
sendCounter,
previousMessageCompositionId,
previousSendCounter,
]);
const insertEmoji = useCallback( const insertEmoji = useCallback(
(e: EmojiPickDataType) => { (e: EmojiPickDataType) => {

View file

@ -129,7 +129,7 @@ export const ConfirmationDialog = React.memo(function ConfirmationDialogInner({
<Button <Button
key={ key={
typeof action.text === 'string' typeof action.text === 'string'
? action.id ?? action.text ? (action.id ?? action.text)
: action.id : action.id
} }
disabled={action.disabled || isSpinning} disabled={action.disabled || isSpinning}

View file

@ -23,7 +23,7 @@ export type PropsType = Readonly<{
const UNITS = ['seconds', 'minutes', 'hours', 'days', 'weeks'] as const; const UNITS = ['seconds', 'minutes', 'hours', 'days', 'weeks'] as const;
export type Unit = typeof UNITS[number]; export type Unit = (typeof UNITS)[number];
const UNIT_TO_SEC = new Map<Unit, number>([ const UNIT_TO_SEC = new Map<Unit, number>([
['seconds', 1], ['seconds', 1],

View file

@ -26,7 +26,7 @@ const createAttachment = (
contentType: stringToMIMEType(props.contentType ?? ''), contentType: stringToMIMEType(props.contentType ?? ''),
fileName: props.fileName ?? '', fileName: props.fileName ?? '',
screenshotPath: props.pending === false ? props.screenshotPath : undefined, screenshotPath: props.pending === false ? props.screenshotPath : undefined,
url: props.pending === false ? props.url ?? '' : '', url: props.pending === false ? (props.url ?? '') : '',
size: 3433, size: 3433,
}); });

View file

@ -637,7 +637,7 @@ function stableParticipantComparator(
} }
type ParticipantsInPageType< type ParticipantsInPageType<
T extends { videoAspectRatio: number } = ParticipantTileType T extends { videoAspectRatio: number } = ParticipantTileType,
> = { > = {
rows: Array<Array<T>>; rows: Array<Array<T>>;
numParticipants: number; numParticipants: number;

View file

@ -320,7 +320,7 @@ export function MediaEditor({
const objectShortcuts: Array< const objectShortcuts: Array<
[ [
(ev: KeyboardEvent) => boolean, (ev: KeyboardEvent) => boolean,
(obj: fabric.Object, ev: KeyboardEvent) => unknown (obj: fabric.Object, ev: KeyboardEvent) => unknown,
] ]
> = [ > = [
[ [
@ -1353,9 +1353,8 @@ export function MediaEditor({
let data: Uint8Array; let data: Uint8Array;
let blurHash: string; let blurHash: string;
try { try {
const renderFabricCanvas = await cloneFabricCanvas( const renderFabricCanvas =
fabricCanvas await cloneFabricCanvas(fabricCanvas);
);
renderFabricCanvas.remove( renderFabricCanvas.remove(
...renderFabricCanvas ...renderFabricCanvas

View file

@ -6,7 +6,7 @@ import React from 'react';
export abstract class PureComponentProfiler< export abstract class PureComponentProfiler<
Props extends Record<string, unknown>, Props extends Record<string, unknown>,
State extends Record<string, unknown> State extends Record<string, unknown>,
> extends React.Component<Props, State> { > extends React.Component<Props, State> {
public override shouldComponentUpdate( public override shouldComponentUpdate(
nextProps: Props, nextProps: Props,

View file

@ -70,7 +70,7 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
i18n, i18n,
safetyNumber: safetyNumber:
'safetyNumber' in overrideProps 'safetyNumber' in overrideProps
? overrideProps.safetyNumber ?? null ? (overrideProps.safetyNumber ?? null)
: { : {
numberBlocks: generateNumberBlocks(), numberBlocks: generateNumberBlocks(),
qrData: generateQRData(), qrData: generateQRData(),

View file

@ -7,7 +7,7 @@ import classNames from 'classnames';
import { getClassNamesFor } from '../util/getClassNamesFor'; import { getClassNamesFor } from '../util/getClassNamesFor';
export const SpinnerSvgSizes = ['small', 'normal'] as const; export const SpinnerSvgSizes = ['small', 'normal'] as const;
export type SpinnerSvgSize = typeof SpinnerSvgSizes[number]; export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number];
export const SpinnerDirections = [ export const SpinnerDirections = [
'outgoing', 'outgoing',
@ -17,7 +17,7 @@ export const SpinnerDirections = [
'on-progress-dialog', 'on-progress-dialog',
'on-avatar', 'on-avatar',
] as const; ] as const;
export type SpinnerDirection = typeof SpinnerDirections[number]; export type SpinnerDirection = (typeof SpinnerDirections)[number];
export type Props = { export type Props = {
ariaLabel?: string; ariaLabel?: string;

View file

@ -5,7 +5,7 @@ import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
export const SpinnerSvgSizes = ['small', 'normal'] as const; export const SpinnerSvgSizes = ['small', 'normal'] as const;
export type SpinnerSvgSize = typeof SpinnerSvgSizes[number]; export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number];
export type Props = { export type Props = {
className?: string; className?: string;

View file

@ -93,7 +93,8 @@ const BackgroundStyle = {
}, },
}; };
type BackgroundStyleType = typeof BackgroundStyle[keyof typeof BackgroundStyle]; type BackgroundStyleType =
(typeof BackgroundStyle)[keyof typeof BackgroundStyle];
function getBackground( function getBackground(
bgStyle: BackgroundStyleType bgStyle: BackgroundStyleType

View file

@ -269,7 +269,7 @@ function createCanvasAndContext({
height, height,
}: CreateCanvasAndContextOptionsType): [ }: CreateCanvasAndContextOptionsType): [
OffscreenCanvas, OffscreenCanvas,
OffscreenCanvasRenderingContext2D OffscreenCanvasRenderingContext2D,
] { ] {
const canvas = new OffscreenCanvas( const canvas = new OffscreenCanvas(
PRINT_PIXEL_RATIO * width, PRINT_PIXEL_RATIO * width,

View file

@ -456,7 +456,7 @@ function HeaderContent({
sharedGroupNames={sharedGroupNames} sharedGroupNames={sharedGroupNames}
size={AvatarSize.THIRTY_TWO} size={AvatarSize.THIRTY_TWO}
// user may have stories, but we don't show that on Note to Self conversation // user may have stories, but we don't show that on Note to Self conversation
storyRing={conversation.isMe ? undefined : hasStories ?? undefined} storyRing={conversation.isMe ? undefined : (hasStories ?? undefined)}
theme={theme} theme={theme}
title={conversation.title} title={conversation.title}
unblurredAvatarUrl={conversation.unblurredAvatarUrl ?? undefined} unblurredAvatarUrl={conversation.unblurredAvatarUrl ?? undefined}

View file

@ -162,10 +162,10 @@ export const MessageStatuses = [
'sent', 'sent',
'viewed', 'viewed',
] as const; ] as const;
export type MessageStatusType = typeof MessageStatuses[number]; export type MessageStatusType = (typeof MessageStatuses)[number];
export const Directions = ['incoming', 'outgoing'] as const; export const Directions = ['incoming', 'outgoing'] as const;
export type DirectionType = typeof Directions[number]; export type DirectionType = (typeof Directions)[number];
export type AudioAttachmentProps = { export type AudioAttachmentProps = {
renderingContext: string; renderingContext: string;

View file

@ -34,7 +34,7 @@ export const MessageStatuses = [
'partial-sent', 'partial-sent',
] as const; ] as const;
export type MessageStatusType = typeof MessageStatuses[number]; export type MessageStatusType = (typeof MessageStatuses)[number];
export type PropsData = Pick< export type PropsData = Pick<
ConversationType, ConversationType,

View file

@ -8,7 +8,7 @@ import { emojiToImage, getImagePath } from './lib';
export const EmojiSizes = [16, 18, 20, 24, 28, 32, 48, 64, 66] as const; export const EmojiSizes = [16, 18, 20, 24, 28, 32, 48, 64, 66] as const;
export type EmojiSizeType = typeof EmojiSizes[number]; export type EmojiSizeType = (typeof EmojiSizes)[number];
export type OwnProps = { export type OwnProps = {
emoji?: string; emoji?: string;

View file

@ -76,7 +76,7 @@ const categories = [
'flag', 'flag',
] as const; ] as const;
type Category = typeof categories[number]; type Category = (typeof categories)[number];
export const EmojiPicker = React.memo( export const EmojiPicker = React.memo(
React.forwardRef<HTMLDivElement, Props>( React.forwardRef<HTMLDivElement, Props>(

View file

@ -23,7 +23,7 @@ export type SmartContactRendererType<T extends string | JSX.Element> = (
type StringRendererType< type StringRendererType<
T extends string | JSX.Element, T extends string | JSX.Element,
ParamsByKeyType extends SelectParamsByKeyType<T> = SelectParamsByKeyType<T> ParamsByKeyType extends SelectParamsByKeyType<T> = SelectParamsByKeyType<T>,
> = <Key extends keyof ParamsByKeyType>( > = <Key extends keyof ParamsByKeyType>(
id: Key, id: Key,
i18n: LocalizerType, i18n: LocalizerType,

View file

@ -2377,9 +2377,8 @@ export async function initiateMigrationToGroupV2(
const { avatar: currentAvatar } = conversation.attributes; const { avatar: currentAvatar } = conversation.attributes;
if (currentAvatar?.path) { if (currentAvatar?.path) {
const avatarData = await window.Signal.Migrations.readAttachmentData( const avatarData =
currentAvatar await window.Signal.Migrations.readAttachmentData(currentAvatar);
);
const { hash, key } = await uploadAvatar({ const { hash, key } = await uploadAvatar({
logId, logId,
publicParams, publicParams,

View file

@ -24,7 +24,7 @@ import * as log from '../logging/log';
*/ */
export function useIntersectionObserver(): [ export function useIntersectionObserver(): [
(el?: Element | null) => void, (el?: Element | null) => void,
IntersectionObserverEntry | null IntersectionObserverEntry | null,
] { ] {
const [intersectionObserverEntry, setIntersectionObserverEntry] = const [intersectionObserverEntry, setIntersectionObserverEntry] =
useState<IntersectionObserverEntry | null>(null); useState<IntersectionObserverEntry | null>(null);

View file

@ -32,7 +32,7 @@ export const jobManagerJobSchema = z.object({
export type JobManagerParamsType< export type JobManagerParamsType<
CoreJobType, CoreJobType,
JobType = CoreJobType & JobManagerJobType JobType = CoreJobType & JobManagerJobType,
> = { > = {
markAllJobsInactive: () => Promise<void>; markAllJobsInactive: () => Promise<void>;
getNextJobs: (options: { getNextJobs: (options: {

View file

@ -29,9 +29,8 @@ export async function addAttachmentToMessage(
try { try {
if (attachment.path) { if (attachment.path) {
const loaded = await window.Signal.Migrations.loadAttachmentData( const loaded =
attachment await window.Signal.Migrations.loadAttachmentData(attachment);
);
attachmentData = loaded.data; attachmentData = loaded.data;
} }

View file

@ -271,9 +271,8 @@ const deleteSentProtoBatcher = createWaitBatcher({
log.info( log.info(
`MessageReceipts: Batching ${items.length} sent proto recipients deletes` `MessageReceipts: Batching ${items.length} sent proto recipients deletes`
); );
const { successfulPhoneNumberShares } = await deleteSentProtoRecipient( const { successfulPhoneNumberShares } =
items await deleteSentProtoRecipient(items);
);
for (const serviceId of successfulPhoneNumberShares) { for (const serviceId of successfulPhoneNumberShares) {
const convo = window.ConversationController.get(serviceId); const convo = window.ConversationController.get(serviceId);

View file

@ -66,9 +66,8 @@ async function findMessageForReaction({
reactionSenderConversationId: string; reactionSenderConversationId: string;
logId: string; logId: string;
}): Promise<MessageAttributesType | undefined> { }): Promise<MessageAttributesType | undefined> {
const messages = await window.Signal.Data.getMessagesBySentAt( const messages =
targetTimestamp await window.Signal.Data.getMessagesBySentAt(targetTimestamp);
);
const matchingMessages = messages.filter(message => const matchingMessages = messages.filter(message =>
isMessageAMatchForReaction({ isMessageAMatchForReaction({

View file

@ -3133,9 +3133,8 @@ export class ConversationModel extends window.Backbone
return; return;
} }
const hadSession = await window.textsecure.storage.protocol.hasSessionWith( const hadSession =
originalPni await window.textsecure.storage.protocol.hasSessionWith(originalPni);
);
if (!hadSession) { if (!hadSession) {
log.info(`${logId}: not adding, no PNI session`); log.info(`${logId}: not adding, no PNI session`);
@ -3947,9 +3946,8 @@ export class ConversationModel extends window.Backbone
if (!sendHQImages) { if (!sendHQImages) {
attachmentsToSend = await Promise.all( attachmentsToSend = await Promise.all(
attachmentsToSend.map(async attachment => { attachmentsToSend.map(async attachment => {
const downscaledAttachment = await downscaleOutgoingAttachment( const downscaledAttachment =
attachment await downscaleOutgoingAttachment(attachment);
);
if (downscaledAttachment !== attachment && attachment.path) { if (downscaledAttachment !== attachment && attachment.path) {
drop(deleteAttachmentData(attachment.path)); drop(deleteAttachmentData(attachment.path));
} }

View file

@ -2074,9 +2074,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
if (!messaging) { if (!messaging) {
throw new Error(`${idLog}: messaging is not available`); throw new Error(`${idLog}: messaging is not available`);
} }
const response = await messaging.server.getSubscriptionConfiguration( const response =
userLanguages await messaging.server.getSubscriptionConfiguration(userLanguages);
);
const boostBadgesByLevel = parseBoostBadgeListFromServer( const boostBadgesByLevel = parseBoostBadgeListFromServer(
response, response,
updatesUrl updatesUrl

View file

@ -266,7 +266,7 @@ async function main() {
} }
const prettierConfig = await prettier.resolveConfig(destinationPath); const prettierConfig = await prettier.resolveConfig(destinationPath);
const output = prettier.format(unformattedOutput, { const output = await prettier.format(unformattedOutput, {
...prettierConfig, ...prettierConfig,
filepath: destinationPath, filepath: destinationPath,
}); });

View file

@ -87,7 +87,7 @@ async function main(): Promise<void> {
join(__dirname, '..', '..', 'build') join(__dirname, '..', '..', 'build')
); );
const output = prettier.format(JSON.stringify(resources, null, 2), { const output = await prettier.format(JSON.stringify(resources, null, 2), {
...prettierConfig, ...prettierConfig,
filepath: resourcesPath, filepath: resourcesPath,
}); });

View file

@ -81,7 +81,7 @@ async function main(): Promise<void> {
); );
{ {
const output = prettier.format(JSON.stringify(jumbomoji, null, 2), { const output = await prettier.format(JSON.stringify(jumbomoji, null, 2), {
...prettierConfig, ...prettierConfig,
filepath: manifestPath, filepath: manifestPath,
}); });
@ -89,7 +89,7 @@ async function main(): Promise<void> {
} }
{ {
const output = prettier.format(JSON.stringify(resources, null, 2), { const output = await prettier.format(JSON.stringify(resources, null, 2), {
...prettierConfig, ...prettierConfig,
filepath: resourcesPath, filepath: resourcesPath,
}); });

View file

@ -106,7 +106,7 @@ async function main() {
delete typedValue.description; delete typedValue.description;
} }
delete json.smartling; delete json.smartling;
const output = prettier.format(JSON.stringify(json, null, 2), { const output = await prettier.format(JSON.stringify(json, null, 2), {
...prettierConfig, ...prettierConfig,
filepath: targetFile, filepath: targetFile,
}); });

View file

@ -152,9 +152,8 @@ export class MessageCache {
let messageAttributesFromDatabase: MessageAttributesType | undefined; let messageAttributesFromDatabase: MessageAttributesType | undefined;
try { try {
messageAttributesFromDatabase = await window.Signal.Data.getMessageById( messageAttributesFromDatabase =
messageId await window.Signal.Data.getMessageById(messageId);
);
} catch (err: unknown) { } catch (err: unknown) {
log.error( log.error(
`MessageCache.resolveAttributes(${messageId}): db error ${Errors.toLogFormat( `MessageCache.resolveAttributes(${messageId}): db error ${Errors.toLogFormat(

View file

@ -220,9 +220,8 @@ export class BackupsService {
): Promise< ): Promise<
{ isInBackupTier: true; cdnNumber: number } | { isInBackupTier: false } { isInBackupTier: true; cdnNumber: number } | { isInBackupTier: false }
> { > {
const storedInfo = await window.Signal.Data.getBackupCdnObjectMetadata( const storedInfo =
mediaId await window.Signal.Data.getBackupCdnObjectMetadata(mediaId);
);
if (!storedInfo) { if (!storedInfo) {
return { isInBackupTier: false }; return { isInBackupTier: false };
} }

View file

@ -63,9 +63,8 @@ export type GetBackupCdnInfoType = (
export const getBackupCdnInfo: GetBackupCdnInfoType = async ( export const getBackupCdnInfo: GetBackupCdnInfoType = async (
mediaId: string mediaId: string
) => { ) => {
const savedInfo = await window.Signal.Data.getBackupCdnObjectMetadata( const savedInfo =
mediaId await window.Signal.Data.getBackupCdnObjectMetadata(mediaId);
);
if (!savedInfo) { if (!savedInfo) {
return { isInBackupTier: false }; return { isInBackupTier: false };
} }

View file

@ -3387,9 +3387,8 @@ export class CallingClass {
// https://bugs.chromium.org/p/chromium/issues/detail?id=1287628 // https://bugs.chromium.org/p/chromium/issues/detail?id=1287628
private async enumerateMediaDevices(): Promise<void> { private async enumerateMediaDevices(): Promise<void> {
try { try {
const microphoneStatus = await window.IPC.getMediaAccessStatus( const microphoneStatus =
'microphone' await window.IPC.getMediaAccessStatus('microphone');
);
if (microphoneStatus !== 'granted') { if (microphoneStatus !== 'granted') {
return; return;
} }

View file

@ -2053,9 +2053,12 @@ export const storageServiceUploadJob = debounce(() => {
return; return;
} }
void storageJobQueue(async () => { void storageJobQueue(
async () => {
await upload(); await upload();
}, `upload v${window.storage.get('manifestVersion')}`); },
`upload v${window.storage.get('manifestVersion')}`
);
}, 500); }, 500);
export const runStorageServiceSyncJob = debounce(() => { export const runStorageServiceSyncJob = debounce(() => {
@ -2065,17 +2068,21 @@ export const runStorageServiceSyncJob = debounce(() => {
} }
ourProfileKeyService.blockGetWithPromise( ourProfileKeyService.blockGetWithPromise(
storageJobQueue(async () => { storageJobQueue(
async () => {
await sync(); await sync();
// Notify listeners about sync completion // Notify listeners about sync completion
window.Whisper.events.trigger('storageService:syncComplete'); window.Whisper.events.trigger('storageService:syncComplete');
}, `sync v${window.storage.get('manifestVersion')}`) },
`sync v${window.storage.get('manifestVersion')}`
)
); );
}, 500); }, 500);
export const addPendingDelete = (item: ExtendedStorageID): void => { export const addPendingDelete = (item: ExtendedStorageID): void => {
void storageJobQueue(async () => { void storageJobQueue(
async () => {
const storedPendingDeletes = window.storage.get( const storedPendingDeletes = window.storage.get(
'storage-service-pending-deletes', 'storage-service-pending-deletes',
[] []
@ -2084,5 +2091,7 @@ export const addPendingDelete = (item: ExtendedStorageID): void => {
...storedPendingDeletes, ...storedPendingDeletes,
item, item,
]); ]);
}, `addPendingDelete(${redactExtendedStorageID(item)})`); },
`addPendingDelete(${redactExtendedStorageID(item)})`
);
}; };

View file

@ -1837,7 +1837,7 @@ export async function mergeStickerPackRecord(
position: position:
'position' in stickerPackRecord 'position' in stickerPackRecord
? stickerPackRecord.position ? stickerPackRecord.position
: localStickerPack?.position ?? undefined, : (localStickerPack?.position ?? undefined),
storageID, storageID,
storageVersion, storageVersion,
storageUnknownFields, storageUnknownFields,

View file

@ -395,9 +395,8 @@ export async function resolveUsernameByLink({
strictAssert(window.textsecure.server, 'WebAPI must be available'); strictAssert(window.textsecure.server, 'WebAPI must be available');
try { try {
const { usernameLinkEncryptedValue } = await server.resolveUsernameLink( const { usernameLinkEncryptedValue } =
serverId await server.resolveUsernameLink(serverId);
);
return usernames.decryptUsernameLink({ return usernames.decryptUsernameLink({
entropy: Buffer.from(entropy), entropy: Buffer.from(entropy),

View file

@ -243,7 +243,7 @@ export const StickerPackStatuses = [
'error', 'error',
] as const; ] as const;
export type StickerPackStatusType = typeof StickerPackStatuses[number]; export type StickerPackStatusType = (typeof StickerPackStatuses)[number];
export type StorageServiceFieldsType = Readonly<{ export type StorageServiceFieldsType = Readonly<{
storageID?: string; storageID?: string;

View file

@ -5163,10 +5163,8 @@ async function getBackupCdnObjectMetadata(
mediaId: string mediaId: string
): Promise<BackupCdnMediaObjectType | undefined> { ): Promise<BackupCdnMediaObjectType | undefined> {
const db = getReadonlyInstance(); const db = getReadonlyInstance();
const [ const [query, params] =
query, sql`SELECT * from backup_cdn_object_metadata WHERE mediaId = ${mediaId}`;
params,
] = sql`SELECT * from backup_cdn_object_metadata WHERE mediaId = ${mediaId}`;
return db.prepare(query).get(params); return db.prepare(query).get(params);
} }

View file

@ -179,8 +179,8 @@ export class MainSQL {
public async sqlCall<Method extends keyof typeof DB>( public async sqlCall<Method extends keyof typeof DB>(
method: Method, method: Method,
...args: Parameters<typeof DB[Method]> ...args: Parameters<(typeof DB)[Method]>
): Promise<ReturnType<typeof DB[Method]>> { ): Promise<ReturnType<(typeof DB)[Method]>> {
if (this.onReady) { if (this.onReady) {
await this.onReady; await this.onReady;
} }
@ -190,7 +190,7 @@ export class MainSQL {
} }
type SqlCallResult = Readonly<{ type SqlCallResult = Readonly<{
result: ReturnType<typeof DB[Method]>; result: ReturnType<(typeof DB)[Method]>;
duration: number; duration: number;
}>; }>;

View file

@ -95,10 +95,8 @@ export default function updateToSchemaVersion91(
// Grab PNI-specific count // Grab PNI-specific count
const [ const [beforeQuery, beforeParams] =
beforeQuery, sql`SELECT count(*) from preKeys WHERE ourServiceId = ${pni}`;
beforeParams,
] = sql`SELECT count(*) from preKeys WHERE ourServiceId = ${pni}`;
const beforeKeys = db.prepare(beforeQuery).pluck(true).get(beforeParams); const beforeKeys = db.prepare(beforeQuery).pluck(true).get(beforeParams);
logger.info(`updateToSchemaVersion91: Found ${beforeKeys} preKeys for PNI`); logger.info(`updateToSchemaVersion91: Found ${beforeKeys} preKeys for PNI`);

View file

@ -94,10 +94,8 @@ export function cleanKeys(
} }
// Grab PNI-specific count // Grab PNI-specific count
const [ const [beforeQuery, beforeParams] =
beforeQuery, sql`SELECT count(*) from ${tableName} WHERE ${idField} = ${pni}`;
beforeParams,
] = sql`SELECT count(*) from ${tableName} WHERE ${idField} = ${pni}`;
const beforeKeys = db.prepare(beforeQuery).pluck(true).get(beforeParams); const beforeKeys = db.prepare(beforeQuery).pluck(true).get(beforeParams);
logger.info(`${logId}: Found ${beforeKeys} keys for PNI`); logger.info(`${logId}: Found ${beforeKeys} keys for PNI`);

View file

@ -46,7 +46,7 @@ export type QueryFragmentValue = QueryFragment | QueryTemplateParam;
export type QueryFragment = [ export type QueryFragment = [
{ fragment: string }, { fragment: string },
ReadonlyArray<QueryTemplateParam> ReadonlyArray<QueryTemplateParam>,
]; ];
/** /**

View file

@ -208,7 +208,9 @@ export type DBConversationType = ReadonlyDeep<{
}>; }>;
export const InteractionModes = ['mouse', 'keyboard'] as const; export const InteractionModes = ['mouse', 'keyboard'] as const;
export type InteractionModeType = ReadonlyDeep<typeof InteractionModes[number]>; export type InteractionModeType = ReadonlyDeep<
(typeof InteractionModes)[number]
>;
export type MessageTimestamps = ReadonlyDeep< export type MessageTimestamps = ReadonlyDeep<
Pick<MessageAttributesType, 'sent_at' | 'received_at'> Pick<MessageAttributesType, 'sent_at' | 'received_at'>
@ -226,7 +228,7 @@ export type MessageWithUIFieldsType = MessageAttributesType & {
export const ConversationTypes = ['direct', 'group'] as const; export const ConversationTypes = ['direct', 'group'] as const;
export type ConversationTypeType = ReadonlyDeep< export type ConversationTypeType = ReadonlyDeep<
typeof ConversationTypes[number] (typeof ConversationTypes)[number]
>; >;
export type LastMessageType = ReadonlyDeep< export type LastMessageType = ReadonlyDeep<

View file

@ -266,9 +266,8 @@ function hideMyStoriesFrom(
memberServiceIds: Array<ServiceIdString> memberServiceIds: Array<ServiceIdString>
): ThunkAction<void, RootStateType, null, HideMyStoriesFromActionType> { ): ThunkAction<void, RootStateType, null, HideMyStoriesFromActionType> {
return async dispatch => { return async dispatch => {
const myStories = await dataInterface.getStoryDistributionWithMembers( const myStories =
MY_STORY_ID await dataInterface.getStoryDistributionWithMembers(MY_STORY_ID);
);
if (!myStories) { if (!myStories) {
log.error( log.error(
@ -385,9 +384,8 @@ function setMyStoriesToAllSignalConnections(): ThunkAction<
ResetMyStoriesActionType ResetMyStoriesActionType
> { > {
return async dispatch => { return async dispatch => {
const myStories = await dataInterface.getStoryDistributionWithMembers( const myStories =
MY_STORY_ID await dataInterface.getStoryDistributionWithMembers(MY_STORY_ID);
);
if (!myStories) { if (!myStories) {
log.error( log.error(

View file

@ -184,9 +184,8 @@ export const SmartCallsTab = memo(function SmartCallsTab() {
if (callHistoryFilter == null) { if (callHistoryFilter == null) {
return 0; return 0;
} }
const count = await window.Signal.Data.getCallHistoryGroupsCount( const count =
callHistoryFilter await window.Signal.Data.getCallHistoryGroupsCount(callHistoryFilter);
);
return count; return count;
}, },
[allCallLinks, allConversations, regionCode] [allCallLinks, allConversations, regionCode]

View file

@ -73,7 +73,13 @@ export const SmartChatsTab = memo(function SmartChatsTab() {
) { ) {
scrollToMessage(selectedConversationId, targetedMessageId); scrollToMessage(selectedConversationId, targetedMessageId);
} }
}, [onConversationOpened, selectedConversationId, scrollToMessage, targetedMessageId, targetedMessageSource]); }, [
onConversationOpened,
selectedConversationId,
scrollToMessage,
targetedMessageId,
targetedMessageSource,
]);
const prevConversationId = usePrevious( const prevConversationId = usePrevious(
selectedConversationId, selectedConversationId,

View file

@ -104,9 +104,8 @@ export const SmartInstallScreen = memo(function SmartInstallScreen() {
const hasExpired = useSelector(hasExpiredSelector); const hasExpired = useSelector(hasExpiredSelector);
const chooseDeviceNamePromiseWrapperRef = useRef(explodePromise<string>()); const chooseDeviceNamePromiseWrapperRef = useRef(explodePromise<string>());
const chooseBackupFilePromiseWrapperRef = useRef( const chooseBackupFilePromiseWrapperRef =
explodePromise<File | undefined>() useRef(explodePromise<File | undefined>());
);
const [state, setState] = useState<StateType>(INITIAL_STATE); const [state, setState] = useState<StateType>(INITIAL_STATE);
const [retryCounter, setRetryCounter] = useState(0); const [retryCounter, setRetryCounter] = useState(0);
@ -223,8 +222,8 @@ export const SmartInstallScreen = memo(function SmartInstallScreen() {
({ deviceName, backupData: backupFileData } = window.SignalCI); ({ deviceName, backupData: backupFileData } = window.SignalCI);
} else { } else {
deviceName = await chooseDeviceNamePromiseWrapperRef.current.promise; deviceName = await chooseDeviceNamePromiseWrapperRef.current.promise;
const backupFile = await chooseBackupFilePromiseWrapperRef.current const backupFile =
.promise; await chooseBackupFilePromiseWrapperRef.current.promise;
backupFileData = backupFile ? await fileToBytes(backupFile) : undefined; backupFileData = backupFile ? await fileToBytes(backupFile) : undefined;
} }

View file

@ -235,7 +235,10 @@ describe('cleanDataForIpc', () => {
class Person { class Person {
public toBeDiscarded = Symbol('to be discarded'); public toBeDiscarded = Symbol('to be discarded');
constructor(public firstName: string, public lastName: string) {} constructor(
public firstName: string,
public lastName: string
) {}
get name() { get name() {
return this.getName(); return this.getName();

View file

@ -360,9 +360,8 @@ describe('SignalProtocolStore', () => {
await store.saveIdentity(identifier, newIdentity); await store.saveIdentity(identifier, newIdentity);
}); });
it('sets the new key to default', async () => { it('sets the new key to default', async () => {
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -384,9 +383,8 @@ describe('SignalProtocolStore', () => {
await store.saveIdentity(identifier, newIdentity); await store.saveIdentity(identifier, newIdentity);
}); });
it('sets the new key to unverified', async () => { it('sets the new key to unverified', async () => {
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -411,9 +409,8 @@ describe('SignalProtocolStore', () => {
await store.saveIdentity(identifier, newIdentity); await store.saveIdentity(identifier, newIdentity);
}); });
it('sets the new key to unverified', async () => { it('sets the new key to unverified', async () => {
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -439,9 +436,8 @@ describe('SignalProtocolStore', () => {
}); });
describe('If it is marked firstUse', () => { describe('If it is marked firstUse', () => {
before(async () => { before(async () => {
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -452,9 +448,8 @@ describe('SignalProtocolStore', () => {
it('nothing changes', async () => { it('nothing changes', async () => {
await store.saveIdentity(identifier, testKey.pubKey, true); await store.saveIdentity(identifier, testKey.pubKey, true);
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -464,9 +459,8 @@ describe('SignalProtocolStore', () => {
}); });
describe('If it is not marked firstUse', () => { describe('If it is not marked firstUse', () => {
before(async () => { before(async () => {
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -478,9 +472,8 @@ describe('SignalProtocolStore', () => {
let now: number; let now: number;
before(async () => { before(async () => {
now = Date.now(); now = Date.now();
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }
@ -491,9 +484,8 @@ describe('SignalProtocolStore', () => {
it('sets non-blocking approval', async () => { it('sets non-blocking approval', async () => {
await store.saveIdentity(identifier, testKey.pubKey, true); await store.saveIdentity(identifier, testKey.pubKey, true);
const identity = await window.Signal.Data.getIdentityKeyById( const identity =
theirAci await window.Signal.Data.getIdentityKeyById(theirAci);
);
if (!identity) { if (!identity) {
throw new Error('Missing identity!'); throw new Error('Missing identity!');
} }

View file

@ -107,9 +107,8 @@ describe('Attachments', () => {
'Attachments_createWriterForNew' 'Attachments_createWriterForNew'
); );
const outputPath = await Attachments.createWriterForNew(tempDirectory)( const outputPath =
input await Attachments.createWriterForNew(tempDirectory)(input);
);
const output = await fse.readFile(path.join(tempDirectory, outputPath)); const output = await fse.readFile(path.join(tempDirectory, outputPath));
assert.lengthOf(outputPath, PATH_LENGTH); assert.lengthOf(outputPath, PATH_LENGTH);

View file

@ -32,7 +32,7 @@ const createMockElement = (
({ ({
classList: new FakeTokenList([className]), classList: new FakeTokenList([className]),
dataset, dataset,
} as unknown as HTMLElement); }) as unknown as HTMLElement;
const createMockAtMentionElement = ( const createMockAtMentionElement = (
dataset: Record<string, string> dataset: Record<string, string>

View file

@ -147,10 +147,9 @@ export class ParseContactsTransform extends Transform {
); );
const hash = computeHash(data); const hash = computeHash(data);
const local =
// eslint-disable-next-line no-await-in-loop // eslint-disable-next-line no-await-in-loop
const local = await window.Signal.Migrations.writeNewAttachmentData( await window.Signal.Migrations.writeNewAttachmentData(avatarData);
avatarData
);
const prepared = prepareContact(this.activeContact, { const prepared = prepareContact(this.activeContact, {
...this.activeContact.avatar, ...this.activeContact.avatar,

View file

@ -436,9 +436,8 @@ export default class OutgoingMessage {
destinationDeviceId destinationDeviceId
); );
const activeSession = await sessionStore.getSession( const activeSession =
protocolAddress await sessionStore.getSession(protocolAddress);
);
if (!activeSession) { if (!activeSession) {
throw new Error( throw new Error(
'OutgoingMessage.doSendMessage: No active session!' 'OutgoingMessage.doSendMessage: No active session!'

View file

@ -25,7 +25,10 @@ class SyncRequestInner extends EventTarget {
timeoutMillis: number; timeoutMillis: number;
constructor(private receiver: MessageReceiver, timeoutMillis?: number) { constructor(
private receiver: MessageReceiver,
timeoutMillis?: number
) {
super(); super();
if (!(receiver instanceof MessageReceiver)) { if (!(receiver instanceof MessageReceiver)) {

View file

@ -2510,7 +2510,7 @@ export function initialize({
} }
async function _withNewCredentials< async function _withNewCredentials<
Result extends { uuid: AciString; deviceId?: number } Result extends { uuid: AciString; deviceId?: number },
>( >(
{ username: newUsername, password: newPassword }: WebAPICredentials, { username: newUsername, password: newPassword }: WebAPICredentials,
callback: () => Promise<Result> callback: () => Promise<Result>

View file

@ -243,7 +243,10 @@ export type WebSocketResourceOptions = {
}; };
export class CloseEvent extends Event { export class CloseEvent extends Event {
constructor(public readonly code: number, public readonly reason: string) { constructor(
public readonly code: number,
public readonly reason: string
) {
super('close'); super('close');
} }
} }

View file

@ -28,7 +28,7 @@ export type CachedAuthType = Readonly<{
}>; }>;
export abstract class CDSBase< export abstract class CDSBase<
Options extends CDSBaseOptionsType = CDSBaseOptionsType Options extends CDSBaseOptionsType = CDSBaseOptionsType,
> { > {
protected readonly logger: LoggerType; protected readonly logger: LoggerType;
protected proxyAgent?: ProxyAgent; protected proxyAgent?: ProxyAgent;

View file

@ -39,7 +39,7 @@ const E164_BYTE_SIZE = 8;
const TRIPLE_BYTE_SIZE = UUID_BYTE_SIZE * 2 + E164_BYTE_SIZE; const TRIPLE_BYTE_SIZE = UUID_BYTE_SIZE * 2 + E164_BYTE_SIZE;
export abstract class CDSSocketBase< export abstract class CDSSocketBase<
Options extends CDSSocketBaseOptionsType = CDSSocketBaseOptionsType Options extends CDSSocketBaseOptionsType = CDSSocketBaseOptionsType,
> extends EventEmitter { > extends EventEmitter {
protected state = CDSSocketState.Open; protected state = CDSSocketState.Open;

View file

@ -39,11 +39,14 @@ export type CDSSocketManagerBaseOptionsType = Readonly<{
export abstract class CDSSocketManagerBase< export abstract class CDSSocketManagerBase<
Socket extends CDSSocketBase, Socket extends CDSSocketBase,
Options extends CDSSocketManagerBaseOptionsType Options extends CDSSocketManagerBaseOptionsType,
> extends CDSBase<Options> { > extends CDSBase<Options> {
private retryAfter?: number; private retryAfter?: number;
constructor(private readonly libsignalNet: Net.Net, options: Options) { constructor(
private readonly libsignalNet: Net.Net,
options: Options
) {
super(options); super(options);
} }

View file

@ -113,7 +113,10 @@ export class EnvelopeQueuedEvent extends Event {
export type ConfirmCallback = () => void; export type ConfirmCallback = () => void;
export class ConfirmableEvent extends Event { export class ConfirmableEvent extends Event {
constructor(type: string, public readonly confirm: ConfirmCallback) { constructor(
type: string,
public readonly confirm: ConfirmCallback
) {
super(type); super(type);
} }
} }
@ -205,7 +208,10 @@ export type SentEventData = Readonly<{
}>; }>;
export class SentEvent extends ConfirmableEvent { export class SentEvent extends ConfirmableEvent {
constructor(public readonly data: SentEventData, confirm: ConfirmCallback) { constructor(
public readonly data: SentEventData,
confirm: ConfirmCallback
) {
super('sent', confirm); super('sent', confirm);
} }
} }

View file

@ -49,9 +49,9 @@ export type ContactAvatarType =
hash?: string; hash?: string;
}; };
type GroupAvatarIconType = typeof GroupAvatarIcons[number]; type GroupAvatarIconType = (typeof GroupAvatarIcons)[number];
type PersonalAvatarIconType = typeof PersonalAvatarIcons[number]; type PersonalAvatarIconType = (typeof PersonalAvatarIcons)[number];
export type AvatarIconType = GroupAvatarIconType | PersonalAvatarIconType; export type AvatarIconType = GroupAvatarIconType | PersonalAvatarIconType;

View file

@ -84,7 +84,7 @@ export namespace BodyRange {
return ('url' as const) in node; return ('url' as const) in node;
} }
export function isDisplayOnly< export function isDisplayOnly<
T extends Mention | Link | Formatting | DisplayOnly T extends Mention | Link | Formatting | DisplayOnly,
>(node: T): node is T & DisplayOnly { >(node: T): node is T & DisplayOnly {
// satisfies keyof DisplayOnly // satisfies keyof DisplayOnly
return ('displayStyle' as const) in node; return ('displayStyle' as const) in node;

View file

@ -82,7 +82,7 @@ export type ActiveDirectCallType = ActiveCallBaseType & {
// GroupCallRemoteParticipantType below (which is based on // GroupCallRemoteParticipantType below (which is based on
// ConversationType). // ConversationType).
serviceId?: ServiceIdString; serviceId?: ServiceIdString;
} },
]; ];
}; };

View file

@ -156,7 +156,7 @@ export const ContactNameColors = [
'110', '110',
]; ];
export type ContactNameColorType = typeof ContactNameColors[number]; export type ContactNameColorType = (typeof ContactNameColors)[number];
export type CustomColorType = { export type CustomColorType = {
start: { hue: number; saturation: number }; start: { hue: number; saturation: number };
@ -164,10 +164,10 @@ export type CustomColorType = {
deg?: number; deg?: number;
}; };
export type AvatarColorType = typeof AvatarColors[number]; export type AvatarColorType = (typeof AvatarColors)[number];
export type ConversationColorType = export type ConversationColorType =
| typeof ConversationColors[number] | (typeof ConversationColors)[number]
| 'custom'; | 'custom';
export type CustomColorDataType = { export type CustomColorDataType = {

View file

@ -40,7 +40,7 @@ export type LocalizerType = {
? [params?: undefined, options?: LocalizerOptions] ? [params?: undefined, options?: LocalizerOptions]
: [ : [
params: ICUStringMessageParamsByKeyType[Key], params: ICUStringMessageParamsByKeyType[Key],
options?: LocalizerOptions options?: LocalizerOptions,
] ]
): string; ): string;
getIntl(): IntlShape; getIntl(): IntlShape;
@ -69,13 +69,13 @@ export enum ScrollBehavior {
type InternalAssertProps< type InternalAssertProps<
Result, Result,
Value, Value,
Missing = Omit<Result, keyof Value> Missing = Omit<Result, keyof Value>,
> = keyof Missing extends never > = keyof Missing extends never
? Result ? Result
: Result & { : Result & {
[key in keyof Required<Missing>]: [ [key in keyof Required<Missing>]: [
never, never,
'AssertProps: missing property' 'AssertProps: missing property',
]; ];
}; };
@ -87,10 +87,8 @@ export type BytesToStrings<Value> = Value extends Uint8Array
? string ? string
: { [Key in keyof Value]: BytesToStrings<Value[Key]> }; : { [Key in keyof Value]: BytesToStrings<Value[Key]> };
export type JSONWithUnknownFields<Value> = Value extends Record< export type JSONWithUnknownFields<Value> =
string | symbol | number, Value extends Record<string | symbol | number, unknown>
unknown
>
? Readonly< ? Readonly<
{ {
[Key in keyof Value]: JSONWithUnknownFields<Value[Key]>; [Key in keyof Value]: JSONWithUnknownFields<Value[Key]>;

View file

@ -61,9 +61,8 @@ export async function updateConversationsWithUuidLookup({
// and if not - drop it. // and if not - drop it.
let finalServiceId = finalConversation.getServiceId(); let finalServiceId = finalConversation.getServiceId();
if (!pairFromServer && finalServiceId) { if (!pairFromServer && finalServiceId) {
const doesAccountExist = await server.checkAccountExistence( const doesAccountExist =
finalServiceId await server.checkAccountExistence(finalServiceId);
);
if (!doesAccountExist) { if (!doesAccountExist) {
finalConversation.updateServiceId(undefined); finalConversation.updateServiceId(undefined);
finalServiceId = undefined; finalServiceId = undefined;

View file

@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
export async function awaitObject< export async function awaitObject<
Result extends { [key: string]: unknown } Result extends { [key: string]: unknown },
>(settings: { >(settings: {
[key in keyof Result]: Promise<Result[key]>; [key in keyof Result]: Promise<Result[key]>;
}): Promise<Result> { }): Promise<Result> {

View file

@ -106,9 +106,8 @@ export function createIdenticon(
} }
const data = new Uint8Array(arrayBuffer); const data = new Uint8Array(arrayBuffer);
const path = await window.Signal.Migrations.writeNewPlaintextTempData( const path =
data await window.Signal.Migrations.writeNewPlaintextTempData(data);
);
resolve({ url, path }); resolve({ url, path });
}); });
reader.readAsArrayBuffer(blob); reader.readAsArrayBuffer(blob);

View file

@ -1,9 +1,8 @@
// Copyright 2021 Signal Messenger, LLC // Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
export type NullToUndefined<T> = Extract<T, null> extends never export type NullToUndefined<T> =
? T Extract<T, null> extends never ? T : Exclude<T, null> | undefined;
: Exclude<T, null> | undefined;
export function dropNull<T>( export function dropNull<T>(
value: NonNullable<T> | null | undefined value: NonNullable<T> | null | undefined

Some files were not shown because too many files have changed in this diff Show more