Page MenuHomePhabricator

Remove 3rd node-fetch package and use native API instead
ClosedPublic

Authored by marcin on Jul 28 2023, 6:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 3:23 PM
Unknown Object (File)
Apr 8 2024, 5:11 AM
Unknown Object (File)
Mar 12 2024, 4:55 PM
Unknown Object (File)
Mar 12 2024, 3:47 PM
Unknown Object (File)
Mar 7 2024, 5:57 AM
Unknown Object (File)
Mar 7 2024, 5:57 AM
Unknown Object (File)
Mar 7 2024, 4:26 AM
Unknown Object (File)
Mar 7 2024, 4:24 AM
Subscribers

Details

Summary

As of the parent differential we no longer have to use 3rd party node-fetch API since its
enchanced version comes embedded within node v18. This differential removes this package from the project
and replaces its useges with native API.

Test Plan

Tried sending messages to windows app and they were received correctly. Confirmed that the keyserver obtained WNS token correctly.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rebase to update commit message

keyserver/src/push/utils.js
370 ↗(On Diff #29167)

In node-fetch result.headers.get('....') is typed as string, while in native node-fetch it is typed as null | string. Therefore without this invariant return type of wnsPush would be violated as it expects wnsID property to be always string.

package.json
56 ↗(On Diff #29167)

If anyone gets confused the reason for this changed has been explained previously: https://phab.comm.dev/D8529?id=28774#inline-54808

michal edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Aug 1 2023, 9:35 AM