-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #421 from newrelic/ru/upgrade-gatsby-38
chore: upgrade gatsby to v3.8
- Loading branch information
Showing
13 changed files
with
2,525 additions
and
1,591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
const composeHandlers = (...fns) => (...args) => { | ||
fns.filter(Boolean).forEach((fn) => fn(...args)); | ||
}; | ||
const composeHandlers = | ||
(...fns) => | ||
(...args) => { | ||
fns.filter(Boolean).forEach((fn) => fn(...args)); | ||
}; | ||
|
||
export default composeHandlers; |
27 changes: 13 additions & 14 deletions
27
packages/gatsby-theme-newrelic/src/utils/configBuilder.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
const { merge, omit } = require('lodash'); | ||
const getResolvedEnv = require('./config/resolvedEnv'); | ||
|
||
const buildConfigGetter = ( | ||
configKey, | ||
{ defaults = {}, envOptions = false } = {} | ||
) => (themeOptions) => { | ||
const config = themeOptions[configKey]; | ||
const buildConfigGetter = | ||
(configKey, { defaults = {}, envOptions = false } = {}) => | ||
(themeOptions) => { | ||
const config = themeOptions[configKey]; | ||
|
||
if (!config) { | ||
return null; | ||
} | ||
if (!config) { | ||
return null; | ||
} | ||
|
||
return merge( | ||
defaults, | ||
omit(config, ['env']), | ||
envOptions && config.env ? config.env[getResolvedEnv(themeOptions)] : {} | ||
); | ||
}; | ||
return merge( | ||
defaults, | ||
omit(config, ['env']), | ||
envOptions && config.env ? config.env[getResolvedEnv(themeOptions)] : {} | ||
); | ||
}; | ||
|
||
module.exports = { buildConfigGetter }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.