Commit 8344df7
fix(api-request): replace deprecated url.parse() with WHATWG URL
url.parse() is deprecated (DEP0169) and emits warnings on every cold
start in serverless runtimes. Migrate the two call sites in
BaseRequestConfigImpl.buildUrl() to the WHATWG URL constructor,
matching the pattern from #3061.
The protected buildUrl() return type changes from url.UrlWithStringQuery
to URL. Both call sites are inside the same file. parsed.path is
replaced with ${parsed.pathname}${parsed.search} so the request path on
the wire stays byte-for-byte identical, and parsed.port is now string
(always); the existing if (!port) falsy check still catches the empty
case.
Fixes #3118.1 parent 1b0a0d0 commit 8344df7
1 file changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
991 | 990 | | |
992 | 991 | | |
993 | 992 | | |
994 | | - | |
| 993 | + | |
995 | 994 | | |
| 995 | + | |
996 | 996 | | |
997 | | - | |
| 997 | + | |
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 1002 | + | |
| 1003 | + | |
1005 | 1004 | | |
1006 | 1005 | | |
1007 | 1006 | | |
1008 | 1007 | | |
1009 | 1008 | | |
1010 | | - | |
| 1009 | + | |
1011 | 1010 | | |
1012 | 1011 | | |
1013 | 1012 | | |
| |||
1044 | 1043 | | |
1045 | 1044 | | |
1046 | 1045 | | |
1047 | | - | |
| 1046 | + | |
1048 | 1047 | | |
1049 | 1048 | | |
1050 | 1049 | | |
| |||
1054 | 1053 | | |
1055 | 1054 | | |
1056 | 1055 | | |
1057 | | - | |
| 1056 | + | |
1058 | 1057 | | |
1059 | 1058 | | |
1060 | 1059 | | |
| |||
1082 | 1081 | | |
1083 | 1082 | | |
1084 | 1083 | | |
1085 | | - | |
| 1084 | + | |
1086 | 1085 | | |
1087 | 1086 | | |
1088 | 1087 | | |
| |||
0 commit comments