Skip to content

Commit

Permalink
use isomorphic-unfetch, remove node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
0is1 committed Oct 5, 2019
1 parent 12a4dfc commit 9845e41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -86,7 +86,6 @@
"next-i18next": "^1.2.1",
"next-redux-saga": "^4.0.2",
"next-redux-wrapper": "^3.0.0",
"node-fetch": "^2.6.0",
"pm2": "^3.5.1",
"react": "^16.9.0",
"react-apollo": "^3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions sitemap.js
@@ -1,4 +1,4 @@
const fetch = require('node-fetch');
const fetch = require('isomorphic-unfetch');
const sm = require('sitemap');

const coursesContainsData = courses => Array.isArray(courses) && courses.length > 0;
Expand Down Expand Up @@ -34,7 +34,7 @@ const sitemap = sm.createSitemap({
cacheTime: CACHE_TIME_MS,
});

// For now, lets use just in "memory cache" to check if courses data is fetched
// For now, lets use just "in memory cache" to check if courses data is fetched
const inMemoryCache = { timestamp: 0 };

const setup = async () => {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -8405,7 +8405,7 @@ node-environment-flags@^1.0.5:
object.getownpropertydescriptors "^2.0.3"
semver "^5.7.0"

node-fetch@2.6.0, node-fetch@^2.1.1, node-fetch@^2.6.0:
node-fetch@2.6.0, node-fetch@^2.1.1:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
Expand Down

0 comments on commit 9845e41

Please sign in to comment.