-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Relevant version
- 0.x
- 1.x
- 2.x
Relevant libraries
- utils
- core
- network
- jsonapi
- jsonapi-angular
Breaking change
No
Description
isomorphic-fetch is used both in DatX unit tests and in any apps that might use datx on server-side. This lib is 3 years old and I would not consider it safe for production, from security perspective.
In node 20, we have experimental native fetch
API and it is stable in 21. We should look into using that for all apps that are running node >=21 (so I guess when we switch to 22 LTS would be the ideal time). I have tried using fetch
on some app I am working on that runs datx unit tests in node and it does not work. Simply removing the use of fetch from isomorphic-fetch
and using native fetch causes this error:
Note: jsonapi-angular
is not affected, because there we connect fetchReference
to Angular's HttpClient
(which in the background uses native XHR in the browser and xhr2 in node)