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)
Mon, Nov 25, 2:59 PM
Unknown Object (File)
Sat, Nov 23, 9:55 AM
Unknown Object (File)
Sat, Nov 23, 9:55 AM
Unknown Object (File)
Sat, Nov 23, 8:33 AM
Unknown Object (File)
Sat, Nov 23, 7:07 AM
Unknown Object (File)
Sat, Nov 23, 4:24 AM
Unknown Object (File)
Mon, Nov 18, 9:10 AM
Unknown Object (File)
Sun, Nov 10, 8:35 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
No Lint Coverage
Unit
No Test Coverage

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