Skip to content

Commit

Permalink
feat: 🎸 Use node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
joseguerrerov committed Jun 28, 2020
1 parent 9323696 commit 537291f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
commitlint.config.js
.idea/
2 changes: 2 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const fetch = require('node-fetch');
const { name } = require('./package.json');


exports.sourceNodes = async ({ actions, createNodeId, createContentDigest, reporter }, options) => {
if (!options.spaceId) return reporter.error(`🚨 ${name}:spaceId is a required option `);
if (!options.accessToken) return reporter.error(`🚨 ${name}:accessToken is a required option `);
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-source-contentful-locales",
"version": "0.0.1",
"version": "0.0.3",
"main": "index.js",
"description": "Get the list of locales from a given space",
"keywords": [
Expand All @@ -21,5 +21,8 @@
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"husky": "^4.2.5"
},
"dependencies": {
"node-fetch": "^2.6.0"
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,11 @@ mkdirp@^0.5.1:
dependencies:
minimist "^1.2.5"

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

normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
Expand Down

0 comments on commit 537291f

Please sign in to comment.