Skip to content

Commit 37c2a88

Browse files
Use Node-Fetch instead of Request for TS client (#19708)
1 parent 25b4f80 commit 37c2a88

File tree

14 files changed

+204
-771
lines changed

14 files changed

+204
-771
lines changed

src/Components/Web.JS/dist/Release/blazor.webassembly.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/yarn.lock

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@ abbrev@1:
607607
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
608608
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
609609

610+
abort-controller@^3.0.0:
611+
version "3.0.0"
612+
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
613+
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
614+
dependencies:
615+
event-target-shim "^5.0.0"
616+
610617
acorn-globals@^4.1.0:
611618
version "4.3.0"
612619
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103"
@@ -1657,6 +1664,11 @@ es-to-primitive@^1.2.0:
16571664
is-date-object "^1.0.1"
16581665
is-symbol "^1.0.2"
16591666

1667+
es6-denodeify@^0.1.1:
1668+
version "0.1.5"
1669+
resolved "https://registry.yarnpkg.com/es6-denodeify/-/es6-denodeify-0.1.5.tgz#31d4d5fe9c5503e125460439310e16a2a3f39c1f"
1670+
integrity sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8=
1671+
16601672
escape-string-regexp@^1.0.5:
16611673
version "1.0.5"
16621674
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@@ -1785,6 +1797,11 @@ esutils@^2.0.2:
17851797
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
17861798
integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=
17871799

1800+
event-target-shim@^5.0.0:
1801+
version "5.0.1"
1802+
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
1803+
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
1804+
17881805
events@^3.0.0:
17891806
version "3.0.0"
17901807
resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88"
@@ -1935,6 +1952,14 @@ fb-watchman@^2.0.0:
19351952
dependencies:
19361953
bser "^2.0.0"
19371954

1955+
fetch-cookie@^0.7.3:
1956+
version "0.7.3"
1957+
resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.7.3.tgz#b8d023f421dd2b2f4a0eca9cd7318a967ed4eed8"
1958+
integrity sha512-rZPkLnI8x5V+zYAiz8QonAHsTb4BY+iFowFBI1RFn0zrO343AVp9X7/yUj/9wL6Ef/8fLls8b/vGtzUvmyAUGA==
1959+
dependencies:
1960+
es6-denodeify "^0.1.1"
1961+
tough-cookie "^2.3.3"
1962+
19381963
figgy-pudding@^3.5.1:
19391964
version "3.5.1"
19401965
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
@@ -3576,6 +3601,11 @@ nice-try@^1.0.4:
35763601
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
35773602
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
35783603

3604+
node-fetch@^2.6.0:
3605+
version "2.6.0"
3606+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
3607+
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
3608+
35793609
node-int64@^0.4.0:
35803610
version "0.4.0"
35813611
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
@@ -4265,7 +4295,7 @@ request-promise-native@^1.0.5:
42654295
stealthy-require "^1.1.1"
42664296
tough-cookie "^2.3.3"
42674297

4268-
request@^2.87.0, request@^2.88.0:
4298+
request@^2.87.0:
42694299
version "2.88.0"
42704300
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
42714301
integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==

src/SignalR/clients/ts/FunctionalTests/ts/Common.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { MessagePackHubProtocol } from "@microsoft/signalr-protocol-msgpack";
66
import { TestLogger } from "./TestLogger";
77

88
import { FetchHttpClient } from "@microsoft/signalr/dist/esm/FetchHttpClient";
9-
import { NodeHttpClient } from "@microsoft/signalr/dist/esm/NodeHttpClient";
109
import { Platform } from "@microsoft/signalr/dist/esm/Utils";
1110
import { XhrHttpClient } from "@microsoft/signalr/dist/esm/XhrHttpClient";
1211

@@ -120,12 +119,9 @@ export function getHttpClients(): HttpClient[] {
120119
if (typeof XMLHttpRequest !== "undefined") {
121120
httpClients.push(new XhrHttpClient(TestLogger.instance));
122121
}
123-
if (typeof fetch !== "undefined") {
122+
if (typeof fetch !== "undefined" || Platform.isNode) {
124123
httpClients.push(new FetchHttpClient(TestLogger.instance));
125124
}
126-
if (Platform.isNode) {
127-
httpClients.push(new NodeHttpClient(TestLogger.instance));
128-
}
129125
return httpClients;
130126
}
131127

src/SignalR/clients/ts/FunctionalTests/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ module.exports = {
3737
externals: {
3838
"@microsoft/signalr": "signalR",
3939
"@microsoft/signalr-protocol-msgpack": "signalR.protocols.msgpack",
40-
"request": "request",
4140
},
4241
};

src/SignalR/clients/ts/FunctionalTests/yarn.lock

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@
4343
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.49.tgz#ab4df6e505db088882c8ce5417ae0bc8cbb7a8a6"
4444
integrity sha512-YY0Okyn4QXC4ugJI+Kng5iWjK8A6eIHiQVaGIhJkyn0YL6Iqo0E0tBC8BuhvYcBK87vykBijM5FtMnCqaa5anA==
4545

46+
abort-controller@^3.0.0:
47+
version "3.0.0"
48+
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
49+
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
50+
dependencies:
51+
event-target-shim "^5.0.0"
52+
4653
accepts@~1.3.4:
4754
version "1.3.7"
4855
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
@@ -600,6 +607,11 @@ ent@~2.2.0:
600607
resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d"
601608
integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0=
602609

610+
es6-denodeify@^0.1.1:
611+
version "0.1.5"
612+
resolved "https://registry.yarnpkg.com/es6-denodeify/-/es6-denodeify-0.1.5.tgz#31d4d5fe9c5503e125460439310e16a2a3f39c1f"
613+
integrity sha1-MdTV/pxVA+ElRgQ5MQ4WoqPznB8=
614+
603615
es6-promise@^4.0.3, es6-promise@^4.2.4:
604616
version "4.2.8"
605617
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
@@ -622,6 +634,11 @@ escape-string-regexp@^1.0.5:
622634
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
623635
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
624636

637+
event-target-shim@^5.0.0:
638+
version "5.0.1"
639+
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
640+
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
641+
625642
eventemitter3@^3.0.0:
626643
version "3.1.2"
627644
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
@@ -659,6 +676,14 @@ fast-json-stable-stringify@^2.0.0:
659676
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
660677
integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=
661678

679+
fetch-cookie@^0.7.3:
680+
version "0.7.3"
681+
resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.7.3.tgz#b8d023f421dd2b2f4a0eca9cd7318a967ed4eed8"
682+
integrity sha512-rZPkLnI8x5V+zYAiz8QonAHsTb4BY+iFowFBI1RFn0zrO343AVp9X7/yUj/9wL6Ef/8fLls8b/vGtzUvmyAUGA==
683+
dependencies:
684+
es6-denodeify "^0.1.1"
685+
tough-cookie "^2.3.3"
686+
662687
fill-range@^7.0.1:
663688
version "7.0.1"
664689
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
@@ -1218,6 +1243,11 @@ [email protected]:
12181243
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
12191244
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
12201245

1246+
node-fetch@^2.6.0:
1247+
version "2.6.0"
1248+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
1249+
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
1250+
12211251
normalize-path@^2.0.0:
12221252
version "2.1.1"
12231253
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
@@ -1328,12 +1358,17 @@ psl@^1.1.24:
13281358
resolved "https://registry.yarnpkg.com/psl/-/psl-1.2.0.tgz#df12b5b1b3a30f51c329eacbdef98f3a6e136dc6"
13291359
integrity sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==
13301360

1361+
psl@^1.1.28:
1362+
version "1.7.0"
1363+
resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c"
1364+
integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==
1365+
13311366
punycode@^1.4.1:
13321367
version "1.4.1"
13331368
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
13341369
integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
13351370

1336-
punycode@^2.1.0:
1371+
punycode@^2.1.0, punycode@^2.1.1:
13371372
version "2.1.1"
13381373
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
13391374
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
@@ -1408,7 +1443,7 @@ remove-trailing-separator@^1.0.1:
14081443
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
14091444
integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
14101445

1411-
[email protected], request@^2.88.0:
1446+
14121447
version "2.88.0"
14131448
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
14141449
integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==
@@ -1649,6 +1684,14 @@ [email protected]:
16491684
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
16501685
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
16511686

1687+
tough-cookie@^2.3.3:
1688+
version "2.5.0"
1689+
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
1690+
integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
1691+
dependencies:
1692+
psl "^1.1.28"
1693+
punycode "^2.1.1"
1694+
16521695
tough-cookie@~2.4.3:
16531696
version "2.4.3"
16541697
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"

0 commit comments

Comments
 (0)