Skip to content

Commit 039b1a4

Browse files
committed
chore[react-devtools]: ip => internal-ip
1 parent eb259b5 commit 039b1a4

File tree

3 files changed

+46
-81
lines changed

3 files changed

+46
-81
lines changed

packages/react-devtools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"dependencies": {
2626
"cross-spawn": "^5.0.1",
2727
"electron": "^23.1.2",
28-
"ip": "^2.0.1",
28+
"internal-ip": "^6.2.0",
2929
"minimist": "^1.2.3",
3030
"react-devtools-core": "5.2.0",
3131
"update-notifier": "^2.1.0"

packages/react-devtools/preload.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const {clipboard, shell, contextBridge} = require('electron');
22
const fs = require('fs');
3-
const {address} = require('ip');
3+
const internalIP = require('internal-ip');
44

55
// Expose protected methods so that render process does not need unsafe node integration
66
contextBridge.exposeInMainWorld('api', {
77
electron: {clipboard, shell},
8-
ip: {address},
8+
ip: {address: internalIP.v4.sync},
99
getDevTools() {
1010
let devtools;
1111
try {

yarn.lock

+43-78
Original file line numberDiff line numberDiff line change
@@ -6498,7 +6498,7 @@ deepmerge@^4.2.2:
64986498
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
64996499
integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
65006500

6501-
default-gateway@^6.0.3:
6501+
default-gateway@^6.0.0, default-gateway@^6.0.3:
65026502
version "6.0.3"
65036503
resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71"
65046504
integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==
@@ -7226,7 +7226,7 @@ eslint-utils@^2.0.0, eslint-utils@^2.1.0:
72267226
dependencies:
72277227
eslint-visitor-keys "^1.1.0"
72287228

7229-
"eslint-v7@npm:eslint@^7.7.0":
7229+
"eslint-v7@npm:eslint@^7.7.0", eslint@^7.7.0:
72307230
version "7.32.0"
72317231
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"
72327232
integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==
@@ -7389,52 +7389,6 @@ [email protected]:
73897389
table "^5.2.3"
73907390
text-table "^0.2.0"
73917391

7392-
eslint@^7.7.0:
7393-
version "7.32.0"
7394-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"
7395-
integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==
7396-
dependencies:
7397-
"@babel/code-frame" "7.12.11"
7398-
"@eslint/eslintrc" "^0.4.3"
7399-
"@humanwhocodes/config-array" "^0.5.0"
7400-
ajv "^6.10.0"
7401-
chalk "^4.0.0"
7402-
cross-spawn "^7.0.2"
7403-
debug "^4.0.1"
7404-
doctrine "^3.0.0"
7405-
enquirer "^2.3.5"
7406-
escape-string-regexp "^4.0.0"
7407-
eslint-scope "^5.1.1"
7408-
eslint-utils "^2.1.0"
7409-
eslint-visitor-keys "^2.0.0"
7410-
espree "^7.3.1"
7411-
esquery "^1.4.0"
7412-
esutils "^2.0.2"
7413-
fast-deep-equal "^3.1.3"
7414-
file-entry-cache "^6.0.1"
7415-
functional-red-black-tree "^1.0.1"
7416-
glob-parent "^5.1.2"
7417-
globals "^13.6.0"
7418-
ignore "^4.0.6"
7419-
import-fresh "^3.0.0"
7420-
imurmurhash "^0.1.4"
7421-
is-glob "^4.0.0"
7422-
js-yaml "^3.13.1"
7423-
json-stable-stringify-without-jsonify "^1.0.1"
7424-
levn "^0.4.1"
7425-
lodash.merge "^4.6.2"
7426-
minimatch "^3.0.4"
7427-
natural-compare "^1.4.0"
7428-
optionator "^0.9.1"
7429-
progress "^2.0.0"
7430-
regexpp "^3.1.0"
7431-
semver "^7.2.1"
7432-
strip-ansi "^6.0.0"
7433-
strip-json-comments "^3.1.0"
7434-
table "^6.0.9"
7435-
text-table "^0.2.0"
7436-
v8-compile-cache "^2.0.3"
7437-
74387392
74397393
version "6.2.1"
74407394
resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a"
@@ -9489,6 +9443,16 @@ inquirer@^6.2.2:
94899443
strip-ansi "^5.1.0"
94909444
through "^2.3.6"
94919445

9446+
internal-ip@^6.2.0:
9447+
version "6.2.0"
9448+
resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-6.2.0.tgz#d5541e79716e406b74ac6b07b856ef18dc1621c1"
9449+
integrity sha512-D8WGsR6yDt8uq7vDMu7mjcR+yRMm3dW8yufyChmszWRjcSHuxLBkR3GdS2HZAjodsaGuCvXeEJpueisXJULghg==
9450+
dependencies:
9451+
default-gateway "^6.0.0"
9452+
ipaddr.js "^1.9.1"
9453+
is-ip "^3.1.0"
9454+
p-event "^4.2.0"
9455+
94929456
interpret@^1.0.0:
94939457
version "1.2.0"
94949458
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
@@ -9519,12 +9483,17 @@ invert-kv@^3.0.0:
95199483
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-3.0.1.tgz#a93c7a3d4386a1dc8325b97da9bb1620c0282523"
95209484
integrity sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==
95219485

9522-
ip@^1.1.4, ip@^1.1.5:
9486+
ip-regex@^4.0.0:
9487+
version "4.3.0"
9488+
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5"
9489+
integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==
9490+
9491+
ip@^1.1.5:
95239492
version "1.1.5"
95249493
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
95259494
integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
95269495

9527-
9496+
[email protected], ipaddr.js@^1.9.1:
95289497
version "1.9.1"
95299498
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
95309499
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
@@ -9778,6 +9747,13 @@ is-installed-globally@^0.3.1:
97789747
global-dirs "^2.0.1"
97799748
is-path-inside "^3.0.1"
97809749

9750+
is-ip@^3.1.0:
9751+
version "3.1.0"
9752+
resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8"
9753+
integrity sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==
9754+
dependencies:
9755+
ip-regex "^4.0.0"
9756+
97819757
is-jpg@^2.0.0:
97829758
version "2.0.0"
97839759
resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-2.0.0.tgz#2e1997fa6e9166eaac0242daae443403e4ef1d97"
@@ -12389,6 +12365,13 @@ p-event@^2.1.0:
1238912365
dependencies:
1239012366
p-timeout "^2.0.1"
1239112367

12368+
p-event@^4.2.0:
12369+
version "4.2.0"
12370+
resolved "https://registry.yarnpkg.com/p-event/-/p-event-4.2.0.tgz#af4b049c8acd91ae81083ebd1e6f5cae2044c1b5"
12371+
integrity sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==
12372+
dependencies:
12373+
p-timeout "^3.1.0"
12374+
1239212375
p-finally@^1.0.0:
1239312376
version "1.0.0"
1239412377
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
@@ -12485,6 +12468,13 @@ p-timeout@^2.0.1:
1248512468
dependencies:
1248612469
p-finally "^1.0.0"
1248712470

12471+
p-timeout@^3.1.0:
12472+
version "3.2.0"
12473+
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
12474+
integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
12475+
dependencies:
12476+
p-finally "^1.0.0"
12477+
1248812478
p-try@^2.0.0:
1248912479
version "2.2.0"
1249012480
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
@@ -14987,7 +14977,7 @@ string-natural-compare@^3.0.1:
1498714977
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
1498814978
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==
1498914979

14990-
"string-width-cjs@npm:string-width@^4.2.0":
14980+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
1499114981
version "4.2.3"
1499214982
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1499314983
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -15022,15 +15012,6 @@ string-width@^4.0.0:
1502215012
is-fullwidth-code-point "^3.0.0"
1502315013
strip-ansi "^6.0.0"
1502415014

15025-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
15026-
version "4.2.3"
15027-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
15028-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
15029-
dependencies:
15030-
emoji-regex "^8.0.0"
15031-
is-fullwidth-code-point "^3.0.0"
15032-
strip-ansi "^6.0.1"
15033-
1503415015
string-width@^5.0.1, string-width@^5.1.2:
1503515016
version "5.1.2"
1503615017
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
@@ -15091,7 +15072,7 @@ string_decoder@~1.1.1:
1509115072
dependencies:
1509215073
safe-buffer "~5.1.0"
1509315074

15094-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
15075+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
1509515076
version "6.0.1"
1509615077
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1509715078
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -15119,13 +15100,6 @@ strip-ansi@^5.1.0:
1511915100
dependencies:
1512015101
ansi-regex "^4.1.0"
1512115102

15122-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
15123-
version "6.0.1"
15124-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
15125-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
15126-
dependencies:
15127-
ansi-regex "^5.0.1"
15128-
1512915103
strip-ansi@^7.0.1:
1513015104
version "7.1.0"
1513115105
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -16573,7 +16547,7 @@ workerize-loader@^2.0.2:
1657316547
dependencies:
1657416548
loader-utils "^2.0.0"
1657516549

16576-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
16550+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
1657716551
version "7.0.0"
1657816552
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1657916553
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -16591,15 +16565,6 @@ wrap-ansi@^6.2.0:
1659116565
string-width "^4.1.0"
1659216566
strip-ansi "^6.0.0"
1659316567

16594-
wrap-ansi@^7.0.0:
16595-
version "7.0.0"
16596-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
16597-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
16598-
dependencies:
16599-
ansi-styles "^4.0.0"
16600-
string-width "^4.1.0"
16601-
strip-ansi "^6.0.0"
16602-
1660316568
wrap-ansi@^8.1.0:
1660416569
version "8.1.0"
1660516570
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)