From c0032f0c725673491699e4a5771e21669ca56a8e Mon Sep 17 00:00:00 2001 From: Dustin Schau Date: Mon, 22 Jul 2019 17:23:37 -0700 Subject: [PATCH 001/157] fix(www): copy button now works on iOS (#15983) * fix(www): add contenteditable attribute to fix iOS Safari * chore: set contenteditable and use range for Safari * chore: add propTypes validation * chore: disable if desired * test: fix failing test * Update www/src/components/code-block/index.js * Update www/src/components/code-block/__tests__/index.js Co-Authored-By: Ward Peeters --- .../components/code-block/__tests__/index.js | 7 ++++ www/src/components/code-block/index.js | 38 +++++++++++++------ www/src/components/copy.js | 22 +++++++---- 3 files changed, 48 insertions(+), 19 deletions(-) diff --git a/www/src/components/code-block/__tests__/index.js b/www/src/components/code-block/__tests__/index.js index 8bbcbc7a8962a..8a7b47d080498 100644 --- a/www/src/components/code-block/__tests__/index.js +++ b/www/src/components/code-block/__tests__/index.js @@ -3,7 +3,14 @@ import CodeBlock from ".." import { fireEvent, render } from "react-testing-library" beforeEach(() => { + document.createRange = jest.fn() document.execCommand = jest.fn() + window.getSelection = jest.fn().mockImplementation(() => { + return { + addRange: jest.fn(), + removeAllRanges: jest.fn(), + } + }) }) describe(`basic functionality`, () => { diff --git a/www/src/components/code-block/index.js b/www/src/components/code-block/index.js index a316a83321a2a..8ef35c28178b4 100644 --- a/www/src/components/code-block/index.js +++ b/www/src/components/code-block/index.js @@ -1,4 +1,5 @@ import React from "react" +import PropTypes from "prop-types" import Highlight, { defaultProps } from "prism-react-renderer" import Copy from "../copy" @@ -27,9 +28,10 @@ const getParams = (name = ``) => { * we un-wind it a bit to get the string content * but keep it extensible so it can be used with just children (string) and className */ -export default ({ +const CodeBlock = ({ children, className = children.props ? children.props.className : ``, + copy, }) => { const [language, { title = `` }] = getParams(className) const [content, highlights] = normalize( @@ -55,16 +57,18 @@ export default ({ )}
-              
+              {copy && (
+                
+              )}
               
                 {tokens.map((line, i) => {
                   const lineProps = getLineProps({ line, key: i })
@@ -93,3 +97,15 @@ export default ({
     
   )
 }
+
+CodeBlock.propTypes = {
+  children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
+  className: PropTypes.string,
+  copy: PropTypes.bool,
+}
+
+CodeBlock.defaultProps = {
+  copy: true,
+}
+
+export default CodeBlock
diff --git a/www/src/components/copy.js b/www/src/components/copy.js
index daf23750382be..eac756162e764 100644
--- a/www/src/components/copy.js
+++ b/www/src/components/copy.js
@@ -13,15 +13,21 @@ import {
 } from "../utils/presets"
 
 const copyToClipboard = content => {
-  const el = document.createElement(`textarea`)
-  el.value = content
-  el.setAttribute(`readonly`, ``)
-  el.style.position = `absolute`
-  el.style.left = `-9999px`
-  document.body.appendChild(el)
-  el.select()
+  const textarea = document.createElement(`textarea`)
+  textarea.value = content
+  textarea.setAttribute(`readonly`, true)
+  textarea.setAttribute(`contenteditable`, true)
+  textarea.style.position = `absolute`
+  textarea.style.left = `-9999px`
+  document.body.appendChild(textarea)
+  textarea.select()
+  const range = document.createRange()
+  const sel = window.getSelection()
+  sel.removeAllRanges()
+  sel.addRange(range)
+  textarea.setSelectionRange(0, textarea.value.length)
   document.execCommand(`copy`)
-  document.body.removeChild(el)
+  document.body.removeChild(textarea)
 }
 
 const delay = duration => new Promise(resolve => setTimeout(resolve, duration))

From 7bffa74430b930eda9295bddb73dfb9c8355d069 Mon Sep 17 00:00:00 2001
From: Vishwa Mehta <32997409+mehtavishwa30@users.noreply.github.com>
Date: Tue, 23 Jul 2019 05:54:39 +0530
Subject: [PATCH 002/157] [Docs][Recipes] Recipe for Transforming Data (#15252)

* [Docs][Recipes] Recipe for Transforming Data

* Update docs/docs/recipes.md

Co-Authored-By: gillkyle 

* Update docs/docs/recipes.md

Co-Authored-By: gillkyle 

* Update docs/docs/recipes.md

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* chore: format

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Adding more brevity

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* Hint to source plugins in Prerequisites

Co-Authored-By: Marcy Sutton 

* Update docs/docs/recipes.md

Co-Authored-By: Marcy Sutton 

* fix: add note about source-filesystem per feedback
---
 docs/docs/recipes.md | 50 +++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 47 insertions(+), 3 deletions(-)

diff --git a/docs/docs/recipes.md b/docs/docs/recipes.md
index 9c56d0f6a8117..3e09127c259d0 100644
--- a/docs/docs/recipes.md
+++ b/docs/docs/recipes.md
@@ -356,7 +356,51 @@ Data sourcing in Gatsby is plugin-driven; Source plugins fetch data from their s
 
 ## Transforming data
 
-Transforming data in Gatsby is also plugin-driven; Transformer plugins take data fetched using source plugins, and process it into something more usable (e.g. JSON into JavaScript objects, markdown to HTML, and more).
+Transforming data in Gatsby is plugin-driven. Transformer plugins take data fetched using source plugins, and process it into something more usable (e.g. JSON into JavaScript objects, and more). `gatsby-transformer-plugin` can transform Markdown files to HTML.
 
-- Walk through an example using the `gatsby-transformer-remark` plugin to transform markdown files [tutorial part six](/tutorial/part-six/#transformer-plugins)
-- Search available transformer plugins in the [Gatsby library](/plugins/?=transformer)
+### Prerequisites
+
+- A Gatsby site with `gatsby-config.js` and an `index.js` page
+- A Markdown file saved in your Gatsby site `src` directory
+- A source plugin installed, such as `gatsby-source-filesystem`
+- The `gatsby-transformer-remark` plugin installed
+
+### Directions
+
+1. Add the transformer plugin in your `gatsby-config.js`:
+
+```js:title=gatsby-config.js
+plugins: [
+  // not shown: gatsby-source-filesystem for creating nodes to transform
+  `gatsby-transformer-remark`
+],
+```
+
+2. Add a GraphQL query to the `index.js` file of your Gatsby site to fetch `MarkdownRemark` nodes:
+
+```jsx:title=src/pages/index.js
+export const query = graphql`
+  query {
+    allMarkdownRemark {
+      totalCount
+      edges {
+        node {
+          id
+          frontmatter {
+            title
+            date(formatString: "DD MMMM, YYYY")
+          }
+          excerpt
+        }
+      }
+    }
+  }
+`
+```
+
+3. Restart the development server and open GraphiQL at `http://localhost:8000/___graphql`. Explore the fields available on the `MarkdownRemark` node.
+
+### Additional resources
+
+- [Tutorial on transforming Markdown to HTML](/tutorial/part-six/#transformer-plugins) using `gatsby-transformer-remark`
+- Browse available transformer plugins in the [Gatsby plugin library](/plugins/?=transformer)

From ba48fc7679fafa64c86576f25fe549ea11d7529d Mon Sep 17 00:00:00 2001
From: Lorris Saint-Genez 
Date: Mon, 22 Jul 2019 18:59:18 -0700
Subject: [PATCH 003/157] fix(PrismJS): Documentation highlighting (#15990)

Browsing through your doc, I've noticed some highlighting was broken.
Testing with `display: inline` instead of `inline-block` fixed it.
---
 www/src/utils/typography.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/src/utils/typography.js b/www/src/utils/typography.js
index adeecc811418b..cb010480345e2 100644
--- a/www/src/utils/typography.js
+++ b/www/src/utils/typography.js
@@ -315,7 +315,7 @@ const _options = {
       // PrismJS syntax highlighting token styles
       // https://www.gatsbyjs.org/packages/gatsby-remark-prismjs/
       ".token": {
-        display: `inline-block`,
+        display: `inline`,
       },
       ".token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata": {
         color: colors.code.comment,

From 157af6b779238eeb4fb41140ff3fec52bb06c671 Mon Sep 17 00:00:00 2001
From: Christopher Biscardi 
Date: Mon, 22 Jul 2019 19:00:59 -0700
Subject: [PATCH 004/157] feat(docs): update theme core API docs (#15814)

* update api docs

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 

* Update docs/docs/themes/api-reference.md

Co-Authored-By: Jason Lengstorf 
---
 docs/docs/themes/api-reference.md | 90 ++++++++++++++++++++++++-------
 1 file changed, 71 insertions(+), 19 deletions(-)

diff --git a/docs/docs/themes/api-reference.md b/docs/docs/themes/api-reference.md
index 5ad5b93ecbe28..9bc361cc5ac3c 100644
--- a/docs/docs/themes/api-reference.md
+++ b/docs/docs/themes/api-reference.md
@@ -6,8 +6,8 @@ title: Themes API Reference
 
 - [Core Gatsby APIs](#core-gatsby-apis)
 - [Configuration](#configuration)
-- [Component shadowing](#component-shadowing)
 - [Theme composition](#theme-composition)
+- [Shadowing](#shadowing)
 
 ## Core Gatsby APIs
 
@@ -22,9 +22,7 @@ If you're new to Gatsby you can get started by following along with the guides f
 
 ## Configuration
 
-Plugins can now include a `gatsby-config` in addition to the other `gatsby-*` files.
-
-You can access options that are passed to your theme in your theme's `gatsby-config`. You can use this to make filesystem sourcing configurable, accept different nav menu items, or change branding colors from the default.
+Plugins can now include a `gatsby-config` in addition to the other `gatsby-*` files. We typically refer to plugins that include a `gatsby-config.js` as a theme (more on that in [theme composition](#theme-composition)). A typical `gatsby-config.js` in a user's site that uses your theme could look like this. In this example we pass in two options to `gatsby-theme-name`: `postsPath` and `colors`.
 
 ```js:title=gatsby-config.js
 module.exports = {
@@ -42,11 +40,14 @@ module.exports = {
 }
 ```
 
-In your theme's `gatsby-config.js` you can return a function: the argument it receives are the options:
+You can access options that are passed to your theme in your theme's `gatsby-config`. You can use options to make filesystem sourcing configurable, accept different nav menu items, change branding colors from the default, and anything else you want to make configurable.
+
+To take advantage of the options that are passed in when configuring your theme in a user's site, return a function in your theme's `gatsby-config.js`. The argument the function receives is the options the user passed in.
 
 ```js:title=gatsby-config.js
 module.exports = themeOptions => {
   console.log(themeOptions)
+  // logs `postsPath` and `colors`
 
   return {
     plugins: [
@@ -56,7 +57,11 @@ module.exports = themeOptions => {
 }
 ```
 
-Then, in your theme's `gatsby-node.js` you can access them as the second argument to `createPages`:
+While using the usual object export (`module.exports = {}`) in your theme means that you can run the theme standalone as its own site, when using a function in your theme to accept options you will need to run the theme as part of an example site. See how the [theme authoring starter](https://github.com/gatsbyjs/gatsby/tree/master/themes/gatsby-starter-theme-workspace) handles this using Yarn Workspaces.
+
+### Accessing Options elsewhere
+
+Note that because themes are plugins you can also access the options in any of the lifecycle methods that you're used to. For example, in your theme's `gatsby-node.js` you can access the options as the second argument to `createPages`:
 
 ```js:title=gatsby-node.js
 exports.createPages = async ({ graphql, actions }, themeOptions) => {
@@ -64,31 +69,78 @@ exports.createPages = async ({ graphql, actions }, themeOptions) => {
 }
 ```
 
-## Component Shadowing
+## Shadowing
+
+Since themes are usually deployed as npm packages that other people use in their sites, we need a way to modify certain files, such as React components, without making changes to the source code of the theme. This is called _Shadowing_.
+
+Shadowing is a filesystem-based API that allows us to replace one file with another at build time. For example, if we had a theme with a `Header` component we could replace that `Header` with our own by creating a new file in our site and placing it in the correct location for Shadowing to find it.
+
+### Overriding
+
+Taking a closer look at our `Header` example, let's say we have a theme called `gatsby-theme-amazing`. That theme uses a `Header` component to render navigation and other miscellaneous items. The path to the component from the root of the npm package is `gatsby-theme-amazing/src/components/header.js`.
 
-You can import files from a Gatsby Theme into your project. For example, if you're using `gatsby-theme-tomato`, which has a `Layout` component located at `src/components/layout.js`, you can import it into your project like this:
+We'd like the `Header` component to do something different (maybe change colors, maybe add additional navigation items, really anything you can think of). To do that, we create a file in our site at `src/gatsby-theme-amazing/components/header.js`. We can now export any React component we want from this file and Gatsby will use it instead of the theme's component.
+
+> 💡 Note: you can shadow components from other themes using the same method. Read more about advanced applications in [latent shadowing](https://johno.com/latent-component-shadowing).
+
+### Extending
+
+In the last section we talked about completely replacing one component with another. What if we want to make a smaller change that doesn't require copy/pasting the entire theme component into our own? We can take advantage of the ability to extend components.
+
+Taking the `Header` example from before, when we write our shadowing file at `src/gatsby-theme-amazing/components/header.js`, we can import the original component and re-export it as such, adding our own overridden prop to the component.
 
 ```js
-import Layout from "gatsby-theme-tomato/src/components/Layout"
+import Header from "gatsby-theme-amazing/src/components/header"
+
+// these props are the same as the original component would get
+export default props => 
``` -Gatsby Themes also allow you to customize any file in a theme's `src` directory by following a file naming convention. -If you're using `gatsby-theme-tomato` which uses a `ProfileCard` component located at `src/components/profile-card.js` you can override the component by creating `src/gatsby-theme-tomato/components/profile-card.js`. If you want to see what props are passed you can do so by putting the props into a `pre` tag: +Taking this approach means that when we upgrade our theme later we can also take advantage of all the updates to the `Header` component because we haven't fully replaced it, just modified it. + +### What path should be used to shadow a file? + +Until we build tooling to support automatically handling shadowing, you will have to manually locate paths in a theme and create the correct shadowing paths in your site. + +Luckily, the way to do that is only a few steps. Take the `src` directory from the theme, and move it to the front of the path, then write a file at that location in your site. Looking back on our `Header` example, this is the path to the component in our theme: -```js:title=src/gatsby-theme-tomato/components/profile-card.js -import React from "react" +``` +gatsby-theme-amazing/src/components/header.js +``` -export default props =>
{JSON.stringify(props, null, 2)}
+and here is the path where we would shadow it in our site: + +``` +/src/gatsby-theme-amazing/components/header.js ``` +Shadowing only works on imported files in the `src` directory. This is because shadowing is built on top of Webpack, so the module graph needs to include the shadowable file. + +Since we can use multiple themes in a given site, there are many potential places to shadow a given file (one for each theme and one for the user's site). In the event that multiple themes are attempting to shadow `gatsby-theme-amazing/src/components/header.js`, the last theme included in the plugins array will win. The site itself takes the highest priority in shadowing. + ## Theme composition -A theme can declare another theme as a parent theme. This means that a theme can declare another theme in its -own `gatsby-config.js`. So if you'd like to use `gatsby-theme-blog` to build off of you can and install the theme -and then configure it: +Gatsby themes can compose horizontally and vertically. Vertical composition refers to the classic "parent/child" relationship. A child theme declares a parent theme in the child theme's plugins array. -```js:title=gatsby-config.js +```js:title=gatsby-theme-child/gatsby-config.js +module.exports = { + plugins: [`gatsby-theme-parent`], +} +``` + +Horizontal composition is when two different themes are used together, such as `gatsby-theme-blog` and `gatsby-theme-notes`. + +```js:title=my-site/gatsby-config.js module.exports = { - plugins: ["gatsby-theme-blog"], + plugins: [`gatsby-theme-blog`, `gatsby-theme-notes`], } ``` + +Themes at their core are an algorithm that merges multiple `gatsby-config.js` files together into a single config your site can use to build with. To do that we need to define how to combine two `gatsby-config.js`s together. Before we can do that, we need to flatten the parent/child relationships into a single array. This results in the final ordering when considering which shadowing file to use if multiple are available. + +Our first example results in a final ordering of `['gatsby-theme-parent', 'gatsby-theme-child']` (parents always come before their children so that children can override functionality), while our second example results in `['gatsby-theme-blog', 'gatsby-theme-notes']`. + +Once we have the final ordering of themes we merge them together using a reduce function. [This reduce function](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/merge-gatsby-config.js) specifies the way each key in `gatsby-config.js` will merge together. Unless otherwise specified below, the last value wins. + +- `siteMetadata` and `mapping` both merge deeply using lodash's `merge` function. This means a theme can set default values in `siteMetadata` and the site can override them using the standard `siteMetadata` object in `gatsby-config.js`. +- `plugins` are normalized to remove duplicates, then concatenated together. From ba5ea73205d3dd3b9d81ef02e71ff417499ac272 Mon Sep 17 00:00:00 2001 From: Matsuko Date: Tue, 23 Jul 2019 00:14:26 -0700 Subject: [PATCH 005/157] test(gatsby): Fix typo in test name (#15992) --- .../gatsby/src/schema/extensions/__tests__/field-extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby/src/schema/extensions/__tests__/field-extensions.js b/packages/gatsby/src/schema/extensions/__tests__/field-extensions.js index a2466af59b31d..3ea33f19c0de1 100644 --- a/packages/gatsby/src/schema/extensions/__tests__/field-extensions.js +++ b/packages/gatsby/src/schema/extensions/__tests__/field-extensions.js @@ -59,7 +59,7 @@ describe(`GraphQL field extensions`, () => { }) }) - it(`allows creating a cutom field extension`, async () => { + it(`allows creating a custom field extension`, async () => { dispatch( createFieldExtension({ name: `birthday`, From ed56afd66675514dabf79d1240caf9c69df84c56 Mon Sep 17 00:00:00 2001 From: Chuck Date: Tue, 23 Jul 2019 03:20:00 -0400 Subject: [PATCH 006/157] =?UTF-8?q?fix(gatsby-starter-blog-theme):=20Edite?= =?UTF-8?q?d=20color=20variables=20in=20them=E2=80=A6=20(#15786)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gatsby-theme-blog/gatsby-plugin-theme-ui/colors.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/gatsby-starter-blog-theme/src/gatsby-theme-blog/gatsby-plugin-theme-ui/colors.js b/themes/gatsby-starter-blog-theme/src/gatsby-theme-blog/gatsby-plugin-theme-ui/colors.js index ea87b3124ad75..668fe1847d2d3 100644 --- a/themes/gatsby-starter-blog-theme/src/gatsby-theme-blog/gatsby-plugin-theme-ui/colors.js +++ b/themes/gatsby-starter-blog-theme/src/gatsby-theme-blog/gatsby-plugin-theme-ui/colors.js @@ -7,18 +7,18 @@ import defaultThemeColors from "gatsby-theme-blog/src/gatsby-plugin-theme-ui/col * to go from default purple to a blue theme */ -// const lightBlue = `#007acc` -// const darkBlue = `#66E0FF` +// const darkBlue = `#007acc` +// const lightBlue = `#66E0FF` // const blueGray = `#282c35` export default merge(defaultThemeColors, { // text: blueGray, - // primary: lightBlue, + // primary: darkBlue, // heading: blueGray, // modes: { // dark: { // background: blueGray, - // primary: darkBlue, + // primary: lightBlue, // highlight: lightBlue, // }, // }, From 8f4d3f32d09b79477eb02565839d8b2c04e6fb93 Mon Sep 17 00:00:00 2001 From: Tian Zhang Date: Tue, 23 Jul 2019 19:04:30 +1000 Subject: [PATCH 007/157] =?UTF-8?q?chore(gatsby-plugin-guess-js):=20Update?= =?UTF-8?q?=20Readme=20on=20how=20to=20configu=E2=80=A6=20(#15774)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/gatsby-plugin-guess-js/README.md | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packages/gatsby-plugin-guess-js/README.md b/packages/gatsby-plugin-guess-js/README.md index 436f8989284d6..3a56612d83c0b 100644 --- a/packages/gatsby-plugin-guess-js/README.md +++ b/packages/gatsby-plugin-guess-js/README.md @@ -47,3 +47,33 @@ module.exports = { ], } ``` + +## Integrating with CI + +Integrating this plugin within a CI pipeline may cause errors because the plugin will prompt the user/machine to log into the Google Analytics account - you need to send a jwt to authenticate properly + +```javascript +// In your gatsby-config.js +module.exports = { + plugins: [ + { + resolve: "gatsby-plugin-guess-js", + options: { + // Find the view id in the GA admin in a section labeled "views" + GAViewID: `VIEW_ID`, + minimumThreshold: 0.03, + // Set Google Analytics jwt with Google Service Account email and private key + jwt: { + client_email: `GOOGLE_SERVICE_ACCOUNT_EMAIL`, + private_key: `GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY`, + }, + // The "period" for fetching analytic data. + period: { + startDate: new Date("2018-1-1"), + endDate: new Date(), + }, + }, + }, + ], +} +``` From 42ef13c7198d96310c9aa092404e931998d25b34 Mon Sep 17 00:00:00 2001 From: Ward Peeters Date: Tue, 23 Jul 2019 11:26:17 +0200 Subject: [PATCH 008/157] chore(release): Publish - gatsby-plugin-guess-js@1.1.3 --- packages/gatsby-plugin-guess-js/CHANGELOG.md | 4 ++++ packages/gatsby-plugin-guess-js/package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-plugin-guess-js/CHANGELOG.md b/packages/gatsby-plugin-guess-js/CHANGELOG.md index 41d1bc748d5df..d0acac9749901 100644 --- a/packages/gatsby-plugin-guess-js/CHANGELOG.md +++ b/packages/gatsby-plugin-guess-js/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-guess-js@1.1.2...gatsby-plugin-guess-js@1.1.3) (2019-07-23) + +**Note:** Version bump only for package gatsby-plugin-guess-js + ## [1.1.2](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-guess-js@1.1.1...gatsby-plugin-guess-js@1.1.2) (2019-07-12) ### Bug Fixes diff --git a/packages/gatsby-plugin-guess-js/package.json b/packages/gatsby-plugin-guess-js/package.json index 398a67659a1da..e5c682d228225 100644 --- a/packages/gatsby-plugin-guess-js/package.json +++ b/packages/gatsby-plugin-guess-js/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-plugin-guess-js", - "version": "1.1.2", + "version": "1.1.3", "description": "Gatsby plugin providing drop-in integration with Guess.js to enabling using machine learning and analytics data to power prefetching", "main": "index.js", "scripts": { From 5633fdbd1fd156c1ba71e9b56205987cdf9d2864 Mon Sep 17 00:00:00 2001 From: Samuel Raub Date: Tue, 23 Jul 2019 11:33:38 +0200 Subject: [PATCH 009/157] fix(gatsby): add jsdoc for matchPath on page Object (#15749) * Update public.js matchPatch property should be documented here in case someone wants to generate client side routes in createPages hook. * Update public.js * fix markdown in jsdoc --- packages/gatsby/src/redux/actions/public.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/gatsby/src/redux/actions/public.js b/packages/gatsby/src/redux/actions/public.js index e05a6f1475fa9..4b500a69a227e 100644 --- a/packages/gatsby/src/redux/actions/public.js +++ b/packages/gatsby/src/redux/actions/public.js @@ -91,6 +91,8 @@ const fileOkCache = {} * for detailed documentation about creating pages. * @param {Object} page a page object * @param {string} page.path Any valid URL. Must start with a forward slash + * @param {string} page.matchPath Path that Reach Router uses to match the page on the client side. + * Also see docs on [matchPath](/docs/gatsby-internals-terminology/#matchpath) * @param {string} page.component The absolute path to the component for this page * @param {Object} page.context Context data for this page. Passed as props * to the component `this.props.pageContext` as well as to the graphql query From 397237219343d43849dd324fc6a63536db2cc44f Mon Sep 17 00:00:00 2001 From: Chuck Date: Tue, 23 Jul 2019 06:24:12 -0400 Subject: [PATCH 010/157] feat: Added Powered by Gatsby note to theme footers. (#15738) --- .../src/components/home-footer.js | 4 ++++ .../src/components/footer.js | 18 ++++++++++++++++++ .../src/components/layout.js | 6 +++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 themes/gatsby-theme-notes/src/components/footer.js diff --git a/themes/gatsby-theme-blog/src/components/home-footer.js b/themes/gatsby-theme-blog/src/components/home-footer.js index a631aa9ac40e7..cbc9c62e40c00 100644 --- a/themes/gatsby-theme-blog/src/components/home-footer.js +++ b/themes/gatsby-theme-blog/src/components/home-footer.js @@ -8,6 +8,10 @@ const Footer = ({ socialLinks }) => ( pt: 3, })} > + © {new Date().getFullYear()}, Powered by + {` `} + Gatsby + {` `}•{` `} {socialLinks.map((platform, i, arr) => ( diff --git a/themes/gatsby-theme-notes/src/components/footer.js b/themes/gatsby-theme-notes/src/components/footer.js new file mode 100644 index 0000000000000..aa2d1f415e0e7 --- /dev/null +++ b/themes/gatsby-theme-notes/src/components/footer.js @@ -0,0 +1,18 @@ +import React from "react" +import { css } from "theme-ui" + +const Footer = () => ( +
+ © {new Date().getFullYear()}, Powered by + {` `} + Gatsby + {` `}•{` `} +
+) + +export default Footer diff --git a/themes/gatsby-theme-notes/src/components/layout.js b/themes/gatsby-theme-notes/src/components/layout.js index 3027a2c784d90..da7086ae9178f 100644 --- a/themes/gatsby-theme-notes/src/components/layout.js +++ b/themes/gatsby-theme-notes/src/components/layout.js @@ -2,6 +2,7 @@ import React from "react" import { Global } from "@emotion/core" import { css } from "theme-ui" import { Layout, Main, Container } from "theme-ui" +import Footer from "./footer" export default props => ( <> @@ -18,7 +19,10 @@ export default props => ( />
- {props.children} + + {props.children} +
+
From e098798cd32edc949fefda629835928781edbda9 Mon Sep 17 00:00:00 2001 From: Sai gowtham Date: Tue, 23 Jul 2019 15:57:57 +0530 Subject: [PATCH 011/157] chore(showcase): added reactgo blog (#15996) --- docs/sites.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/sites.yml b/docs/sites.yml index cc442cacbec80..759b192a7cd04 100644 --- a/docs/sites.yml +++ b/docs/sites.yml @@ -6640,3 +6640,16 @@ built_by: Little & Big built_by_url: "https://www.littleandbig.com.au/" featured: false +- title: Reactgo blog + url: https://reactgo.com/ + main_url: https://reactgo.com/ + description: > + It provides tutorials & articles about modern open source web technologies such as react,vuejs and gatsby. + categories: + - Blog + - Education + - Programming + - Web Development + built_by: Sai gowtham + built_by_url: "https://twitter.com/saigowthamr" + featured: false From 2d8cc44b6e4e960cb9b5a3c009caac5abb0ed5e9 Mon Sep 17 00:00:00 2001 From: kbasarab Date: Tue, 23 Jul 2019 07:13:22 -0400 Subject: [PATCH 012/157] chore(showcase): add City Springs (#15986) --- docs/sites.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/sites.yml b/docs/sites.yml index 759b192a7cd04..efdc894f4fea9 100644 --- a/docs/sites.yml +++ b/docs/sites.yml @@ -6653,3 +6653,14 @@ built_by: Sai gowtham built_by_url: "https://twitter.com/saigowthamr" featured: false +- title: City Springs + url: https://citysprings.com/ + main_url: https://citysprings.com/ + description: > + Sandy Springs is a city built on creative thinking and determination. They captured a bold vision for a unified platform to bring together new and existing information systems. To get there, the Sandy Springs communications team partnered with Mediacurrent on a new Drupal 8 decoupled platform architecture with a Gatsbyjs front end to power both the City Springs website and its digital signage network. Now, the Sandy Springs team can create content once and publish it everywhere. + categories: + - Community + - Government + built_by: Mediacurrent + built_by_url: https://www.mediacurrent.com + featured: false From 9d5026f975739db24e49ed2717320c13dede311b Mon Sep 17 00:00:00 2001 From: Asko Soukka Date: Tue, 23 Jul 2019 14:17:48 +0300 Subject: [PATCH 013/157] fix(gatsby): Add touchNode to populate typeOwners (#15919) --- packages/gatsby/src/redux/actions/public.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/gatsby/src/redux/actions/public.js b/packages/gatsby/src/redux/actions/public.js index 4b500a69a227e..aacf9ae8b4c9a 100644 --- a/packages/gatsby/src/redux/actions/public.js +++ b/packages/gatsby/src/redux/actions/public.js @@ -794,6 +794,11 @@ actions.touchNode = (options: any, plugin?: Plugin) => { nodeId = options } + const node = getNode(nodeId) + if (node && !typeOwners[node.internal.type]) { + typeOwners[node.internal.type] = node.internal.owner + } + return { type: `TOUCH_NODE`, plugin, From 751ed69f761bb792ab742b1acd94929c899de3c0 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Tue, 23 Jul 2019 13:21:38 +0200 Subject: [PATCH 014/157] chore(release): Publish - gatsby@2.13.34 --- packages/gatsby/CHANGELOG.md | 7 +++++++ packages/gatsby/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/gatsby/CHANGELOG.md b/packages/gatsby/CHANGELOG.md index d19dd62920f1f..4265e9e34bd9f 100644 --- a/packages/gatsby/CHANGELOG.md +++ b/packages/gatsby/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.13.34](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.13.33...gatsby@2.13.34) (2019-07-23) + +### Bug Fixes + +- **gatsby:** add jsdoc for matchPath on page Object ([#15749](https://github.com/gatsbyjs/gatsby/issues/15749)) ([5633fdb](https://github.com/gatsbyjs/gatsby/commit/5633fdb)) +- **gatsby:** Add touchNode to populate typeOwners ([#15919](https://github.com/gatsbyjs/gatsby/issues/15919)) ([9d5026f](https://github.com/gatsbyjs/gatsby/commit/9d5026f)) + ## [2.13.33](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.13.32...gatsby@2.13.33) (2019-07-22) ### Bug Fixes diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index cc7e0f85401b7..604c458d18aad 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -1,7 +1,7 @@ { "name": "gatsby", "description": "Blazing fast modern site generator for React", - "version": "2.13.33", + "version": "2.13.34", "author": "Kyle Mathews ", "bin": { "gatsby": "./dist/bin/gatsby.js" From e3809130f74a560ed28d390eba27f7a9fd6e218f Mon Sep 17 00:00:00 2001 From: Chirag Swadia Date: Tue, 23 Jul 2019 13:30:07 +0200 Subject: [PATCH 015/157] chore(starters): add gatsby-starter-newage (#15788) --- docs/starters.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/starters.yml b/docs/starters.yml index e087c25d2b7ca..bf8d22c37d383 100644 --- a/docs/starters.yml +++ b/docs/starters.yml @@ -3389,6 +3389,20 @@ - Syntax highlighting in code blocks using PrismJS(Dracula). - Google Analytics. - Deploy AWS S3. +- url: https://anubhavsrivastava.github.io/gatsby-starter-newage + repo: https://github.com/anubhavsrivastava/gatsby-starter-newage + description: Single page starter based on the new age site template by startbootstrap for portfolio page/Mobile app launch + tags: + - Onepage + - Portfolio + - Styling:SCSS + - PWA + features: + - Designed by startbootstrap + - Fully Responsive + - Styling with SCSS + - Offline support + - Web App Manifest - url: https://gatsby-starter-krisp.netlify.com/ repo: https://github.com/mohanmonu777/gatsby-starter-krisp description: A minimal, clean and responsive starter built with gatsby From 614c55a4a056175fb6e39f22992b0da5581fdd2b Mon Sep 17 00:00:00 2001 From: stefanprobst Date: Tue, 23 Jul 2019 15:20:34 +0200 Subject: [PATCH 016/157] chore(gatsby): Move back to upstream lokijs (#16010) --- packages/gatsby/package.json | 2 +- packages/gatsby/src/db/loki/index.js | 2 +- yarn.lock | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 604c458d18aad..87d015a1a8e1c 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -21,7 +21,6 @@ "@mikaelkristiansson/domready": "^1.0.9", "@pieh/friendly-errors-webpack-plugin": "1.7.0-chalk-2", "@reach/router": "^1.1.1", - "@stefanprobst/lokijs": "^1.5.6-b", "address": "1.0.3", "autoprefixer": "^9.6.0", "babel-core": "7.0.0-bridge.0", @@ -87,6 +86,7 @@ "json-loader": "^0.5.7", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.14", + "lokijs": "^1.5.7", "md5": "^2.2.1", "md5-file": "^3.1.1", "micromatch": "^3.1.10", diff --git a/packages/gatsby/src/db/loki/index.js b/packages/gatsby/src/db/loki/index.js index 84a00862e99ef..94b44c802db21 100644 --- a/packages/gatsby/src/db/loki/index.js +++ b/packages/gatsby/src/db/loki/index.js @@ -1,7 +1,7 @@ const _ = require(`lodash`) const fs = require(`fs-extra`) const path = require(`path`) -const loki = require(`@stefanprobst/lokijs`) +const loki = require(`lokijs`) const uuidv4 = require(`uuid/v4`) const customComparators = require(`./custom-comparators`) diff --git a/yarn.lock b/yarn.lock index c3579abebc78b..3b74586055247 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2904,10 +2904,6 @@ version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" -"@stefanprobst/lokijs@^1.5.6-b": - version "1.5.6-b" - resolved "https://registry.yarnpkg.com/@stefanprobst/lokijs/-/lokijs-1.5.6-b.tgz#6a36a86dbe132e702e6b15ffd3ce4139aebfe942" - "@testing-library/dom@^5.0.0": version "5.2.1" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-5.2.1.tgz#3f2af5229af106c0ccd5078bcb820958310604bc" @@ -13874,6 +13870,11 @@ loglevel@^1.4.1: version "1.6.1" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" +lokijs@^1.5.7: + version "1.5.7" + resolved "https://registry.yarnpkg.com/lokijs/-/lokijs-1.5.7.tgz#3bbeb5c2dbffebd78d035bac82c7c4e6055870f0" + integrity sha512-2SqUV6JH4f15Z5/7LVsyadSUwHhZppxhujgy/VhVqiRYMGt5oaocb7fV/3JGjHJ6rTuEIajnpTLGRz9cJW/c3g== + longest-streak@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-1.0.0.tgz#d06597c4d4c31b52ccb1f5d8f8fe7148eafd6965" From 5a294e4dd8d7be03260cfb13b796ea08a262e972 Mon Sep 17 00:00:00 2001 From: Manoel Date: Tue, 23 Jul 2019 11:01:42 -0300 Subject: [PATCH 017/157] chore(www): Update react-testing-library to @testing-library/react (#16006) * updated dep name on example repo * updated package name on unit testing example --- docs/docs/unit-testing.md | 4 ++-- examples/using-jest/README.md | 4 ++-- examples/using-jest/jest.setup.js | 2 +- examples/using-jest/package.json | 4 ++-- examples/using-jest/src/components/__tests__/header.test.js | 2 +- examples/using-jest/src/components/__tests__/image.test.js | 2 +- examples/using-jest/src/components/__tests__/layout.test.js | 2 +- examples/using-jest/src/pages/__tests__/404.test.js | 2 +- examples/using-jest/src/pages/__tests__/index.test.js | 2 +- examples/using-jest/src/pages/__tests__/page-2.test.js | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/docs/unit-testing.md b/docs/docs/unit-testing.md index 7a576a12da223..6f6976f26e714 100644 --- a/docs/docs/unit-testing.md +++ b/docs/docs/unit-testing.md @@ -272,7 +272,7 @@ though remember you may need to install the Babel 7 versions. See For more information on Jest testing, visit [the Jest site](https://jestjs.io/docs/en/getting-started). -For an example encapsulating all of these techniques--and a full unit test suite with [react-testing-library][react-testing-library], check out the [using-jest][using-jest] example. +For an example encapsulating all of these techniques--and a full unit test suite with [@testing-library/react][react-testing-library], check out the [using-jest][using-jest] example. [using-jest]: https://github.com/gatsbyjs/gatsby/tree/master/examples/using-jest -[react-testing-library]: https://github.com/kentcdodds/react-testing-library +[react-testing-library]: https://github.com/testing-library/react-testing-library diff --git a/examples/using-jest/README.md b/examples/using-jest/README.md index 2f4b2cecb9725..81834e725e46e 100644 --- a/examples/using-jest/README.md +++ b/examples/using-jest/README.md @@ -7,11 +7,11 @@ using Jest -Kick off your next Gatsby app with some great testing practices enabled via [Jest][jest], [react-testing-library][react-testing-library], and of course, [Gatsby][gatsby] 💪 +Kick off your next Gatsby app with some great testing practices enabled via [Jest][jest], [@testing-library/react][react-testing-library], and of course, [Gatsby][gatsby] 💪 Check out the [unit testing doc][unit-testing-doc] for further info! [jest]: https://jestjs.io/ -[react-testing-library]: https://github.com/kentcdodds/react-testing-library +[react-testing-library]: https://github.com/testing-library/react-testing-library [gatsby]: https://gatsbyjs.org [unit-testing-doc]: https://www.gatsbyjs.org/docs/unit-testing/ diff --git a/examples/using-jest/jest.setup.js b/examples/using-jest/jest.setup.js index beeeeeb09afb6..40d88cc8e2dfa 100644 --- a/examples/using-jest/jest.setup.js +++ b/examples/using-jest/jest.setup.js @@ -1,2 +1,2 @@ require(`jest-dom/extend-expect`) -require(`react-testing-library/cleanup-after-each`) +require(`@testing-library/react/cleanup-after-each`) diff --git a/examples/using-jest/package.json b/examples/using-jest/package.json index 641008c930209..6188f712fb28d 100644 --- a/examples/using-jest/package.json +++ b/examples/using-jest/package.json @@ -30,12 +30,12 @@ "test": "jest" }, "devDependencies": { + "@testing-library/react": "^8.0.5", "babel-jest": "^24.0.0", "babel-preset-gatsby": "^0.1.6", "identity-obj-proxy": "^3.0.0", "jest": "^24.0.0", - "jest-dom": "^3.0.0", - "react-testing-library": "^5.4.4" + "jest-dom": "^3.0.0" }, "repository": { "type": "git", diff --git a/examples/using-jest/src/components/__tests__/header.test.js b/examples/using-jest/src/components/__tests__/header.test.js index 6a96d7d8de3c7..72ced028ade30 100644 --- a/examples/using-jest/src/components/__tests__/header.test.js +++ b/examples/using-jest/src/components/__tests__/header.test.js @@ -1,5 +1,5 @@ import React from 'react' -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' import Header from '../header' diff --git a/examples/using-jest/src/components/__tests__/image.test.js b/examples/using-jest/src/components/__tests__/image.test.js index bfceffc32cc47..89310ade3186e 100644 --- a/examples/using-jest/src/components/__tests__/image.test.js +++ b/examples/using-jest/src/components/__tests__/image.test.js @@ -1,5 +1,5 @@ import React from 'react' -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' import { StaticQuery } from 'gatsby' // mocked import Image from '../image' diff --git a/examples/using-jest/src/components/__tests__/layout.test.js b/examples/using-jest/src/components/__tests__/layout.test.js index f23da59c865c4..046f39bc37532 100644 --- a/examples/using-jest/src/components/__tests__/layout.test.js +++ b/examples/using-jest/src/components/__tests__/layout.test.js @@ -1,5 +1,5 @@ import React from 'react' -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' import { StaticQuery } from 'gatsby' // mocked import Layout from '../layout' diff --git a/examples/using-jest/src/pages/__tests__/404.test.js b/examples/using-jest/src/pages/__tests__/404.test.js index bc4c8ff3743cd..c9bf6e79d5dfc 100644 --- a/examples/using-jest/src/pages/__tests__/404.test.js +++ b/examples/using-jest/src/pages/__tests__/404.test.js @@ -1,5 +1,5 @@ import React from 'react' -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' import { StaticQuery } from 'gatsby' // mocked import FourOhFour from '../404' diff --git a/examples/using-jest/src/pages/__tests__/index.test.js b/examples/using-jest/src/pages/__tests__/index.test.js index 19a7ab10f6e4c..6e6d4d208289d 100644 --- a/examples/using-jest/src/pages/__tests__/index.test.js +++ b/examples/using-jest/src/pages/__tests__/index.test.js @@ -1,5 +1,5 @@ import React from 'react' -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' import { StaticQuery } from 'gatsby' // mocked import Index from '../index' diff --git a/examples/using-jest/src/pages/__tests__/page-2.test.js b/examples/using-jest/src/pages/__tests__/page-2.test.js index a497dc19b19cf..21bf788ed5fdc 100644 --- a/examples/using-jest/src/pages/__tests__/page-2.test.js +++ b/examples/using-jest/src/pages/__tests__/page-2.test.js @@ -1,5 +1,5 @@ import React from 'react' -import { render } from 'react-testing-library' +import { render } from '@testing-library/react' import { StaticQuery } from 'gatsby' // mocked import PageTwo from '../page-2' From e14249144c1524f1537b94ba4908b499d0f3376f Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Tue, 23 Jul 2019 16:05:24 +0200 Subject: [PATCH 018/157] chore: record e2e in cypress dashboard (#15837) * wip-test * move cypress stuff to circleCi conf * add ids everywhere * update keys * ok now? * try grouping * record * no projectId in cypress.json * don't group - there are issues when re-running tests * record doh --- .circleci/config.yml | 17 ++++++++++++++++- e2e-tests/development-runtime/package.json | 2 +- e2e-tests/gatsby-image/package.json | 2 +- e2e-tests/path-prefix/package.json | 2 +- e2e-tests/production-runtime/package.json | 2 +- .../themes/development-runtime/package.json | 2 +- .../themes/production-runtime/package.json | 2 +- examples/gatsbygram/package.json | 2 +- 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 06cff9359344b..eef0e56646b16 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -159,18 +159,27 @@ jobs: e2e_tests_path-prefix: <<: *e2e-executor + environment: + CYPRESS_PROJECT_ID: pzj19c + CYPRESS_RECORD_KEY: c9ea1b91-eed6-4bac-be41-eccd75a48969 steps: - e2e-test: test_path: e2e-tests/path-prefix e2e_tests_gatsby-image: <<: *e2e-executor + environment: + CYPRESS_PROJECT_ID: ave32k + CYPRESS_RECORD_KEY: fb3cb6e0-a0f9-48b2-aa9a-95e8ef150a85 steps: - e2e-test: test_path: e2e-tests/gatsby-image e2e_tests_development_runtime: <<: *e2e-executor + environment: + CYPRESS_PROJECT_ID: s3j3qj + CYPRESS_RECORD_KEY: 3904ca0c-bc98-47d9-8371-b68c5e81fb9b steps: - e2e-test: test_path: e2e-tests/development-runtime @@ -180,10 +189,13 @@ jobs: steps: - e2e-test: test_path: e2e-tests/production-runtime - test_command: yarn test && yarn test:offline + test_command: CYPRESS_PROJECT_ID=is8aoq CYPRESS_RECORD_KEY=cb4708d2-1578-4665-9a07-c59f8db28d91 yarn test && CYPRESS_PROJECT_ID=htpvkv CYPRESS_RECORD_KEY=0d734841-c613-41d2-86e5-df0b5968f93f yarn test:offline themes_e2e_tests_development_runtime: <<: *e2e-executor + environment: + CYPRESS_PROJECT_ID: 9parq5 + CYPRESS_RECORD_KEY: 3fb49000-4143-4bd8-9ab4-219389060910 steps: - e2e-test: test_path: e2e-tests/themes/development-runtime @@ -191,6 +203,9 @@ jobs: themes_e2e_tests_production_runtime: <<: *e2e-executor + environment: + CYPRESS_PROJECT_ID: c9rs27 + CYPRESS_RECORD_KEY: e4e7b3b8-e1e7-4a74-a0c9-9ac76585236b steps: - e2e-test: test_path: e2e-tests/themes/production-runtime diff --git a/e2e-tests/development-runtime/package.json b/e2e-tests/development-runtime/package.json index f1b8ab19bdf30..7bf7251994275 100644 --- a/e2e-tests/development-runtime/package.json +++ b/e2e-tests/development-runtime/package.json @@ -39,7 +39,7 @@ "update:preview": "curl -X POST http://localhost:8000/__refresh", "start-server-and-test": "start-server-and-test develop http://localhost:8000 cy:run", "cy:open": "cypress open", - "cy:run": "cypress run --browser chrome" + "cy:run": "cypress run --browser chrome --record" }, "devDependencies": { "cross-env": "^5.2.0", diff --git a/e2e-tests/gatsby-image/package.json b/e2e-tests/gatsby-image/package.json index 493fc0fc36072..076ee34cfafcc 100644 --- a/e2e-tests/gatsby-image/package.json +++ b/e2e-tests/gatsby-image/package.json @@ -29,7 +29,7 @@ "start-server-and-test": "start-server-and-test serve http://localhost:9000 cy:run", "serve": "gatsby serve", "cy:open": "cypress open", - "cy:run": "cypress run --browser chrome" + "cy:run": "cypress run --browser chrome --record" }, "devDependencies": { "gatsby-cypress": "^0.1.7", diff --git a/e2e-tests/path-prefix/package.json b/e2e-tests/path-prefix/package.json index 7fa4d414afa7a..69cf30879434d 100644 --- a/e2e-tests/path-prefix/package.json +++ b/e2e-tests/path-prefix/package.json @@ -30,7 +30,7 @@ "serve": "gatsby serve --prefix-paths & npm run serve:assets", "serve:assets": "node scripts/serve.js", "cy:open": "cypress open", - "cy:run": "cypress run --browser chrome" + "cy:run": "cypress run --browser chrome --record" }, "devDependencies": { "gatsby-cypress": "^0.1.7", diff --git a/e2e-tests/production-runtime/package.json b/e2e-tests/production-runtime/package.json index b05f9cd4f7ef7..543f6982ce82f 100644 --- a/e2e-tests/production-runtime/package.json +++ b/e2e-tests/production-runtime/package.json @@ -35,7 +35,7 @@ "cy:open:offline": "npm run cy:open -- --env TEST_PLUGIN_OFFLINE=y", "cy:run": "npm run cy:run:normal && npm run cy:run:slow", "cy:run:offline": "npm run cy:run:normal -- --env TEST_PLUGIN_OFFLINE=y && npm run cy:run:slow -- --env TEST_PLUGIN_OFFLINE=y", - "cy:run:normal": "cypress run --browser chrome", + "cy:run:normal": "cypress run --browser chrome --record", "cy:run:slow": "CYPRESS_CONNECTION_TYPE=slow cypress run --browser chrome --config testFiles=prefetching.js" }, "devDependencies": { diff --git a/e2e-tests/themes/development-runtime/package.json b/e2e-tests/themes/development-runtime/package.json index 7f84c11630017..5cb65546fb98b 100644 --- a/e2e-tests/themes/development-runtime/package.json +++ b/e2e-tests/themes/development-runtime/package.json @@ -22,7 +22,7 @@ "update": "node scripts/update.js", "start-server-and-test": "start-server-and-test develop http://localhost:8000 cy:run", "cy:open": "cypress open", - "cy:run": "cypress run --browser chrome" + "cy:run": "cypress run --browser chrome --record" }, "devDependencies": { "cross-env": "^5.2.0", diff --git a/e2e-tests/themes/production-runtime/package.json b/e2e-tests/themes/production-runtime/package.json index 0b2b893867ad2..523d0eac59947 100644 --- a/e2e-tests/themes/production-runtime/package.json +++ b/e2e-tests/themes/production-runtime/package.json @@ -19,7 +19,7 @@ "test": "cross-env CYPRESS_SUPPORT=y npm run build && npm run start-server-and-test", "start-server-and-test": "start-server-and-test serve http://localhost:9000 cy:run", "cy:open": "cypress open", - "cy:run": "cypress run --browser chrome" + "cy:run": "cypress run --browser chrome --record" }, "devDependencies": { "cross-env": "^5.2.0", diff --git a/examples/gatsbygram/package.json b/examples/gatsbygram/package.json index 14eb2f37a4629..0623e8b603f6c 100644 --- a/examples/gatsbygram/package.json +++ b/examples/gatsbygram/package.json @@ -49,7 +49,7 @@ "start": "npm run develop", "deploy": "gatsby build --prefix-paths && gh-pages -d public", "cy:open": "cypress open", - "cy:run": "cypress run --browser chrome" + "cy:run": "cypress run --browser chrome --record" }, "devDependencies": { "cypress": "^3.1.0", From b7379d51e269cf12d00303dd84b1811715510c5d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2019 07:32:03 -0700 Subject: [PATCH 019/157] fix: update gatsby monorepo (#15941) --- starters/blog/package-lock.json | 107 ++++++------- starters/blog/package.json | 14 +- starters/default/package-lock.json | 83 ++++++----- starters/default/package.json | 8 +- starters/hello-world/package-lock.json | 68 +++++---- starters/hello-world/package.json | 2 +- .../package-lock.json | 140 +++++++++--------- themes/gatsby-starter-blog-theme/package.json | 2 +- .../package-lock.json | 140 +++++++++--------- .../gatsby-starter-notes-theme/package.json | 2 +- .../example/package.json | 2 +- themes/gatsby-starter-theme/package-lock.json | 140 +++++++++--------- themes/gatsby-starter-theme/package.json | 2 +- themes/gatsby-theme-blog/package.json | 12 +- themes/gatsby-theme-notes/package.json | 6 +- 15 files changed, 383 insertions(+), 345 deletions(-) diff --git a/starters/blog/package-lock.json b/starters/blog/package-lock.json index 7ef68e4642a73..24ff2049fe210 100644 --- a/starters/blog/package-lock.json +++ b/starters/blog/package-lock.json @@ -1603,9 +1603,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -3115,9 +3115,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "capture-stack-trace": { "version": "1.0.1", @@ -4834,9 +4834,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "elliptic": { "version": "6.5.0", @@ -5199,9 +5199,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "requires": { "debug": "^2.6.8", "pkg-dir": "^2.0.0" @@ -5248,9 +5248,9 @@ } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "requires": { "array-includes": "^3.0.3", "contains-path": "^0.1.0", @@ -5306,9 +5306,9 @@ } }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", @@ -6587,9 +6587,9 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gatsby": { - "version": "2.13.31", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.31.tgz", - "integrity": "sha512-Oi/M9aD1wNTP+/3xTz5otJ3mPcYgaH3oOV1QFPjOUAozWB8sI31pjWta+8TkqHPN6jxag/quVaQe/LiqgZ/IEA==", + "version": "2.13.34", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.34.tgz", + "integrity": "sha512-JDf3wEVGDw0EMwWARYPeWMVn6FHF7sGXCUsvReBuPXTUGfwteCpR6cZbdhUs/CXh7m/fMYEmEdVeETov7yRUHw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", @@ -6649,6 +6649,7 @@ "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", "gatsby-cli": "^2.7.17", + "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", "gatsby-plugin-page-creator": "^2.1.5", @@ -7011,6 +7012,11 @@ } } }, + "gatsby-core-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.0.3.tgz", + "integrity": "sha512-01B0wqVTftFcYwVR7HGJy+Nriy+xxC++VZhsWNCFWtby1NwfSDUwkoScGcZ/jXvg9waEmBC1n70FwVIDnoHzSA==" + }, "gatsby-graphiql-explorer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/gatsby-graphiql-explorer/-/gatsby-graphiql-explorer-0.2.3.tgz", @@ -7055,9 +7061,9 @@ } }, "gatsby-plugin-feed": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/gatsby-plugin-feed/-/gatsby-plugin-feed-2.3.4.tgz", - "integrity": "sha512-RGbv9xkKujCrsKh6M8TtD/xnc6pH/rm+HOa1pv+xNB48b9SCWSIKkxAQnReXUY9EIHHDYKXqY0wsFSU6y6ljUA==", + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/gatsby-plugin-feed/-/gatsby-plugin-feed-2.3.5.tgz", + "integrity": "sha512-mVn9jVadHvrmK3INfluJ6mfegSN+baNLwAswunDsOZdr+0TLnYq3DkC21Kf+bProeL/l+LkNISOeJHbfLuZvvw==", "requires": { "@babel/runtime": "^7.0.0", "@hapi/joi": "^15.0.0", @@ -7087,11 +7093,12 @@ } }, "gatsby-plugin-manifest": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.2.3.tgz", - "integrity": "sha512-fK43rI6/xc6Xiu44obyPRxT8efTir9LpicptrZjRVLKFm3ghwATpW3WIotRd6qIs2W45m3znzjcaEanPcK9CjQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.2.4.tgz", + "integrity": "sha512-zhRLmqWzp9oMfxo2S01Lev0QL7YRLSLNzseGb/tcyR5YOhBPMJzObHnD6MORbKPnxYWzVoghqf5/DjmzTVsacw==", "requires": { "@babel/runtime": "^7.0.0", + "gatsby-core-utils": "^1.0.0", "semver": "^5.6.0", "sharp": "^0.22.1" } @@ -7144,14 +7151,15 @@ } }, "gatsby-plugin-sharp": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/gatsby-plugin-sharp/-/gatsby-plugin-sharp-2.2.8.tgz", - "integrity": "sha512-Wl5PpDimy/LdOLP4qjS1gzMU+3dNv0Zgw2RsdMTlLYm57MiQNe6E+16RFYzBoJ/BOONyH2YOYCnlGzvVG9nDWQ==", + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/gatsby-plugin-sharp/-/gatsby-plugin-sharp-2.2.9.tgz", + "integrity": "sha512-yFaBuV4G6NRl3ExkWOJFtQlUO5rA3guvuR+30GwwdiHTSYuIFBvoCDgKQ+4k2fpAM5tbG6BHaUr7r/ccxWUWYg==", "requires": { "@babel/runtime": "^7.0.0", "async": "^2.1.2", "bluebird": "^3.5.0", "fs-extra": "^7.0.0", + "gatsby-core-utils": "^1.0.0", "got": "^8.3.2", "imagemin": "^6.0.0", "imagemin-mozjpeg": "^8.0.0", @@ -7293,9 +7301,9 @@ } }, "gatsby-remark-images": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/gatsby-remark-images/-/gatsby-remark-images-3.1.6.tgz", - "integrity": "sha512-Rc5pJsA1iNVF0BnG/V1FlIxXzz9a3YQyJ1jkMsKe49hhMZj9lFf94GlE6Koz5KKhzG5+3EMoDqyHiG1zaVG3AQ==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/gatsby-remark-images/-/gatsby-remark-images-3.1.7.tgz", + "integrity": "sha512-lTfHUUwCLEMpM4OlaLzjipcuuOIgj1PoxXhFwETgR3qaeLRovMtvCF26NqYShBkGn8R42WnegJw5Wh4yTQJDow==", "requires": { "@babel/runtime": "^7.0.0", "cheerio": "^1.0.0-rc.2", @@ -7309,11 +7317,6 @@ "unist-util-visit-parents": "^2.0.1" }, "dependencies": { - "lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" - }, "query-string": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.1.tgz", @@ -7372,9 +7375,9 @@ } }, "gatsby-source-filesystem": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/gatsby-source-filesystem/-/gatsby-source-filesystem-2.1.5.tgz", - "integrity": "sha512-8YSuRsn14YllCv8egkGwCFMoF84lGhKmwFXrpzaJS0OELA8WaHaHjfo5olB1xd5IE4na8il8c6MCj/btlQlkuQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/gatsby-source-filesystem/-/gatsby-source-filesystem-2.1.6.tgz", + "integrity": "sha512-Om05JfbYLWn54as5+7O6Dci273V4fbS0FqhxNVNkixAh6Vib5Yi3kBr8L+5l29tF2vB0dr3UPMk95tF9LuHwEw==", "requires": { "@babel/runtime": "^7.0.0", "better-queue": "^3.8.7", @@ -7382,6 +7385,7 @@ "chokidar": "2.1.2", "file-type": "^10.2.0", "fs-extra": "^5.0.0", + "gatsby-core-utils": "^1.0.0", "got": "^7.1.0", "md5-file": "^3.1.1", "mime": "^2.2.0", @@ -7488,12 +7492,13 @@ } }, "gatsby-transformer-remark": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/gatsby-transformer-remark/-/gatsby-transformer-remark-2.6.7.tgz", - "integrity": "sha512-0Y14p1tpO/KGVHkKbAtYRn7ZjkdBdZzji7S2ZdCOuElGnK0FWTeYvgKCAiMiD0vQIOuuNtFrRovkakcbnLx6HQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/gatsby-transformer-remark/-/gatsby-transformer-remark-2.6.9.tgz", + "integrity": "sha512-o1/36A0IPvhoXleayaxhOMPNXH4JzO+b5VFd2ghvdODe88ErgkTF8zSWwhXMj0/pAJymtJBuzrwF+mTU9IK7Sw==", "requires": { "@babel/runtime": "^7.0.0", "bluebird": "^3.5.0", + "gatsby-core-utils": "^1.0.0", "gray-matter": "^4.0.0", "hast-util-raw": "^4.0.0", "hast-util-to-html": "^4.0.0", @@ -12710,9 +12715,9 @@ } }, "react-hot-loader": { - "version": "4.12.8", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.8.tgz", - "integrity": "sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ==", + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.9.tgz", + "integrity": "sha512-lWT3JpWUN7nGHSoI9c4MV+42ov79bd8aqwDzhoyKev3owIh+hbEivT6Mb81lCV6tWuqm9trKo2/Th2/YDhFCdw==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -12720,7 +12725,7 @@ "loader-utils": "^1.1.0", "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", + "shallowequal": "^1.1.0", "source-map": "^0.7.3" }, "dependencies": { @@ -12894,9 +12899,9 @@ "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "regenerator-transform": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", - "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", "requires": { "private": "^0.1.6" } diff --git a/starters/blog/package.json b/starters/blog/package.json index af908a492d4d4..da44f3d83e47b 100644 --- a/starters/blog/package.json +++ b/starters/blog/package.json @@ -8,22 +8,22 @@ "url": "https://github.com/gatsbyjs/gatsby/issues" }, "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "gatsby-image": "^2.2.6", - "gatsby-plugin-feed": "^2.3.4", + "gatsby-plugin-feed": "^2.3.5", "gatsby-plugin-google-analytics": "^2.1.4", - "gatsby-plugin-manifest": "^2.2.3", + "gatsby-plugin-manifest": "^2.2.4", "gatsby-plugin-offline": "^2.2.4", "gatsby-plugin-react-helmet": "^3.1.2", - "gatsby-plugin-sharp": "^2.2.8", + "gatsby-plugin-sharp": "^2.2.9", "gatsby-plugin-typography": "^2.3.2", "gatsby-remark-copy-linked-files": "^2.1.3", - "gatsby-remark-images": "^3.1.6", + "gatsby-remark-images": "^3.1.7", "gatsby-remark-prismjs": "^3.3.3", "gatsby-remark-responsive-iframe": "^2.2.4", "gatsby-remark-smartypants": "^2.1.2", - "gatsby-source-filesystem": "^2.1.5", - "gatsby-transformer-remark": "^2.6.7", + "gatsby-source-filesystem": "^2.1.6", + "gatsby-transformer-remark": "^2.6.9", "gatsby-transformer-sharp": "^2.2.4", "prismjs": "^1.16.0", "react": "^16.8.6", diff --git a/starters/default/package-lock.json b/starters/default/package-lock.json index f9c92e9993770..359d17f9b0ebd 100644 --- a/starters/default/package-lock.json +++ b/starters/default/package-lock.json @@ -1579,9 +1579,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -3081,9 +3081,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "capture-stack-trace": { "version": "1.0.1", @@ -4711,9 +4711,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "elliptic": { "version": "6.5.0", @@ -5076,9 +5076,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "requires": { "debug": "^2.6.8", "pkg-dir": "^2.0.0" @@ -5125,9 +5125,9 @@ } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "requires": { "array-includes": "^3.0.3", "contains-path": "^0.1.0", @@ -5183,9 +5183,9 @@ } }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", @@ -6464,9 +6464,9 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gatsby": { - "version": "2.13.31", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.31.tgz", - "integrity": "sha512-Oi/M9aD1wNTP+/3xTz5otJ3mPcYgaH3oOV1QFPjOUAozWB8sI31pjWta+8TkqHPN6jxag/quVaQe/LiqgZ/IEA==", + "version": "2.13.34", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.34.tgz", + "integrity": "sha512-JDf3wEVGDw0EMwWARYPeWMVn6FHF7sGXCUsvReBuPXTUGfwteCpR6cZbdhUs/CXh7m/fMYEmEdVeETov7yRUHw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", @@ -6526,6 +6526,7 @@ "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", "gatsby-cli": "^2.7.17", + "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", "gatsby-plugin-page-creator": "^2.1.5", @@ -6888,6 +6889,11 @@ } } }, + "gatsby-core-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.0.3.tgz", + "integrity": "sha512-01B0wqVTftFcYwVR7HGJy+Nriy+xxC++VZhsWNCFWtby1NwfSDUwkoScGcZ/jXvg9waEmBC1n70FwVIDnoHzSA==" + }, "gatsby-graphiql-explorer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/gatsby-graphiql-explorer/-/gatsby-graphiql-explorer-0.2.3.tgz", @@ -6932,11 +6938,12 @@ } }, "gatsby-plugin-manifest": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.2.3.tgz", - "integrity": "sha512-fK43rI6/xc6Xiu44obyPRxT8efTir9LpicptrZjRVLKFm3ghwATpW3WIotRd6qIs2W45m3znzjcaEanPcK9CjQ==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/gatsby-plugin-manifest/-/gatsby-plugin-manifest-2.2.4.tgz", + "integrity": "sha512-zhRLmqWzp9oMfxo2S01Lev0QL7YRLSLNzseGb/tcyR5YOhBPMJzObHnD6MORbKPnxYWzVoghqf5/DjmzTVsacw==", "requires": { "@babel/runtime": "^7.0.0", + "gatsby-core-utils": "^1.0.0", "semver": "^5.6.0", "sharp": "^0.22.1" } @@ -6984,14 +6991,15 @@ } }, "gatsby-plugin-sharp": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/gatsby-plugin-sharp/-/gatsby-plugin-sharp-2.2.8.tgz", - "integrity": "sha512-Wl5PpDimy/LdOLP4qjS1gzMU+3dNv0Zgw2RsdMTlLYm57MiQNe6E+16RFYzBoJ/BOONyH2YOYCnlGzvVG9nDWQ==", + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/gatsby-plugin-sharp/-/gatsby-plugin-sharp-2.2.9.tgz", + "integrity": "sha512-yFaBuV4G6NRl3ExkWOJFtQlUO5rA3guvuR+30GwwdiHTSYuIFBvoCDgKQ+4k2fpAM5tbG6BHaUr7r/ccxWUWYg==", "requires": { "@babel/runtime": "^7.0.0", "async": "^2.1.2", "bluebird": "^3.5.0", "fs-extra": "^7.0.0", + "gatsby-core-utils": "^1.0.0", "got": "^8.3.2", "imagemin": "^6.0.0", "imagemin-mozjpeg": "^8.0.0", @@ -7093,9 +7101,9 @@ } }, "gatsby-source-filesystem": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/gatsby-source-filesystem/-/gatsby-source-filesystem-2.1.5.tgz", - "integrity": "sha512-8YSuRsn14YllCv8egkGwCFMoF84lGhKmwFXrpzaJS0OELA8WaHaHjfo5olB1xd5IE4na8il8c6MCj/btlQlkuQ==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/gatsby-source-filesystem/-/gatsby-source-filesystem-2.1.6.tgz", + "integrity": "sha512-Om05JfbYLWn54as5+7O6Dci273V4fbS0FqhxNVNkixAh6Vib5Yi3kBr8L+5l29tF2vB0dr3UPMk95tF9LuHwEw==", "requires": { "@babel/runtime": "^7.0.0", "better-queue": "^3.8.7", @@ -7103,6 +7111,7 @@ "chokidar": "2.1.2", "file-type": "^10.2.0", "fs-extra": "^5.0.0", + "gatsby-core-utils": "^1.0.0", "got": "^7.1.0", "md5-file": "^3.1.1", "mime": "^2.2.0", @@ -12011,9 +12020,9 @@ } }, "react-hot-loader": { - "version": "4.12.8", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.8.tgz", - "integrity": "sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ==", + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.9.tgz", + "integrity": "sha512-lWT3JpWUN7nGHSoI9c4MV+42ov79bd8aqwDzhoyKev3owIh+hbEivT6Mb81lCV6tWuqm9trKo2/Th2/YDhFCdw==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -12021,7 +12030,7 @@ "loader-utils": "^1.1.0", "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", + "shallowequal": "^1.1.0", "source-map": "^0.7.3" }, "dependencies": { @@ -12190,9 +12199,9 @@ "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" }, "regenerator-transform": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", - "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", "requires": { "private": "^0.1.6" } diff --git a/starters/default/package.json b/starters/default/package.json index 2cb00618a50ee..edf437a5786ce 100644 --- a/starters/default/package.json +++ b/starters/default/package.json @@ -5,13 +5,13 @@ "version": "0.1.0", "author": "Kyle Mathews ", "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "gatsby-image": "^2.2.6", - "gatsby-plugin-manifest": "^2.2.3", + "gatsby-plugin-manifest": "^2.2.4", "gatsby-plugin-offline": "^2.2.4", "gatsby-plugin-react-helmet": "^3.1.2", - "gatsby-plugin-sharp": "^2.2.8", - "gatsby-source-filesystem": "^2.1.5", + "gatsby-plugin-sharp": "^2.2.9", + "gatsby-source-filesystem": "^2.1.6", "gatsby-transformer-sharp": "^2.2.4", "prop-types": "^15.7.2", "react": "^16.8.6", diff --git a/starters/hello-world/package-lock.json b/starters/hello-world/package-lock.json index 5c0a4b0346c54..371e0a44b26bd 100644 --- a/starters/hello-world/package-lock.json +++ b/starters/hello-world/package-lock.json @@ -1279,9 +1279,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -2433,9 +2433,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "capture-stack-trace": { "version": "1.0.1", @@ -3765,9 +3765,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "elliptic": { "version": "6.5.0", @@ -4130,9 +4130,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "requires": { "debug": "^2.6.8", "pkg-dir": "^2.0.0" @@ -4179,9 +4179,9 @@ } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "requires": { "array-includes": "^3.0.3", "contains-path": "^0.1.0", @@ -4237,9 +4237,9 @@ } }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", @@ -5364,9 +5364,9 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gatsby": { - "version": "2.13.31", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.31.tgz", - "integrity": "sha512-Oi/M9aD1wNTP+/3xTz5otJ3mPcYgaH3oOV1QFPjOUAozWB8sI31pjWta+8TkqHPN6jxag/quVaQe/LiqgZ/IEA==", + "version": "2.13.34", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.34.tgz", + "integrity": "sha512-JDf3wEVGDw0EMwWARYPeWMVn6FHF7sGXCUsvReBuPXTUGfwteCpR6cZbdhUs/CXh7m/fMYEmEdVeETov7yRUHw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", @@ -5426,6 +5426,7 @@ "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", "gatsby-cli": "^2.7.17", + "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", "gatsby-plugin-page-creator": "^2.1.5", @@ -5788,6 +5789,11 @@ } } }, + "gatsby-core-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.0.3.tgz", + "integrity": "sha512-01B0wqVTftFcYwVR7HGJy+Nriy+xxC++VZhsWNCFWtby1NwfSDUwkoScGcZ/jXvg9waEmBC1n70FwVIDnoHzSA==" + }, "gatsby-graphiql-explorer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/gatsby-graphiql-explorer/-/gatsby-graphiql-explorer-0.2.3.tgz", @@ -9793,9 +9799,9 @@ "integrity": "sha512-XzgvowFrwDo6TWcpJ/WTiarb9UI6lhA4PMzS7n1joK3sHfBBBOQHUc0U4u57D6DWO9vHv6lVSWx2Q/Ymfyv4hw==" }, "react-hot-loader": { - "version": "4.12.8", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.8.tgz", - "integrity": "sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ==", + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.9.tgz", + "integrity": "sha512-lWT3JpWUN7nGHSoI9c4MV+42ov79bd8aqwDzhoyKev3owIh+hbEivT6Mb81lCV6tWuqm9trKo2/Th2/YDhFCdw==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -9803,7 +9809,7 @@ "loader-utils": "^1.1.0", "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", + "shallowequal": "^1.1.0", "source-map": "^0.7.3" }, "dependencies": { @@ -9933,14 +9939,14 @@ } }, "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" }, "regenerator-transform": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.0.tgz", - "integrity": "sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", + "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", "requires": { "private": "^0.1.6" } diff --git a/starters/hello-world/package.json b/starters/hello-world/package.json index 00df003a40bc6..3f0fe9b1412e7 100644 --- a/starters/hello-world/package.json +++ b/starters/hello-world/package.json @@ -13,7 +13,7 @@ "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\"" }, "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "react": "^16.8.6", "react-dom": "^16.8.6" }, diff --git a/themes/gatsby-starter-blog-theme/package-lock.json b/themes/gatsby-starter-blog-theme/package-lock.json index 7a2d355693166..21eececfc8796 100644 --- a/themes/gatsby-starter-blog-theme/package-lock.json +++ b/themes/gatsby-starter-blog-theme/package-lock.json @@ -1797,9 +1797,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -2201,14 +2201,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -3314,16 +3314,16 @@ }, "dependencies": { "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" } } }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -5460,9 +5460,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "requires": { "debug": "^2.6.8", "pkg-dir": "^2.0.0" @@ -5509,9 +5509,9 @@ } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "requires": { "array-includes": "^3.0.3", "contains-path": "^0.1.0", @@ -5567,9 +5567,9 @@ } }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", @@ -6861,9 +6861,9 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gatsby": { - "version": "2.13.31", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.31.tgz", - "integrity": "sha512-Oi/M9aD1wNTP+/3xTz5otJ3mPcYgaH3oOV1QFPjOUAozWB8sI31pjWta+8TkqHPN6jxag/quVaQe/LiqgZ/IEA==", + "version": "2.13.34", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.34.tgz", + "integrity": "sha512-JDf3wEVGDw0EMwWARYPeWMVn6FHF7sGXCUsvReBuPXTUGfwteCpR6cZbdhUs/CXh7m/fMYEmEdVeETov7yRUHw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", @@ -6923,6 +6923,7 @@ "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", "gatsby-cli": "^2.7.17", + "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", "gatsby-plugin-page-creator": "^2.1.5", @@ -7285,6 +7286,11 @@ } } }, + "gatsby-core-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.0.3.tgz", + "integrity": "sha512-01B0wqVTftFcYwVR7HGJy+Nriy+xxC++VZhsWNCFWtby1NwfSDUwkoScGcZ/jXvg9waEmBC1n70FwVIDnoHzSA==" + }, "gatsby-graphiql-explorer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/gatsby-graphiql-explorer/-/gatsby-graphiql-explorer-0.2.3.tgz", @@ -11872,14 +11878,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12048,14 +12054,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12135,14 +12141,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12401,14 +12407,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12503,14 +12509,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -13125,9 +13131,9 @@ } }, "react-hot-loader": { - "version": "4.12.8", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.8.tgz", - "integrity": "sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ==", + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.9.tgz", + "integrity": "sha512-lWT3JpWUN7nGHSoI9c4MV+42ov79bd8aqwDzhoyKev3owIh+hbEivT6Mb81lCV6tWuqm9trKo2/Th2/YDhFCdw==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -13135,7 +13141,7 @@ "loader-utils": "^1.1.0", "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", + "shallowequal": "^1.1.0", "source-map": "^0.7.3" }, "dependencies": { @@ -15065,14 +15071,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", diff --git a/themes/gatsby-starter-blog-theme/package.json b/themes/gatsby-starter-blog-theme/package.json index f29db850e65fc..fe1dbd7ef4445 100644 --- a/themes/gatsby-starter-blog-theme/package.json +++ b/themes/gatsby-starter-blog-theme/package.json @@ -8,7 +8,7 @@ "build": "gatsby build" }, "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "gatsby-theme-blog": "^1.0.0", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/themes/gatsby-starter-notes-theme/package-lock.json b/themes/gatsby-starter-notes-theme/package-lock.json index 47473f3ccd6b1..48d37578a976d 100644 --- a/themes/gatsby-starter-notes-theme/package-lock.json +++ b/themes/gatsby-starter-notes-theme/package-lock.json @@ -1778,9 +1778,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -2136,14 +2136,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -3004,16 +3004,16 @@ }, "dependencies": { "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" } } }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -4841,9 +4841,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "requires": { "debug": "^2.6.8", "pkg-dir": "^2.0.0" @@ -4890,9 +4890,9 @@ } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "requires": { "array-includes": "^3.0.3", "contains-path": "^0.1.0", @@ -4948,9 +4948,9 @@ } }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", @@ -6111,9 +6111,9 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gatsby": { - "version": "2.13.31", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.31.tgz", - "integrity": "sha512-Oi/M9aD1wNTP+/3xTz5otJ3mPcYgaH3oOV1QFPjOUAozWB8sI31pjWta+8TkqHPN6jxag/quVaQe/LiqgZ/IEA==", + "version": "2.13.34", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.34.tgz", + "integrity": "sha512-JDf3wEVGDw0EMwWARYPeWMVn6FHF7sGXCUsvReBuPXTUGfwteCpR6cZbdhUs/CXh7m/fMYEmEdVeETov7yRUHw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", @@ -6173,6 +6173,7 @@ "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", "gatsby-cli": "^2.7.17", + "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", "gatsby-plugin-page-creator": "^2.1.5", @@ -6535,6 +6536,11 @@ } } }, + "gatsby-core-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.0.3.tgz", + "integrity": "sha512-01B0wqVTftFcYwVR7HGJy+Nriy+xxC++VZhsWNCFWtby1NwfSDUwkoScGcZ/jXvg9waEmBC1n70FwVIDnoHzSA==" + }, "gatsby-graphiql-explorer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/gatsby-graphiql-explorer/-/gatsby-graphiql-explorer-0.2.3.tgz", @@ -10224,14 +10230,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -10400,14 +10406,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -10487,14 +10493,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -10753,14 +10759,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -10850,14 +10856,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -11381,9 +11387,9 @@ "integrity": "sha512-iCofWhTjX+vQwvDmg7o6vg0XrUg1c41yBDZG+l83nz1FiCsleJoUgd3O+kHpOeWMXuPrRIFfCixvcqyOLGOgIg==" }, "react-hot-loader": { - "version": "4.12.8", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.8.tgz", - "integrity": "sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ==", + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.9.tgz", + "integrity": "sha512-lWT3JpWUN7nGHSoI9c4MV+42ov79bd8aqwDzhoyKev3owIh+hbEivT6Mb81lCV6tWuqm9trKo2/Th2/YDhFCdw==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -11391,7 +11397,7 @@ "loader-utils": "^1.1.0", "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", + "shallowequal": "^1.1.0", "source-map": "^0.7.3" }, "dependencies": { @@ -12969,14 +12975,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", diff --git a/themes/gatsby-starter-notes-theme/package.json b/themes/gatsby-starter-notes-theme/package.json index 687f9090222f3..475e82f867628 100644 --- a/themes/gatsby-starter-notes-theme/package.json +++ b/themes/gatsby-starter-notes-theme/package.json @@ -8,7 +8,7 @@ "build": "gatsby build" }, "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "gatsby-theme-notes": "^1.0.0", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/themes/gatsby-starter-theme-workspace/example/package.json b/themes/gatsby-starter-theme-workspace/example/package.json index b8c5c36febcf9..c906a0502a1f5 100644 --- a/themes/gatsby-starter-theme-workspace/example/package.json +++ b/themes/gatsby-starter-theme-workspace/example/package.json @@ -9,7 +9,7 @@ "build": "gatsby build" }, "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "gatsby-theme-minimal": "^1.0.0", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/themes/gatsby-starter-theme/package-lock.json b/themes/gatsby-starter-theme/package-lock.json index 64a02a8511233..0c8f46f75eda5 100644 --- a/themes/gatsby-starter-theme/package-lock.json +++ b/themes/gatsby-starter-theme/package-lock.json @@ -1806,9 +1806,9 @@ } }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==" }, "acorn-dynamic-import": { "version": "3.0.0", @@ -2210,14 +2210,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -3323,16 +3323,16 @@ }, "dependencies": { "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" } } }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -5469,9 +5469,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "requires": { "debug": "^2.6.8", "pkg-dir": "^2.0.0" @@ -5518,9 +5518,9 @@ } }, "eslint-plugin-import": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.1.tgz", - "integrity": "sha512-YEESFKOcMIXJTosb5YaepqVhQHGMb8dxkgov560GqMDP/658U5vk6FeVSR7xXLeYkPc7xPYy+uAoiYE/bKMphA==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "requires": { "array-includes": "^3.0.3", "contains-path": "^0.1.0", @@ -5576,9 +5576,9 @@ } }, "eslint-plugin-react": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz", - "integrity": "sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", @@ -6870,9 +6870,9 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" }, "gatsby": { - "version": "2.13.31", - "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.31.tgz", - "integrity": "sha512-Oi/M9aD1wNTP+/3xTz5otJ3mPcYgaH3oOV1QFPjOUAozWB8sI31pjWta+8TkqHPN6jxag/quVaQe/LiqgZ/IEA==", + "version": "2.13.34", + "resolved": "https://registry.npmjs.org/gatsby/-/gatsby-2.13.34.tgz", + "integrity": "sha512-JDf3wEVGDw0EMwWARYPeWMVn6FHF7sGXCUsvReBuPXTUGfwteCpR6cZbdhUs/CXh7m/fMYEmEdVeETov7yRUHw==", "requires": { "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", @@ -6932,6 +6932,7 @@ "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", "gatsby-cli": "^2.7.17", + "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", "gatsby-plugin-page-creator": "^2.1.5", @@ -7294,6 +7295,11 @@ } } }, + "gatsby-core-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.0.3.tgz", + "integrity": "sha512-01B0wqVTftFcYwVR7HGJy+Nriy+xxC++VZhsWNCFWtby1NwfSDUwkoScGcZ/jXvg9waEmBC1n70FwVIDnoHzSA==" + }, "gatsby-graphiql-explorer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/gatsby-graphiql-explorer/-/gatsby-graphiql-explorer-0.2.3.tgz", @@ -11982,14 +11988,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12158,14 +12164,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12245,14 +12251,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12511,14 +12517,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -12613,14 +12619,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", @@ -13240,9 +13246,9 @@ } }, "react-hot-loader": { - "version": "4.12.8", - "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.8.tgz", - "integrity": "sha512-/Df2J3znMHzRzI6CW0dTOIWD2sjkVHxv56XCqujAo9mR+k2PVTiGjUgYBiGPGsix9zQzgCRfOKca93o9Zdj2vQ==", + "version": "4.12.9", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.12.9.tgz", + "integrity": "sha512-lWT3JpWUN7nGHSoI9c4MV+42ov79bd8aqwDzhoyKev3owIh+hbEivT6Mb81lCV6tWuqm9trKo2/Th2/YDhFCdw==", "requires": { "fast-levenshtein": "^2.0.6", "global": "^4.3.0", @@ -13250,7 +13256,7 @@ "loader-utils": "^1.1.0", "prop-types": "^15.6.1", "react-lifecycles-compat": "^3.0.4", - "shallowequal": "^1.0.2", + "shallowequal": "^1.1.0", "source-map": "^0.7.3" }, "dependencies": { @@ -15190,14 +15196,14 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==" + "version": "1.0.30000985", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000985.tgz", + "integrity": "sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w==" }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==" + "version": "1.3.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.199.tgz", + "integrity": "sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA==" }, "node-releases": { "version": "1.1.25", diff --git a/themes/gatsby-starter-theme/package.json b/themes/gatsby-starter-theme/package.json index df3fbfdecbd79..b3b5aedbb2c0c 100644 --- a/themes/gatsby-starter-theme/package.json +++ b/themes/gatsby-starter-theme/package.json @@ -8,7 +8,7 @@ "build": "gatsby build" }, "dependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "gatsby-theme-blog": "^1.0.0", "gatsby-theme-notes": "^1.0.0", "react": "^16.8.6", diff --git a/themes/gatsby-theme-blog/package.json b/themes/gatsby-theme-blog/package.json index 17093aeb69d34..aaab6efd39b07 100644 --- a/themes/gatsby-theme-blog/package.json +++ b/themes/gatsby-theme-blog/package.json @@ -27,18 +27,18 @@ "gatsby-core-utils": "^1.0.3", "gatsby-image": "^2.2.6", "gatsby-plugin-emotion": "^4.1.2", - "gatsby-plugin-feed": "^2.3.4", - "gatsby-plugin-mdx": "^1.0.14", + "gatsby-plugin-feed": "^2.3.5", + "gatsby-plugin-mdx": "^1.0.15", "gatsby-plugin-react-helmet": "^3.1.2", - "gatsby-plugin-sharp": "^2.2.8", + "gatsby-plugin-sharp": "^2.2.9", "gatsby-plugin-theme-ui": "^0.2.6", "gatsby-plugin-twitter": "^2.1.2", "gatsby-remark-code-titles": "^1.1.0", "gatsby-remark-copy-linked-files": "^2.1.3", - "gatsby-remark-images": "^3.1.6", + "gatsby-remark-images": "^3.1.7", "gatsby-remark-numbered-footnotes": "^1.0.0", "gatsby-remark-smartypants": "^2.1.2", - "gatsby-source-filesystem": "^2.1.5", + "gatsby-source-filesystem": "^2.1.6", "gatsby-transformer-sharp": "^2.2.4", "react-helmet": "^5.2.1", "react-switch": "^5.0.1", @@ -49,7 +49,7 @@ "typography-theme-wordpress-2016": "^0.16.19" }, "devDependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "prettier": "^1.18.2", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/themes/gatsby-theme-notes/package.json b/themes/gatsby-theme-notes/package.json index 1e8cf244c7649..3ce504991da9c 100644 --- a/themes/gatsby-theme-notes/package.json +++ b/themes/gatsby-theme-notes/package.json @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/themes/gatsby-theme-notes#readme", "devDependencies": { - "gatsby": "^2.13.31", + "gatsby": "^2.13.34", "react": "^16.8.6", "react-dom": "^16.8.6" }, @@ -36,12 +36,12 @@ "gatsby-core-utils": "^1.0.3", "gatsby-plugin-compile-es6-packages": "^1.2.0", "gatsby-plugin-emotion": "^4.1.2", - "gatsby-plugin-mdx": "^1.0.14", + "gatsby-plugin-mdx": "^1.0.15", "gatsby-plugin-meta-redirect": "^1.1.1", "gatsby-plugin-og-image": "0.0.1", "gatsby-plugin-redirects": "^1.0.0", "gatsby-plugin-theme-ui": "^0.2.6", - "gatsby-source-filesystem": "^2.1.5", + "gatsby-source-filesystem": "^2.1.6", "is-present": "^1.0.0", "react-feather": "^1.1.6", "theme-ui": "^0.2.14" From 59fdbc1e292906373006aef3d6871e7af0bb057c Mon Sep 17 00:00:00 2001 From: Alexandre Breteau Date: Tue, 23 Jul 2019 16:34:07 +0200 Subject: [PATCH 020/157] =?UTF-8?q?fix(gatsby-cli):=20fallback=20to=20empt?= =?UTF-8?q?y=20string=20when=20`appName`=20is=20em=E2=80=A6=20(#15943)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gatsby-cli/src/reporter/reporters/ink/components/develop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby-cli/src/reporter/reporters/ink/components/develop.js b/packages/gatsby-cli/src/reporter/reporters/ink/components/develop.js index 7f37b6b50c684..5dc05da261a95 100644 --- a/packages/gatsby-cli/src/reporter/reporters/ink/components/develop.js +++ b/packages/gatsby-cli/src/reporter/reporters/ink/components/develop.js @@ -72,7 +72,7 @@ class Develop extends Component { {this.state.pagesCount} pages - {this.props.stage.context.appName} + {this.props.stage.context.appName || ``} ) From 4c1232da802115786204fd40f8163967a62e5137 Mon Sep 17 00:00:00 2001 From: Dustin Schau Date: Tue, 23 Jul 2019 07:34:35 -0700 Subject: [PATCH 021/157] chore(release): Publish - gatsby-cli@2.7.18 - gatsby@2.13.35 --- packages/gatsby-cli/CHANGELOG.md | 6 ++++++ packages/gatsby-cli/package.json | 2 +- packages/gatsby/CHANGELOG.md | 4 ++++ packages/gatsby/package.json | 4 ++-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-cli/CHANGELOG.md b/packages/gatsby-cli/CHANGELOG.md index 2c665f35d69e6..174a88af90178 100644 --- a/packages/gatsby-cli/CHANGELOG.md +++ b/packages/gatsby-cli/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.7.18](https://github.com/gatsbyjs/gatsby/compare/gatsby-cli@2.7.17...gatsby-cli@2.7.18) (2019-07-23) + +### Bug Fixes + +- **gatsby-cli:** fallback to empty string when `appName` is em… ([#15943](https://github.com/gatsbyjs/gatsby/issues/15943)) ([59fdbc1](https://github.com/gatsbyjs/gatsby/commit/59fdbc1)) + ## [2.7.17](https://github.com/gatsbyjs/gatsby/compare/gatsby-cli@2.7.16...gatsby-cli@2.7.17) (2019-07-19) ### Bug Fixes diff --git a/packages/gatsby-cli/package.json b/packages/gatsby-cli/package.json index 366e95c37d9e9..2ec3206773cb4 100644 --- a/packages/gatsby-cli/package.json +++ b/packages/gatsby-cli/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-cli", "description": "Gatsby command-line interface for creating new sites and running Gatsby commands", - "version": "2.7.17", + "version": "2.7.18", "author": "Kyle Mathews ", "bin": { "gatsby": "lib/index.js" diff --git a/packages/gatsby/CHANGELOG.md b/packages/gatsby/CHANGELOG.md index 4265e9e34bd9f..cff73b6b902de 100644 --- a/packages/gatsby/CHANGELOG.md +++ b/packages/gatsby/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.13.35](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.13.34...gatsby@2.13.35) (2019-07-23) + +**Note:** Version bump only for package gatsby + ## [2.13.34](https://github.com/gatsbyjs/gatsby/compare/gatsby@2.13.33...gatsby@2.13.34) (2019-07-23) ### Bug Fixes diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 87d015a1a8e1c..cbe04b45ba2de 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -1,7 +1,7 @@ { "name": "gatsby", "description": "Blazing fast modern site generator for React", - "version": "2.13.34", + "version": "2.13.35", "author": "Kyle Mathews ", "bin": { "gatsby": "./dist/bin/gatsby.js" @@ -66,7 +66,7 @@ "flat": "^4.0.0", "fs-exists-cached": "1.0.0", "fs-extra": "^5.0.0", - "gatsby-cli": "^2.7.17", + "gatsby-cli": "^2.7.18", "gatsby-core-utils": "^1.0.3", "gatsby-graphiql-explorer": "^0.2.3", "gatsby-link": "^2.2.2", From b2f089175c5ee06b10f720426df3b746628d1fd0 Mon Sep 17 00:00:00 2001 From: Igor Akkerman Date: Tue, 23 Jul 2019 16:44:08 +0200 Subject: [PATCH 022/157] =?UTF-8?q?fix(gatsby-transformer-yaml):=20stop=20?= =?UTF-8?q?crashing=20and=20use=20meaningful=E2=80=A6=20(#15825)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Unit test refactored: code simplified, test case names made explicit, duplication of code and test cases removed * If the YAML document's source is other than a file, the target node type name is based on the original node's internal type --- .../__snapshots__/gatsby-node.js.snap | 830 +++++++++++++++++- .../src/__tests__/gatsby-node.js | 361 ++++---- .../src/gatsby-node.js | 2 + 3 files changed, 1005 insertions(+), 188 deletions(-) diff --git a/packages/gatsby-transformer-yaml/src/__tests__/__snapshots__/gatsby-node.js.snap b/packages/gatsby-transformer-yaml/src/__tests__/__snapshots__/gatsby-node.js.snap index 283e0a5676662..b3deebec448e2 100644 --- a/packages/gatsby-transformer-yaml/src/__tests__/__snapshots__/gatsby-node.js.snap +++ b/packages/gatsby-transformer-yaml/src/__tests__/__snapshots__/gatsby-node.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Process YAML nodes correctly correctly creates a node from JSON which is a single object 1`] = ` +exports[`Processing YAML nodes with internal type 'File' from a YAML array of dictionaries, when no target type name is specified, all nodes have a type name based on the file name 1`] = ` Array [ Array [ Object { @@ -10,7 +10,589 @@ Array [ "id": "uuid-from-gatsby", "internal": Object { "contentDigest": "contentDigest", - "type": "BarYaml", + "type": "MyFileYaml", + }, + "parent": "whatever", + }, + ], + Array [ + Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "MyFileYaml", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a YAML array of dictionaries, when no target type name is specified, all nodes have a type name based on the file name 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "MyFileYaml", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], + Array [ + Object { + "child": Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "MyFileYaml", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a YAML array of dictionaries, with the specified target type name 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + ], + Array [ + Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a YAML array of dictionaries, with the specified target type name 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], + Array [ + Object { + "child": Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a YAML array of dictionaries, with the target type name explicitely retrieved from the YAML content 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "yup", + }, + "parent": "whatever", + }, + ], + Array [ + Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "nope", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a YAML array of dictionaries, with the target type name explicitely retrieved from the YAML content 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "yup", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], + Array [ + Object { + "child": Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "nope", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a single YAML dictionary, when no target type name is specified, the type name is based on the directory name 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "FooBarYaml", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a single YAML dictionary, when no target type name is specified, the type name is based on the directory name 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "FooBarYaml", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + id: some + blue: true + funny: yup + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a single YAML dictionary, with the specified target type name 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a single YAML dictionary, with the specified target type name 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + id: some + blue: true + funny: yup + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a single YAML dictionary, with the target type name explicitely retrieved from the YAML content 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "yup", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type 'File' from a single YAML dictionary, with the target type name explicitely retrieved from the YAML content 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "yup", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + id: some + blue: true + funny: yup + ", + "dir": "/top/foo bar/", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "File", + }, + "name": "My File", + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a YAML array of dictionaries, when no target type name is specified, all nodes have a type name based on the original node's internal type 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "OtherYaml", + }, + "parent": "whatever", + }, + ], + Array [ + Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "OtherYaml", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a YAML array of dictionaries, when no target type name is specified, all nodes have a type name based on the original node's internal type 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "OtherYaml", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "Other", + }, + "parent": null, + }, + }, + ], + Array [ + Object { + "child": Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "OtherYaml", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "Other", + }, + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a YAML array of dictionaries, with the specified target type name 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + ], + Array [ + Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", }, "parent": "whatever", }, @@ -18,7 +600,7 @@ Array [ ] `; -exports[`Process YAML nodes correctly correctly creates a node from JSON which is a single object 2`] = ` +exports[`Processing YAML nodes with internal type other than 'File' from a YAML array of dictionaries, with the specified target type name 2`] = ` Array [ Array [ Object { @@ -29,22 +611,55 @@ Array [ "id": "uuid-from-gatsby", "internal": Object { "contentDigest": "contentDigest", - "type": "BarYaml", + "type": "fixed", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "Other", + }, + "parent": null, + }, + }, + ], + Array [ + Object { + "child": Object { + "blue": false, + "children": Array [], + "funny": "nope", + "id": "uuid-from-gatsby", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", }, "parent": "whatever", }, "parent": Object { "children": Array [], - "content": "blue: true -funny: yup -", - "dir": "/bar/", + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", "id": "whatever", "internal": Object { "contentDigest": "whatever", "mediaType": "text/yaml", + "type": "Other", }, - "name": "test", "parent": null, }, }, @@ -52,7 +667,7 @@ funny: yup ] `; -exports[`Process YAML nodes correctly correctly creates nodes from JSON which is an array of objects 1`] = ` +exports[`Processing YAML nodes with internal type other than 'File' from a YAML array of dictionaries, with the target type name explicitely retrieved from the YAML content 1`] = ` Array [ Array [ Object { @@ -62,7 +677,7 @@ Array [ "id": "uuid-from-gatsby", "internal": Object { "contentDigest": "contentDigest", - "type": "TestYaml", + "type": "yup", }, "parent": "whatever", }, @@ -75,7 +690,7 @@ Array [ "id": "uuid-from-gatsby", "internal": Object { "contentDigest": "contentDigest", - "type": "TestYaml", + "type": "nope", }, "parent": "whatever", }, @@ -83,7 +698,7 @@ Array [ ] `; -exports[`Process YAML nodes correctly correctly creates nodes from JSON which is an array of objects 2`] = ` +exports[`Processing YAML nodes with internal type other than 'File' from a YAML array of dictionaries, with the target type name explicitely retrieved from the YAML content 2`] = ` Array [ Array [ Object { @@ -94,23 +709,24 @@ Array [ "id": "uuid-from-gatsby", "internal": Object { "contentDigest": "contentDigest", - "type": "TestYaml", + "type": "yup", }, "parent": "whatever", }, "parent": Object { "children": Array [], - "content": "- blue: true - funny: yup -- blue: false - funny: nope -", + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", "id": "whatever", "internal": Object { "contentDigest": "whatever", "mediaType": "text/yaml", + "type": "Other", }, - "name": "test", "parent": null, }, }, @@ -124,23 +740,183 @@ Array [ "id": "uuid-from-gatsby", "internal": Object { "contentDigest": "contentDigest", - "type": "TestYaml", + "type": "nope", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + - blue: true + funny: yup + - blue: false + funny: nope + ", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "Other", + }, + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a single YAML dictionary, when no target type name is specified, the type name is based on the original node's internal type 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "OtherYaml", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a single YAML dictionary, when no target type name is specified, the type name is based on the original node's internal type 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "OtherYaml", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + id: some + blue: true + funny: yup + ", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "Other", + }, + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a single YAML dictionary, with the specified target type name 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a single YAML dictionary, with the specified target type name 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "fixed", + }, + "parent": "whatever", + }, + "parent": Object { + "children": Array [], + "content": " + id: some + blue: true + funny: yup + ", + "id": "whatever", + "internal": Object { + "contentDigest": "whatever", + "mediaType": "text/yaml", + "type": "Other", + }, + "parent": null, + }, + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a single YAML dictionary, with the target type name explicitely retrieved from the YAML content 1`] = ` +Array [ + Array [ + Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "yup", + }, + "parent": "whatever", + }, + ], +] +`; + +exports[`Processing YAML nodes with internal type other than 'File' from a single YAML dictionary, with the target type name explicitely retrieved from the YAML content 2`] = ` +Array [ + Array [ + Object { + "child": Object { + "blue": true, + "children": Array [], + "funny": "yup", + "id": "some", + "internal": Object { + "contentDigest": "contentDigest", + "type": "yup", }, "parent": "whatever", }, "parent": Object { "children": Array [], - "content": "- blue: true - funny: yup -- blue: false - funny: nope -", + "content": " + id: some + blue: true + funny: yup + ", "id": "whatever", "internal": Object { "contentDigest": "whatever", "mediaType": "text/yaml", + "type": "Other", }, - "name": "test", "parent": null, }, }, diff --git a/packages/gatsby-transformer-yaml/src/__tests__/gatsby-node.js b/packages/gatsby-transformer-yaml/src/__tests__/gatsby-node.js index 7cd21f202b18f..73541a3c57234 100644 --- a/packages/gatsby-transformer-yaml/src/__tests__/gatsby-node.js +++ b/packages/gatsby-transformer-yaml/src/__tests__/gatsby-node.js @@ -1,11 +1,24 @@ const Promise = require(`bluebird`) const os = require(`os`) -const yaml = require(`js-yaml`) - const { onCreateNode } = require(`../gatsby-node`) -describe(`Process YAML nodes correctly`, () => { - const node = { +const createNodeId = jest.fn().mockReturnValue(`uuid-from-gatsby`) +const createContentDigest = jest.fn().mockReturnValue(`contentDigest`) + +const loadNodeContent = node => Promise.resolve(node.content) + +let createNode +let createParentChildLink +let actions +let node +let createNodeSpec + +beforeEach(() => { + createNode = jest.fn() + createParentChildLink = jest.fn() + actions = { createNode, createParentChildLink } + + node = { id: `whatever`, parent: null, children: [], @@ -13,170 +26,196 @@ describe(`Process YAML nodes correctly`, () => { contentDigest: `whatever`, mediaType: `text/yaml`, }, - name: `test`, } - // Make some fake functions its expecting. - const loadNodeContent = node => Promise.resolve(node.content) - - it(`correctly creates nodes from JSON which is an array of objects`, async () => { - const data = [{ blue: true, funny: `yup` }, { blue: false, funny: `nope` }] - node.content = yaml.safeDump(data) - - const createNode = jest.fn() - const createParentChildLink = jest.fn() - const actions = { createNode, createParentChildLink } - const createNodeId = jest.fn() - createNodeId.mockReturnValue(`uuid-from-gatsby`) - const createContentDigest = jest.fn().mockReturnValue(`contentDigest`) - - await onCreateNode({ - node, - loadNodeContent, - actions, - createNodeId, - createContentDigest, - }).then(() => { - expect(createNode.mock.calls).toMatchSnapshot() - expect(createParentChildLink.mock.calls).toMatchSnapshot() - expect(createNode).toHaveBeenCalledTimes(2) - expect(createParentChildLink).toHaveBeenCalledTimes(2) + createNodeSpec = { + node, + loadNodeContent, + actions, + createNodeId, + createContentDigest, + } +}) + +const expectCreatedNodesMatchingSnapshot = count => { + expect(createNode.mock.calls).toMatchSnapshot() + expect(createParentChildLink.mock.calls).toMatchSnapshot() + expect(createNode).toHaveBeenCalledTimes(count) + expect(createParentChildLink).toHaveBeenCalledTimes(count) +} + +const expectCreatedNodeTypeName = nodeTypeName => { + expect(createNode).toBeCalledWith( + expect.objectContaining({ + internal: expect.objectContaining({ + type: nodeTypeName, + }), + }) + ) +} + +describe(`Processing YAML nodes with internal type 'File'`, () => { + beforeEach(() => { + node.internal.type = `File` + node.dir = `${os.tmpdir()}/top/foo bar/` + node.name = `My File` + }) + + describe(`from a single YAML dictionary,`, () => { + beforeEach(() => { + node.content = ` + id: some + blue: true + funny: yup + ` + }) + + it(`when no target type name is specified, the type name is based on the directory name`, async () => { + await onCreateNode(createNodeSpec) + + expectCreatedNodesMatchingSnapshot(1) + expectCreatedNodeTypeName(`FooBarYaml`) + }) + + it(`with the specified target type name`, async () => { + await onCreateNode(createNodeSpec, { + typeName: `fixed`, + }) + + expectCreatedNodesMatchingSnapshot(1) + expectCreatedNodeTypeName(`fixed`) + }) + + it(`with the target type name explicitely retrieved from the YAML content`, async () => { + // noinspection JSUnusedLocalSymbols (unused fields left as documentation) + await onCreateNode(createNodeSpec, { + typeName: ({ node, object, isArray }) => object.funny, + }) + + expectCreatedNodesMatchingSnapshot(1) + expectCreatedNodeTypeName(`yup`) + }) + }) + + describe(`from a YAML array of dictionaries,`, () => { + beforeEach(() => { + node.content = ` + - blue: true + funny: yup + - blue: false + funny: nope + ` + }) + + it(`when no target type name is specified, all nodes have a type name based on the file name`, async () => { + await onCreateNode(createNodeSpec) + + expectCreatedNodesMatchingSnapshot(2) + expectCreatedNodeTypeName(`MyFileYaml`) + expectCreatedNodeTypeName(`MyFileYaml`) + }) + + it(`with the specified target type name`, async () => { + await onCreateNode(createNodeSpec, { + typeName: `fixed`, + }) + + expectCreatedNodesMatchingSnapshot(2) + expectCreatedNodeTypeName(`fixed`) + expectCreatedNodeTypeName(`fixed`) + }) + + it(`with the target type name explicitely retrieved from the YAML content`, async () => { + // noinspection JSUnusedLocalSymbols (unused fields left as documentation) + await onCreateNode(createNodeSpec, { + typeName: ({ node, object, isArray }) => object.funny, + }) + + expectCreatedNodesMatchingSnapshot(2) + expectCreatedNodeTypeName(`yup`) + expectCreatedNodeTypeName(`nope`) }) }) +}) + +describe(`Processing YAML nodes with internal type other than 'File'`, () => { + beforeEach(() => { + node.internal.type = `Other` + }) - it(`correctly creates a node from JSON which is a single object`, async () => { - const data = { blue: true, funny: `yup` } - node.content = yaml.safeDump(data) - node.dir = `${os.tmpdir()}/bar/` - - const createNode = jest.fn() - const createParentChildLink = jest.fn() - const actions = { createNode, createParentChildLink } - const createNodeId = jest.fn() - createNodeId.mockReturnValue(`uuid-from-gatsby`) - const createContentDigest = jest.fn().mockReturnValue(`contentDigest`) - - await onCreateNode({ - node, - loadNodeContent, - actions, - createNodeId, - createContentDigest, - }).then(() => { - expect(createNode.mock.calls).toMatchSnapshot() - expect(createParentChildLink.mock.calls).toMatchSnapshot() - expect(createNode).toHaveBeenCalledTimes(1) - expect(createParentChildLink).toHaveBeenCalledTimes(1) + describe(`from a single YAML dictionary,`, () => { + beforeEach(() => { + node.content = ` + id: some + blue: true + funny: yup + ` + }) + + it(`when no target type name is specified, the type name is based on the original node's internal type`, async () => { + await onCreateNode(createNodeSpec) + + expectCreatedNodesMatchingSnapshot(1) + expectCreatedNodeTypeName(`OtherYaml`) + }) + + it(`with the specified target type name`, async () => { + await onCreateNode(createNodeSpec, { + typeName: `fixed`, + }) + + expectCreatedNodesMatchingSnapshot(1) + expectCreatedNodeTypeName(`fixed`) + }) + + it(`with the target type name explicitely retrieved from the YAML content`, async () => { + // noinspection JSUnusedLocalSymbols (unused fields left as documentation) + await onCreateNode(createNodeSpec, { + typeName: ({ node, object, isArray }) => object.funny, + }) + + expectCreatedNodesMatchingSnapshot(1) + expectCreatedNodeTypeName(`yup`) }) }) - it(`correctly sets node type for array of objects`, () => - Promise.all( - [ - { - typeName: null, - expectedNodeTypes: [`TestYaml`, `TestYaml`], - }, - { - typeName: `fixed`, - expectedNodeTypes: [`fixed`, `fixed`], - }, - { - typeName: ({ node, object }) => object.funny, - expectedNodeTypes: [`yup`, `nope`], - }, - ].map( - async ({ typeName, expectedNodeTypes: [expectedOne, expectedTwo] }) => { - const data = [ - { id: `foo`, blue: true, funny: `yup` }, - { blue: false, funny: `nope` }, - ] - - node.content = yaml.safeDump(data) - node.dir = `${os.tmpdir()}/bar/` - - const createNode = jest.fn() - const createParentChildLink = jest.fn() - const actions = { createNode, createParentChildLink } - const createNodeId = jest.fn() - createNodeId.mockReturnValue(`uuid-from-gatsby`) - const createContentDigest = jest.fn().mockReturnValue(`contentDigest`) - - return onCreateNode( - { - node, - loadNodeContent, - actions, - createNodeId, - createContentDigest, - }, - { typeName } - ).then(() => { - expect(createNode).toBeCalledWith( - expect.objectContaining({ - internal: expect.objectContaining({ - type: expectedOne, - }), - }) - ) - expect(createNode).toBeCalledWith( - expect.objectContaining({ - internal: expect.objectContaining({ - type: expectedTwo, - }), - }) - ) - }) - } - ) - )) - - it(`correctly sets node type for single object`, () => - Promise.all( - [ - { - typeName: null, - expectedNodeType: `TestdirYaml`, - }, - { - typeName: `fixed`, - expectedNodeType: `fixed`, - }, - { - typeName: ({ node, object }) => object.funny, - expectedNodeType: `yup`, - }, - ].map(async ({ typeName, expectedNodeType }) => { - const data = { id: `foo`, blue: true, funny: `yup` } - - node.content = yaml.safeDump(data) - node.dir = `${os.tmpdir()}/testdir/` - - const createNode = jest.fn() - const createParentChildLink = jest.fn() - const actions = { createNode, createParentChildLink } - const createNodeId = jest.fn() - createNodeId.mockReturnValue(`uuid-from-gatsby`) - const createContentDigest = jest.fn().mockReturnValue(`contentDigest`) - - return onCreateNode( - { - node, - loadNodeContent, - actions, - createNodeId, - createContentDigest, - }, - { typeName } - ).then(() => { - expect(createNode).toBeCalledWith( - expect.objectContaining({ - internal: expect.objectContaining({ - type: expectedNodeType, - }), - }) - ) - }) + describe(`from a YAML array of dictionaries,`, () => { + beforeEach(() => { + node.content = ` + - blue: true + funny: yup + - blue: false + funny: nope + ` + }) + + it(`when no target type name is specified, all nodes have a type name based on the original node's internal type`, async () => { + await onCreateNode(createNodeSpec) + + expectCreatedNodesMatchingSnapshot(2) + expectCreatedNodeTypeName(`OtherYaml`) + expectCreatedNodeTypeName(`OtherYaml`) + }) + + it(`with the specified target type name`, async () => { + await onCreateNode(createNodeSpec, { + typeName: `fixed`, }) - )) + + expectCreatedNodesMatchingSnapshot(2) + expectCreatedNodeTypeName(`fixed`) + expectCreatedNodeTypeName(`fixed`) + }) + + it(`with the target type name explicitely retrieved from the YAML content`, async () => { + // noinspection JSUnusedLocalSymbols (unused fields left as documentation) + await onCreateNode(createNodeSpec, { + typeName: ({ node, object, isArray }) => object.funny, + }) + + expectCreatedNodesMatchingSnapshot(2) + expectCreatedNodeTypeName(`yup`) + expectCreatedNodeTypeName(`nope`) + }) + }) }) diff --git a/packages/gatsby-transformer-yaml/src/gatsby-node.js b/packages/gatsby-transformer-yaml/src/gatsby-node.js index ccc7c8bba9ccb..9961d7303eaa1 100644 --- a/packages/gatsby-transformer-yaml/src/gatsby-node.js +++ b/packages/gatsby-transformer-yaml/src/gatsby-node.js @@ -11,6 +11,8 @@ async function onCreateNode( return pluginOptions.typeName({ node, object, isArray }) } else if (pluginOptions && _.isString(pluginOptions.typeName)) { return pluginOptions.typeName + } else if (node.internal.type !== `File`) { + return _.upperFirst(_.camelCase(`${node.internal.type} Yaml`)) } else if (isArray) { return _.upperFirst(_.camelCase(`${node.name} Yaml`)) } else { From 5821a24bbf281a5b52a7c390350873d30bd30379 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Tue, 23 Jul 2019 16:45:28 +0200 Subject: [PATCH 023/157] chore(release): Publish - gatsby-transformer-yaml@2.2.4 --- packages/gatsby-transformer-yaml/CHANGELOG.md | 6 ++++++ packages/gatsby-transformer-yaml/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-transformer-yaml/CHANGELOG.md b/packages/gatsby-transformer-yaml/CHANGELOG.md index 4547ad30e5e41..50e4146aaffc4 100644 --- a/packages/gatsby-transformer-yaml/CHANGELOG.md +++ b/packages/gatsby-transformer-yaml/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.2.4](https://github.com/gatsbyjs/gatsby/compare/gatsby-transformer-yaml@2.2.3...gatsby-transformer-yaml@2.2.4) (2019-07-23) + +### Bug Fixes + +- **gatsby-transformer-yaml:** stop crashing and use meaningful… ([#15825](https://github.com/gatsbyjs/gatsby/issues/15825)) ([b2f0891](https://github.com/gatsbyjs/gatsby/commit/b2f0891)) + ## [2.2.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-transformer-yaml@2.2.2...gatsby-transformer-yaml@2.2.3) (2019-07-13) **Note:** Version bump only for package gatsby-transformer-yaml diff --git a/packages/gatsby-transformer-yaml/package.json b/packages/gatsby-transformer-yaml/package.json index a368e51938583..8194df3405e08 100644 --- a/packages/gatsby-transformer-yaml/package.json +++ b/packages/gatsby-transformer-yaml/package.json @@ -1,7 +1,7 @@ { "name": "gatsby-transformer-yaml", "description": "Gatsby transformer plugin for yaml", - "version": "2.2.3", + "version": "2.2.4", "author": "Kyle Mathews ", "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" From 6adcb9a88791f3ffa580e340d2fe576d3b9b47b2 Mon Sep 17 00:00:00 2001 From: Ashrith Reddy Date: Tue, 23 Jul 2019 20:26:28 +0530 Subject: [PATCH 024/157] feat(gatsby): Includes ts/tsx files to eslint rules (#15976) --- packages/gatsby/src/utils/webpack-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby/src/utils/webpack-utils.js b/packages/gatsby/src/utils/webpack-utils.js index 8fffbca7dc3b5..3229696788c61 100644 --- a/packages/gatsby/src/utils/webpack-utils.js +++ b/packages/gatsby/src/utils/webpack-utils.js @@ -396,7 +396,7 @@ module.exports = async ({ let eslint = schema => { return { enforce: `pre`, - test: /\.jsx?$/, + test: /\.(jsx?|tsx?)$/, exclude: vendorRegex, use: [loaders.eslint(schema)], } From 045a70e6be94d7bc6cd21210910c32bd16db35d0 Mon Sep 17 00:00:00 2001 From: Rodrigo Pombo Date: Tue, 23 Jul 2019 17:02:10 +0200 Subject: [PATCH 025/157] feat(gatsby-theme-blog): use dirname as fallback as slug (#15988) When file is index.md we should use the dirname as a slug instead. We use the helper from gatsby-source-filesystem to accomplish this. --- themes/gatsby-theme-blog/gatsby-node.js | 13 ++++++------- themes/gatsby-theme-blog/package.json | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/themes/gatsby-theme-blog/gatsby-node.js b/themes/gatsby-theme-blog/gatsby-node.js index 9fe64c0930b6a..53556c6e5e8c8 100644 --- a/themes/gatsby-theme-blog/gatsby-node.js +++ b/themes/gatsby-theme-blog/gatsby-node.js @@ -3,7 +3,7 @@ const path = require(`path`) const mkdirp = require(`mkdirp`) const crypto = require(`crypto`) const Debug = require(`debug`) -const { urlResolve } = require(`gatsby-core-utils`) +const { createFilePath } = require(`gatsby-source-filesystem`) const debug = Debug(`gatsby-theme-blog`) @@ -167,11 +167,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => { exports.onCreateNode = ({ node, actions, getNode, createNodeId }) => { const { createNode, createParentChildLink } = actions - const toPostPath = node => { - const { dir } = path.parse(node.relativePath) - return urlResolve(basePath, dir, node.name) - } - // Make sure it's an MDX node if (node.internal.type !== `Mdx`) { return @@ -182,7 +177,11 @@ exports.onCreateNode = ({ node, actions, getNode, createNodeId }) => { const source = fileNode.sourceInstanceName if (node.internal.type === `Mdx` && source === contentPath) { - const slug = toPostPath(fileNode) + const slug = createFilePath({ + node: fileNode, + getNode, + basePath: contentPath, + }) const fieldData = { title: node.frontmatter.title, diff --git a/themes/gatsby-theme-blog/package.json b/themes/gatsby-theme-blog/package.json index aaab6efd39b07..b335ecad4133d 100644 --- a/themes/gatsby-theme-blog/package.json +++ b/themes/gatsby-theme-blog/package.json @@ -24,7 +24,6 @@ "@theme-ui/prism": "^0.2.14", "@theme-ui/typography": "^0.2.5", "deepmerge": "^4.0.0", - "gatsby-core-utils": "^1.0.3", "gatsby-image": "^2.2.6", "gatsby-plugin-emotion": "^4.1.2", "gatsby-plugin-feed": "^2.3.5", From ac75767a61880eeb7176965090cbb4bbcb6885ab Mon Sep 17 00:00:00 2001 From: Dustin Schau Date: Tue, 23 Jul 2019 08:11:16 -0700 Subject: [PATCH 026/157] refactor(www): use new clipboard.writeText API if it exists (#16012) --- www/src/components/__tests__/copy.js | 16 +++++++ .../components/code-block/__tests__/index.js | 27 +----------- www/src/components/copy.js | 21 +-------- www/src/utils/__tests__/copy-to-clipboard.js | 32 ++++++++++++++ www/src/utils/copy-to-clipboard.js | 44 +++++++++++-------- 5 files changed, 78 insertions(+), 62 deletions(-) create mode 100644 www/src/components/__tests__/copy.js create mode 100644 www/src/utils/__tests__/copy-to-clipboard.js diff --git a/www/src/components/__tests__/copy.js b/www/src/components/__tests__/copy.js new file mode 100644 index 0000000000000..4d989931cab12 --- /dev/null +++ b/www/src/components/__tests__/copy.js @@ -0,0 +1,16 @@ +import React from "react" +import { render } from "react-testing-library" + +import Copy from "../copy" + +test(`it renders Copy by default`, () => { + const { queryByText } = render() + + expect(queryByText(`Copy`)).toBeInTheDocument() +}) + +test(`it renders screen-reader text`, () => { + const { container } = render() + + expect(container.querySelector(`[aria-roledescription]`)).toBeInTheDocument() +}) diff --git a/www/src/components/code-block/__tests__/index.js b/www/src/components/code-block/__tests__/index.js index 8a7b47d080498..82e979a179ad2 100644 --- a/www/src/components/code-block/__tests__/index.js +++ b/www/src/components/code-block/__tests__/index.js @@ -1,17 +1,7 @@ import React from "react" -import CodeBlock from ".." -import { fireEvent, render } from "react-testing-library" +import { render } from "react-testing-library" -beforeEach(() => { - document.createRange = jest.fn() - document.execCommand = jest.fn() - window.getSelection = jest.fn().mockImplementation(() => { - return { - addRange: jest.fn(), - removeAllRanges: jest.fn(), - } - }) -}) +import CodeBlock from ".." describe(`basic functionality`, () => { describe(`copy`, () => { @@ -22,19 +12,6 @@ describe(`basic functionality`, () => { expect(queryByText(`copy`)).toBeDefined() }) - - it(`copies text to clipboard`, () => { - const text = `alert('hello world')` - const { queryByText } = render( - {text} - ) - - const copyButton = queryByText(`Copy`) - - fireEvent.click(copyButton) - - expect(document.execCommand).toHaveBeenCalledWith(`copy`) - }) }) describe(`highlighting`, () => { diff --git a/www/src/components/copy.js b/www/src/components/copy.js index eac756162e764..e510cc5f03284 100644 --- a/www/src/components/copy.js +++ b/www/src/components/copy.js @@ -11,24 +11,7 @@ import { shadows, transition, } from "../utils/presets" - -const copyToClipboard = content => { - const textarea = document.createElement(`textarea`) - textarea.value = content - textarea.setAttribute(`readonly`, true) - textarea.setAttribute(`contenteditable`, true) - textarea.style.position = `absolute` - textarea.style.left = `-9999px` - document.body.appendChild(textarea) - textarea.select() - const range = document.createRange() - const sel = window.getSelection() - sel.removeAllRanges() - sel.addRange(range) - textarea.setSelectionRange(0, textarea.value.length) - document.execCommand(`copy`) - document.body.removeChild(textarea) -} +import copyToClipboard from "../utils/copy-to-clipboard" const delay = duration => new Promise(resolve => setTimeout(resolve, duration)) @@ -67,7 +50,7 @@ function Copy({ className, content, duration, fileName, trim = false }) { }, }} onClick={async () => { - copyToClipboard(trim ? content.trim() : content) + await copyToClipboard(trim ? content.trim() : content) setCopied(true) diff --git a/www/src/utils/__tests__/copy-to-clipboard.js b/www/src/utils/__tests__/copy-to-clipboard.js new file mode 100644 index 0000000000000..8fc759d60cb59 --- /dev/null +++ b/www/src/utils/__tests__/copy-to-clipboard.js @@ -0,0 +1,32 @@ +import copyToClipboard from "../copy-to-clipboard" + +beforeEach(() => { + window.navigator.clipboard = { + writeText: jest.fn(), + } + + document.execCommand = jest.fn() + document.createRange = jest.fn() + window.getSelection = jest.fn(() => { + return { + removeAllRanges: jest.fn(), + addRange: jest.fn(), + } + }) +}) + +test(`it uses writeText API, by default`, async () => { + const str = `waddup` + await copyToClipboard(str) + + expect(window.navigator.clipboard.writeText).toHaveBeenCalledWith(str) +}) + +test(`it falls back to execCommand, if writeText is not defined`, async () => { + window.navigator.clipboard = {} + + await copyToClipboard(`sup`) + + expect(document.execCommand).toHaveBeenCalledWith(`copy`) + expect(document.execCommand).toHaveBeenCalledTimes(1) +}) diff --git a/www/src/utils/copy-to-clipboard.js b/www/src/utils/copy-to-clipboard.js index 904f4e506b68e..472d6b85d44df 100644 --- a/www/src/utils/copy-to-clipboard.js +++ b/www/src/utils/copy-to-clipboard.js @@ -1,22 +1,30 @@ -// https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f const copyToClipboard = str => { - const el = document.createElement(`textarea`) // Create a