Skip to content

Commit f2b4319

Browse files
jeffwilletteKyleAMathews
authored andcommitted
Fix #4503 (#4698)
* Fix #4503 - added check to make sure node exists before tying to get descendents and delete - added test case that calls deleteNode on an undefined node * formatting * formatting
1 parent 924e742 commit f2b4319

File tree

34 files changed

+270
-165
lines changed

34 files changed

+270
-165
lines changed

docs/blog/2018-03-07-why-we-created-the-plugin-library/index.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Next, we analyzed over 10 admirable and/or popular plugin libraries to draw from
4343
* [Apple App store](https://www.apple.com/ios/app-store/)
4444
* [Google Play store](https://play.google.com/store/apps/top)
4545

46-
4746
### The goods 👍
4847

4948
We liked when these libraries let users:
@@ -55,14 +54,13 @@ We liked when these libraries let users:
5554

5655
### The bads 👎
5756

58-
We *didn't* like these things in some of the above libraries:
57+
We _didn't_ like these things in some of the above libraries:
5958

6059
* poor contrast and poor information heirarchy
6160
* limited filters
6261
* too many filters
6362
* low information density
6463

65-
6664
## Prototypes and their evolutions
6765

6866
Here’s a sampling of screenshots that many community members contributed to and gave feedback about. It’s rewarding to see how much the design has progressed (and will keep progressing).
@@ -74,17 +72,16 @@ Here’s a sampling of screenshots that many community members contributed to an
7472

7573
## Next steps for the plugin library
7674

77-
The plugin ecosystem is a huge part of what makes Gatsby awesome because plugins and packages make Gatsby extensible. There's a virtuous cycle where people find plugins, use them, contribute to them, and create new ones. We hope to accelerate this cycle, so the Gatsby ecosystem can develop faster and more people can build awesome sites!
75+
The plugin ecosystem is a huge part of what makes Gatsby awesome because plugins and packages make Gatsby extensible. There's a virtuous cycle where people find plugins, use them, contribute to them, and create new ones. We hope to accelerate this cycle, so the Gatsby ecosystem can develop faster and more people can build awesome sites!
7876

7977
Here are some ways you can help make the Gatsby plugin ecoystem great:
8078

8179
* Share feedback on the plugin library on [Github Issue #4394](https://github.com/gatsbyjs/gatsby/issues/4394).
8280
* If you created a plugin and it's not showing up in the library, double check that the package has "gatsby-plugin" in its keywords.
8381
* Create plugins (or publish ones you've already built)! If you're interested, the [Plugin Authoring](/docs/plugin-authoring/) page can help.
84-
* [Contact me](https://twitter.com/shannonb_ux/status/938551014956732418) here if you have feedback that differs from or provides deeper insight into one of the pain points this article mentions.
82+
* [Contact me](https://twitter.com/shannonb_ux/status/938551014956732418) here if you have feedback that differs from or provides deeper insight into one of the pain points this article mentions.
8583
* Follow us on [Twitter](https://twitter.com/gatsbyjs).
8684

87-
8885
## Sneak peak into the next UX project
8986

9087
Our next UX project is designing and building a [Gatsby site showcase](https://github.com/gatsbyjs/gatsby/issues/4394). Please contribute to and subscribe to the issue to help out!

docs/docs/gatsby-config.md

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ _Note: There are many sample configs which may be helpful to reference in the di
1010

1111
Options available to set within `gatsby-config.js` include:
1212

13-
1. siteMetadata (object)
14-
2. plugins (array)
15-
3. pathPrefix (string)
16-
4. polyfill (boolean)
17-
5. mapping (object)
18-
6. proxy (object)
13+
1. siteMetadata (object)
14+
2. plugins (array)
15+
3. pathPrefix (string)
16+
4. polyfill (boolean)
17+
5. mapping (object)
18+
6. proxy (object)
1919

2020
## siteMetadata
2121

@@ -142,47 +142,44 @@ query BlogPost($slug: String!) {
142142
Mapping can also be used to map an array of ids to any other collection of data. For example, if you have two JSON files
143143
`experience.json` and `tech.json` as follows:
144144

145-
```javascript
145+
```json
146146
// experience.json
147147
[
148-
{
149-
"id": "companyA",
150-
"company": "Company A",
151-
"position": "Unicorn Developer",
152-
"from": "Dec 2016",
153-
"to": "Present",
154-
"items": [
155-
{
156-
"label": "Responsibility",
157-
"description": "Being an unicorn"
158-
},
159-
{
160-
"label": "Hands on",
161-
"tech": [
162-
"REACT",
163-
"NODE"
164-
]
165-
}
166-
]
167-
},
148+
{
149+
"id": "companyA",
150+
"company": "Company A",
151+
"position": "Unicorn Developer",
152+
"from": "Dec 2016",
153+
"to": "Present",
154+
"items": [
155+
{
156+
"label": "Responsibility",
157+
"description": "Being an unicorn"
158+
},
159+
{
160+
"label": "Hands on",
161+
"tech": ["REACT", "NODE"]
162+
}
163+
]
164+
}
168165
]
169166
```
170167

171-
```javascript
168+
```json
172169
// tech.json
173170
[
174-
{
175-
"id": "REACT",
176-
"icon": "facebook",
177-
"color": "teal",
178-
"label": "React"
179-
},
180-
{
181-
"id": "NODE",
182-
"icon": "server",
183-
"color": "green",
184-
"label": "NodeJS"
185-
}
171+
{
172+
"id": "REACT",
173+
"icon": "facebook",
174+
"color": "teal",
175+
"label": "React"
176+
},
177+
{
178+
"id": "NODE",
179+
"icon": "server",
180+
"color": "green",
181+
"label": "NodeJS"
182+
}
186183
]
187184
```
188185

@@ -202,24 +199,24 @@ You can query the `tech` object via the referred ids in `experience`:
202199
```graphql
203200
query CV {
204201
experience: allExperienceJson {
205-
edges {
206-
node {
207-
company
208-
position
209-
from
210-
to
211-
items {
212-
label
213-
description
214-
link
215-
tech {
216-
label
217-
color
218-
icon
219-
}
220-
}
202+
edges {
203+
node {
204+
company
205+
position
206+
from
207+
to
208+
items {
209+
label
210+
description
211+
link
212+
tech {
213+
label
214+
color
215+
icon
221216
}
217+
}
222218
}
219+
}
223220
}
224221
}
225222
```

docs/docs/gatsby-starters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,15 @@ Community:
299299
[(demo)](https://gatsby-starter-personal-blog.greglobinski.com/)
300300

301301
Features:
302-
302+
303303
* Ready to use, but easily customizable a fully equipped theme starter
304304
* Easy editable content in Markdown files (posts, pages and parts)
305-
* 'Like an app' layout transitions
305+
* 'Like an app' layout transitions
306306
* Easily restyled through theme object
307307
* Styling with JSS
308308
* Page transitions
309309
* Comments (Facebook)
310-
* Post categories
310+
* Post categories
311311
* Post list filtering
312312
* Full text searching (Algolia)
313313
* Contact form (Netlify form handling)
@@ -528,7 +528,7 @@ Community:
528528
* Responsive Design, optimized for Mobile devices
529529
* Seo Friendly
530530
* Uses Flexbox
531-
531+
532532
* [gatsby-starter-stellar](https://github.com/codebushi/gatsby-starter-stellar)
533533
[(demo)](http://gatsby-stellar.surge.sh/)
534534

docs/docs/graphql-reference.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ This query combines sorting, filtering, limiting and formatting together.
6666

6767
<iframe src="https://gatsbygraphql.sloppy.zone/?query=%7B%0A%20%20allMarkdownRemark(%0A%20%20%20%20limit%3A%203%0A%20%20%20%20filter%3A%20%7B%0A%20%20%20%20%20%20frontmatter%3A%20%7Bdate%3A%20%7Bne%3A%20null%7D%7D%0A%20%20%20%20%7D%0A%20%20%20%20sort%3A%20%7Bfields%3A%20%5Bfrontmatter___date%5D%2C%20order%3A%20DESC%7D%0A%20%20)%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20fields%7B%0A%20%20%20%20%20%20%20%20%20%20slug%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20frontmatter%20%7B%0A%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%20%20date(formatString%3A%20%22dddd%20DD%20MMMM%20YYYY%22)%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D" width="600" height="400"></iframe>
6868

69-
7069
## Query variables
7170

7271
Work in progress - pull requests welcome.
7372

7473
## Where next?
7574

76-
Try [running your own queries](https://gatsbygraphql.sloppy.zone/?query=%23%20Welcome%20to%20GraphiQL%0A%23%0A%23%20GraphiQL%20is%20an%20in-browser%20tool%20for%20writing%2C%20validating%2C%20and%0A%23%20testing%20GraphQL%20queries.%0A%23%0A%23%20Type%20queries%20into%20this%20side%20of%20the%20screen%2C%20and%20you%20will%20see%20intelligent%0A%23%20typeaheads%20aware%20of%20the%20current%20GraphQL%20type%20schema%20and%20live%20syntax%20and%0A%23%20validation%20errors%20highlighted%20within%20the%20text.%0A%23%0A%23%20GraphQL%20queries%20typically%20start%20with%20a%20%22%7B%22%20character.%20Lines%20that%20starts%0A%23%20with%20a%20%23%20are%20ignored.%0A%23%0A%23%20All%20the%20data%20behind%20gatsbyjs.org%20can%20be%20queried%20from%20here.%20Below%20is%20%0A%23%20an%20example%20query%20to%20get%20you%20started.%0A%23%0A%23%20Keyboard%20shortcuts%3A%0A%23%0A%23%20%20Prettify%20Query%3A%20%20Shift-Ctrl-P%20(or%20press%20the%20prettify%20button%20above)%0A%23%0A%23%20%20%20%20%20%20%20Run%20Query%3A%20%20Ctrl-Enter%20(or%20press%20the%20play%20button%20above)%0A%23%0A%23%20%20%20Auto%20Complete%3A%20%20Ctrl-Space%20(or%20just%20start%20typing)%0A%23%0A%0A%7B%0A%20%20allSitePage(%0A%20%20%20%20limit%3A%205%0A%20%20)%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20path%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D), check out the rest of [the docs](/docs/) or run through [the tutorial](/tutorial/).
75+
Try [running your own queries](<https://gatsbygraphql.sloppy.zone/?query=%23%20Welcome%20to%20GraphiQL%0A%23%0A%23%20GraphiQL%20is%20an%20in-browser%20tool%20for%20writing%2C%20validating%2C%20and%0A%23%20testing%20GraphQL%20queries.%0A%23%0A%23%20Type%20queries%20into%20this%20side%20of%20the%20screen%2C%20and%20you%20will%20see%20intelligent%0A%23%20typeaheads%20aware%20of%20the%20current%20GraphQL%20type%20schema%20and%20live%20syntax%20and%0A%23%20validation%20errors%20highlighted%20within%20the%20text.%0A%23%0A%23%20GraphQL%20queries%20typically%20start%20with%20a%20%22%7B%22%20character.%20Lines%20that%20starts%0A%23%20with%20a%20%23%20are%20ignored.%0A%23%0A%23%20All%20the%20data%20behind%20gatsbyjs.org%20can%20be%20queried%20from%20here.%20Below%20is%20%0A%23%20an%20example%20query%20to%20get%20you%20started.%0A%23%0A%23%20Keyboard%20shortcuts%3A%0A%23%0A%23%20%20Prettify%20Query%3A%20%20Shift-Ctrl-P%20(or%20press%20the%20prettify%20button%20above)%0A%23%0A%23%20%20%20%20%20%20%20Run%20Query%3A%20%20Ctrl-Enter%20(or%20press%20the%20play%20button%20above)%0A%23%0A%23%20%20%20Auto%20Complete%3A%20%20Ctrl-Space%20(or%20just%20start%20typing)%0A%23%0A%0A%7B%0A%20%20allSitePage(%0A%20%20%20%20limit%3A%205%0A%20%20)%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20path%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D>), check out the rest of [the docs](/docs/) or run through [the tutorial](/tutorial/).

docs/docs/local-https.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When setting up a development SSL certificate for the first time, you may be ask
1818

1919
Password:
2020

21-
This is *only* required the first time you are using Gatsby's HTTPS feature on your machine. After that, certificates will be created on the fly.
21+
This is _only_ required the first time you are using Gatsby's HTTPS feature on your machine. After that, certificates will be created on the fly.
2222

2323
After typing in your password, `devcert` will attempt to install some software necessary to tell Firefox (and Chrome, only on Linux) to trust your development certificates.
2424

@@ -33,6 +33,6 @@ Now open the development server at [https://localhost:8000](https://localhost:80
3333

3434
Find out more about [how devcert works](https://github.com/davewasmer/devcert#how-it-works).
3535

36-
****
36+
---
3737

3838
Keep in mind that the certificates are explicitly issued to `localhost` and will only be accepted there. Using it together with the `--host` option will likely result in browser warnings.

docs/docs/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ support, process images, etc.
99
For larger / complex sites, they let you modularize your site customizations
1010
into site-specific plugins.
1111

12-
Gatsby has a large and growing set of plugins. To search/browse official and
12+
Gatsby has a large and growing set of plugins. To search/browse official and
1313
community plugins and their documentation, visit the [Plugin Library](/packages/).
1414

1515
For information on building your own plugin, see the Plugin Authoring page (/plugin-authoring.md).

docs/tutorial/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ This tutorial is for _everyone_! You do not need to be a programmer or React.js
1515

1616
## Advanced tutorials
1717

18-
In these advanced tutorials, you'll learn how to pull data from almost anywhere into your Gatsby site with GraphQL.
18+
In these advanced tutorials, you'll learn how to pull data from almost anywhere into your Gatsby site with GraphQL.
1919

20-
4. [Querying for data in a blog](/tutorial/part-four/): Create a blog and use a GraphQL query to pull your site title into the blog header.
20+
4. [Querying for data in a blog](/tutorial/part-four/): Create a blog and use a GraphQL query to pull your site title into the blog header.
2121
5. [Source plugins and rendering queried data](/tutorial/part-five/): Use a source plugin to pull Markdown blogposts into your site and create an index page with a list of blogposts.
2222
6. [Transformer plugins](/tutorial/part-six/): Use a transformer plugin to transform your Markdown blogposts into a form the blog can render.
2323
7. [Programmatically create pages from data](/tutorial/part-seven/): Learn how to programmatically create a set of pages for your blogposts.

docs/tutorial/part-five/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ And… 😲
205205

206206
## What's coming next?
207207

208-
Now you've learned how source plugins bring data _into_ Gatsby’s data system. In the next tutorial, you'll learn how transformer plugins _transform_ the raw content brought by source plugins. The combination of source plugins and transformer plugins can handle all data sourcing and data transformation you might need when building a Gatsby site. Click here for the [next tutorial to learn about transformer plugins](/tutorial/part-six/).
208+
Now you've learned how source plugins bring data _into_ Gatsby’s data system. In the next tutorial, you'll learn how transformer plugins _transform_ the raw content brought by source plugins. The combination of source plugins and transformer plugins can handle all data sourcing and data transformation you might need when building a Gatsby site. Click here for the [next tutorial to learn about transformer plugins](/tutorial/part-six/).

docs/tutorial/part-four/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,3 @@ in our source.
347347
## What's coming next?
348348
349349
Next, you'll be learning about how to pull data into your Gatsby site using GraphQL with source plugins in [part five](/tutorial/part-five/) of the tutorial.
350-

docs/tutorial/part-seven/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,5 @@ Now that you've built a Gatsby site, where do you go next?
388388
* Share your Gatsby site on Twitter and see what other people have created by searching for #gatsbytutorial! Make sure to mention @gatsbyjs in your Tweet, and include the hashtag #gatsbytutorial :)
389389
* You could take a look at some [example sites](https://github.com/gatsbyjs/gatsby/tree/master/examples#gatsby-example-websites)
390390
* Explore more [plugins](/docs/plugins/)
391-
* See what [other people are building with Gatsby] (https://github.com/gatsbyjs/gatsby/#showcase)
391+
* See what [other people are building with Gatsby](https://github.com/gatsbyjs/gatsby/#showcase)
392392
* Check out the documentation on [Gatsby's APIs](/docs/api-specification/), [nodes](/docs/node-interface/) or [GraphQL](/docs/graphql-reference/)
393-
394-

0 commit comments

Comments
 (0)