Move from node-fetch to cross-fetch

This commit is contained in:
Salman AlSaigal
2021-11-21 02:31:03 +03:00
parent 0f24d0957a
commit e758cd198d
3 changed files with 19 additions and 3 deletions

18
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"license": "MIT",
"dependencies": {
"dotenv": "^9.0.2",
"node-fetch": "^2.6.1"
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@types/node": "^15.3.0",
@@ -653,6 +653,14 @@
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true
},
"node_modules/cross-fetch": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz",
"integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==",
"dependencies": {
"node-fetch": "2.6.1"
}
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -3252,6 +3260,14 @@
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true
},
"cross-fetch": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz",
"integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==",
"requires": {
"node-fetch": "2.6.1"
}
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",

View File

@@ -41,7 +41,7 @@
"typescript": "^4.2.4"
},
"dependencies": {
"node-fetch": "^2.6.1"
"cross-fetch": "^3.1.4"
},
"volta": {
"node": "15.13.0",

View File

@@ -1,4 +1,4 @@
import fetch from 'node-fetch';
import fetch from 'cross-fetch';
const BASE_URL_V3 = 'https://api.themoviedb.org/3';