Remove React Devtools

This commit is contained in:
ayumi-signal
2026-09-29 15:02:51 -07:00
committed by GitHub
parent 34f2e99cf7
commit 540373c2d3
12 changed files with 1 additions and 692 deletions
-2
View File
@@ -132,8 +132,6 @@ const NODE_PACKAGES = new Set([
'postcss-loader',
'prettier',
'prettier-plugin-tailwindcss',
'react-devtools',
'react-devtools-core',
'resolve-url-loader',
'rolldown',
'sass',
-8
View File
@@ -8764,14 +8764,6 @@ Signal Desktop makes use of the following open source projects.
License: MIT
## react-devtools
License: MIT
## react-devtools-core
License: MIT
## react-dom
MIT License
-1
View File
@@ -47,7 +47,6 @@ if (getEnvironment() === Environment.PackagedApp) {
process.env.SIGNAL_ENABLE_HTTP = '';
process.env.SIGNAL_CI_CONFIG = '';
process.env.GENERATE_PRELOAD_CACHE = '';
process.env.REACT_DEVTOOLS = '';
process.env.IS_BUNDLED = '1';
}
+1 -3
View File
@@ -2204,9 +2204,7 @@ app.on('ready', async () => {
}
installWebHandler({
enableHttp:
Boolean(process.env.SIGNAL_ENABLE_HTTP) ||
Boolean(process.env.REACT_DEVTOOLS),
enableHttp: Boolean(process.env.SIGNAL_ENABLE_HTTP),
session: session.defaultSession,
});
-4
View File
@@ -111,8 +111,6 @@
"electron:install-app-deps": "electron-builder install-app-deps",
"check-upgradeable-deps": "node scripts/check-upgradeable-deps.mjs",
"check:unused-icons": "node scripts/check-unused-icons.mjs",
"react-devtools": "react-devtools",
"run-with-devtools": "cross-env REACT_DEVTOOLS=1 run-p --print-label react-devtools start",
"update-signal-symbols": "node scripts/update-signal-symbols.mjs",
"changeset:version": "changeset version && pnpm install --lockfile-only",
"changeset:publish": "changeset publish"
@@ -303,8 +301,6 @@
"react-aria": "3.47.0",
"react-aria-components": "1.16.0",
"react-blurhash": "0.3.0",
"react-devtools": "7.0.1",
"react-devtools-core": "7.0.1",
"react-dom": "19.2.4",
"react-intl": "10.1.0",
"react-popper": "2.3.0",
-631
View File
File diff suppressed because it is too large Load Diff
-4
View File
@@ -32,7 +32,6 @@ trustPolicyExclude:
auditConfig:
ignoreGhsas:
- GHSA-3xgq-45jj-v275 # react-devtools > cross-spawn
- GHSA-hfvx-25r5-qc3w # fabric (toSVG)
- GHSA-5c6j-r48x-rmvq # @storybook/addon-webpack5-compiler-swc > serialize-javascript
- GHSA-2w69-qvjg-hvjx # sticker-creator > @remix-run/router
@@ -41,8 +40,6 @@ auditConfig:
- GHSA-v56q-mh7h-f735 # used by sass, only used at dev-time
- GHSA-xvcm-6775-5m9r # used by sass, only used at dev-time
- GHSA-7g7r-gx96-252g # electron-builder > app-builder-lib
- GHSA-jmr9-qjv8-65gv # react-devtools > electron > extract-zip
- GHSA-7pqw-9j4j-h8q3 # react-devtools > electron > extract-zip
overrides:
'@electron/rebuild>node-gyp': '12.4.0'
@@ -99,7 +96,6 @@ allowBuilds:
'@signalapp/windows-ucv@1.0.1': true
'@swc/core@1.10.16': true
'@tailwindcss/oxide@4.3.0': true
'electron@39.8.10': true # duplicate package through react-devtools
'electron@44.4.5': true
'fs-xattr@0.4.0': true
-5
View File
@@ -66,11 +66,6 @@ const defaults = {
jsx: 'react-jsx',
define: {
'process.env.IS_BUNDLED': 'true',
...(isProd
? {
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'undefined',
}
: {}),
},
},
plugins: [
-14
View File
@@ -1,14 +0,0 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
declare module 'react-devtools-core' {
type DevToolsOptions = {
useHttps?: boolean;
};
function initialize(): void;
function connectToDevTools(options?: DevToolsOptions): void;
export { initialize, connectToDevTools };
}
-2
View File
@@ -235,8 +235,6 @@ const excludedFilesRegexp = RegExp(
'^node_modules/prop-types/.+',
'^node_modules/ramda/.+',
'^node_modules/rambda/.+',
'^node_modules/react-devtools/.+',
'^node_modules/react-devtools-core/.+',
'^node_modules/react-dev-utils/.+',
'^node_modules/react-docgen/.+',
'^node_modules/react-error-overlay/.+',
-17
View File
@@ -1,17 +0,0 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { Environment, getEnvironment } from '../../environment.std.ts';
if (
process.env.NODE_ENV !== 'production' &&
getEnvironment() === Environment.Development &&
Boolean(process.env.REACT_DEVTOOLS)
) {
// Not bundled in the production app
// oxlint-disable-next-line global-require, typescript/no-var-requires
const { initialize, connectToDevTools } = require('react-devtools-core');
initialize();
connectToDevTools();
}
-1
View File
@@ -11,7 +11,6 @@ import '../clipboard.preload.ts';
// Connect websocket early
import '../../textsecure/preconnect.preload.ts';
import './phase0-devtools.node.ts';
import './phase1-ipc.preload.ts';
import '../preload.preload.ts';
import './phase2-dependencies.preload.ts';