From 72ffacf27327e96800c1c368ec1f6f91dd5cb90d Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Thu, 10 May 2018 10:34:29 -0700 Subject: [PATCH] [v2] Initial commit of gatsby-plugin-guess-js & gatsby-source-wikipedia (#5358) * Add gatsby-source-wikipedia * Add gatsby-plugin-guess-js * Only run guess code during builds as can error during development * Set packages to alpha * Add more keywords to gatsby-source-wikipedia * Document plugins --- src/create-remote-file-node.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/create-remote-file-node.js b/src/create-remote-file-node.js index 4b73163215f59..c50c01b2eebea 100644 --- a/src/create-remote-file-node.js +++ b/src/create-remote-file-node.js @@ -158,7 +158,14 @@ const requestRemoteNode = (url, headers, tmpFilename, filename) => * @param {CreateRemoteFileNodePayload} options * @return {Promise} Resolves with the fileNode */ -async function processRemoteNode({ url, store, cache, createNode, auth = {}, createNodeId }) { +async function processRemoteNode({ + url, + store, + cache, + createNode, + auth = {}, + createNodeId, +}) { // Ensure our cache directory exists. const programDir = store.getState().program.directory await fs.ensureDir(path.join(programDir, CACHE_DIR, FS_PLUGIN_DIR)) @@ -260,7 +267,14 @@ const pushTask = task => * @param {CreateRemoteFileNodePayload} options * @return {Promise} Returns the created node */ -module.exports = ({ url, store, cache, createNode, auth = {}, createNodeId }) => { +module.exports = ({ + url, + store, + cache, + createNode, + auth = {}, + createNodeId, +}) => { // Check if we already requested node for this remote file // and return stored promise if we did. if (processingCache[url]) {