Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into k-develop-ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Oct 12, 2020
2 parents 696487f + 63532f7 commit da624c5
Show file tree
Hide file tree
Showing 1,083 changed files with 40,166 additions and 17,917 deletions.
20 changes: 2 additions & 18 deletions .circleci/config.yml
Expand Up @@ -182,7 +182,7 @@ jobs:
executor: node
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*"
- run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*|yarn.lock"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_cache
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
steps:
- checkout
# We should always assert on master
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*"
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*|yarn.lock"
- <<: *attach_to_bootstrap
- run: yarn typecheck
- run: yarn check-repo-fields
Expand All @@ -234,17 +234,6 @@ jobs:
image: "14"
<<: *test_template

unit_tests_www:
executor: node
steps:
- checkout
- run:
command: yarn
working_directory: ~/project/www
- run:
command: yarn test
working_directory: ~/project/www

integration_tests_long_term_caching:
executor: node
steps:
Expand Down Expand Up @@ -571,11 +560,6 @@ workflows:
- lint
- typecheck
- bootstrap
- unit_tests_www:
requires:
- lint
- typecheck
- bootstrap
- integration_tests_long_term_caching:
<<: *e2e-test-workflow
- integration_tests_cache_resilience:
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -4,7 +4,7 @@
-->

<!--
Is this a blog post? Check out the docs at https://www.gatsbyjs.org/contributing/blog-contributions/, and please mention if the blog post is pre-approved
Is this a blog post? Check out the docs at https://www.gatsbyjs.com/contributing/blog-contributions/, and please mention if the blog post is pre-approved
by someone from Gatsby.
-->

Expand All @@ -21,7 +21,7 @@
- Update any references, if relevant. This includes Guides and Gatsby Internals docs.
- If no docs exist:
- Create a stub for documentation including bullet points for how to use the feature, code snippets (including from happy path tests), etc.
- Tag @gatsbyjs/learning for review, pairing, polishing of the documentation
- Tag @gatsbyjs/documentation for review, pairing, polishing of the documentation
-->

## Related Issues
Expand Down
1 change: 1 addition & 0 deletions .jestSetup.js
@@ -1 +1,2 @@
process.env.GATSBY_RECIPES_NO_COLOR = "true"
process.env.GATSBY_EXPERIMENTAL_PLUGIN_OPTION_VALIDATION = "true"
2 changes: 2 additions & 0 deletions .prettierignore
Expand Up @@ -22,6 +22,8 @@ packages/**/*.js
!packages/gatsby-plugin-mdx/**/*.js
packages/gatsby-plugin-mdx/node_modules/**/*.js
packages/gatsby/cache-dir/commonjs/**/*.js
packages/gatsby-admin/public/styles.*
packages/gatsby/gatsby-admin-public/styles.*

# fixtures
**/__testfixtures__/**
Expand Down
6 changes: 6 additions & 0 deletions .remarkrc.js
Expand Up @@ -4,6 +4,12 @@ const unified = require("unified")
const dictionary = fs.readFileSync("./dictionary.txt")

module.exports = {
options: {
silentlyIgnore: true,
quiet: true,
frail: true,
extensions: ["md"]
},
plugins: [
["remark-frontmatter", "yaml"],
[
Expand Down
6 changes: 3 additions & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -2,9 +2,9 @@
* @gatsbyjs/core

# All docs must be reviewed by the docs team.
/docs/ @gatsbyjs/learning
**/README.md @gatsbyjs/learning
dictionary.txt @gatsbyjs/learning
/docs/ @gatsbyjs/documentation
**/README.md @gatsbyjs/documentation
dictionary.txt @gatsbyjs/documentation

# Benchmarks
/benchmarks/ @duffn @pvdz @smthomas
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
@@ -1,3 +1,3 @@
# Gatsby Contributor Covenant Code of Conduct

Please check out the [Code of Conduct](https://www.gatsbyjs.org/contributing/code-of-conduct/) page on the Gatsby site.
Please check out the [Code of Conduct](https://www.gatsbyjs.com/contributing/code-of-conduct/) page on the Gatsby site.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
@@ -1,3 +1,3 @@
## How to Contribute

For information related to contributing to Gatsby, please check out the [How to Contribute](https://www.gatsbyjs.org/contributing/how-to-contribute/) section of the documentation at the Gatsby site.
For information related to contributing to Gatsby, please check out the [How to Contribute](https://www.gatsbyjs.com/contributing/how-to-contribute/) section of the documentation at the Gatsby site.
38 changes: 19 additions & 19 deletions README.md
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://gatsbyjs.com">
<a href="https://www.gatsbyjs.com">
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
</a>
</p>
Expand Down Expand Up @@ -41,17 +41,17 @@
</p>

<h3 align="center">
<a href="https://gatsbyjs.com/docs/">Quickstart</a>
<a href="https://www.gatsbyjs.com/docs/">Quickstart</a>
<span> · </span>
<a href="https://gatsbyjs.com/tutorial/">Tutorial</a>
<a href="https://www.gatsbyjs.com/tutorial/">Tutorial</a>
<span> · </span>
<a href="https://gatsbyjs.com/plugins/">Plugins</a>
<a href="https://www.gatsbyjs.com/plugins/">Plugins</a>
<span> · </span>
<a href="https://gatsbyjs.com/starters/">Starters</a>
<a href="https://www.gatsbyjs.com/starters/">Starters</a>
<span> · </span>
<a href="https://gatsbyjs.com/showcase/">Showcase</a>
<a href="https://www.gatsbyjs.com/showcase/">Showcase</a>
<span> · </span>
<a href="https://gatsbyjs.com/contributing/how-to-contribute/">Contribute</a>
<a href="https://www.gatsbyjs.com/contributing/how-to-contribute/">Contribute</a>
<span> · </span>
Support: <a href="https://twitter.com/AskGatsbyJS">Twitter</a>
<span> & </span>
Expand Down Expand Up @@ -80,7 +80,7 @@ Gatsby is a modern web framework for blazing fast websites.
site on a CDN for a fraction of the cost of a server-rendered site. Many Gatsby sites can be
hosted entirely free on services like GitHub Pages and Netlify.

[**Learn how to use Gatsby for your next project.**](https://gatsbyjs.com/docs/)
[**Learn how to use Gatsby for your next project.**](https://www.gatsbyjs.com/docs/)

## What’s In This Document

Expand Down Expand Up @@ -124,36 +124,36 @@ You can get a new Gatsby site up and running on your local dev environment in 5

Your site is now running at `http://localhost:8000`. Open the `my-blazing-fast-site` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes, and the browser will update in real time!

At this point, you’ve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our [plugins](https://gatsbyjs.com/plugins/) and [the official tutorial](https://gatsbyjs.com/tutorial/).
At this point, you’ve got a fully functional Gatsby website. For additional information on how you can customize your Gatsby site, see our [plugins](https://gatsbyjs.com/plugins/) and [the official tutorial](https://www.gatsbyjs.com/tutorial/).

## 🎓 Learning Gatsby

Full documentation for Gatsby lives [on the website](https://gatsbyjs.com/).
Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/).

- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://gatsbyjs.com/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.

- **To dive straight into code samples head [to our documentation](https://gatsbyjs.com/docs/).** In particular, check out the “<i>Guides</i>”, “<i>API Reference</i>”, and “<i>Advanced Tutorials</i>” sections in the sidebar.
- **To dive straight into code samples head [to our documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the “<i>Guides</i>”, “<i>API Reference</i>”, and “<i>Advanced Tutorials</i>” sections in the sidebar.

We welcome suggestions for improving our docs. See the [“how to contribute”](https://gatsbyjs.com/contributing/how-to-contribute/) documentation for more details.
We welcome suggestions for improving our docs. See the [“how to contribute”](https://www.gatsbyjs.com/contributing/how-to-contribute/) documentation for more details.

**Start Learning Gatsby: [Follow the Tutorial](https://gatsbyjs.com/tutorial/) · [Read the Docs](https://gatsbyjs.com/docs/)**
**Start Learning Gatsby: [Follow the Tutorial](https://www.gatsbyjs.com/tutorial/) · [Read the Docs](https://www.gatsbyjs.com/docs/)**

## 💼 Migration Guides

Already have a Gatsby site? These handy guides will help you add the improvements of Gatsby v2 to your site without starting from scratch!

- [Migrate a Gatsby site from v1 to v2](https://gatsbyjs.com/docs/migrating-from-v1-to-v2/)
- Still on v0? Start here: [Migrate a Gatsby site from v0 to v1](https://gatsbyjs.com/docs/migrating-from-v0-to-v1/)
- [Migrate a Gatsby site from v1 to v2](https://www.gatsbyjs.com/docs/migrating-from-v1-to-v2/)
- Still on v0? Start here: [Migrate a Gatsby site from v0 to v1](https://www.gatsbyjs.com/docs/migrating-from-v0-to-v1/)

## ❗ Code of Conduct

Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [**Code of Conduct**](https://gatsbyjs.com/contributing/code-of-conduct/). Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜
Gatsby is dedicated to building a welcoming, diverse, safe community. We expect everyone participating in the Gatsby community to abide by our [**Code of Conduct**](https://www.gatsbyjs.com/contributing/code-of-conduct/). Please read it. Please follow it. In the Gatsby community, we work hard to build each other up and create amazing things together. 💪💜

## 🤝 How to Contribute

Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the Gatsby community! :muscle::purple_heart:

Check out our [**Contributing Guide**](https://gatsbyjs.com/contributing/how-to-contribute/) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.
Check out our [**Contributing Guide**](https://www.gatsbyjs.com/contributing/how-to-contribute/) for ideas on contributing and setup steps for getting our repositories up and running on your local machine.

### A note on how this repository is organized

Expand All @@ -169,4 +169,4 @@ Licensed under the [MIT License](./LICENSE).

## 💜 Thanks

Thanks to our many contributors and to [Netlify](https://www.netlify.com/) for hosting [gatsbyjs.com](https://gatsbyjs.com) and our example sites.
Thanks to our many contributors and to [Netlify](https://www.netlify.com/) for hosting [GatsbyJs](https://www.gatsbyjs.com) and our example sites.
72 changes: 72 additions & 0 deletions benchmarks/gabe-csv-markdown/.gitignore
@@ -0,0 +1,72 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

gendata.csv
yarn.lock
File renamed without changes.
@@ -1,10 +1,10 @@
# Markdown Benchmark
# Baseline Gatsby Benchmark: csv + markdown

This is a baseline benchmark for tracking Markdown performance in the Gabe project.
This is a baseline benchmark site in the Gabe project.

The site can generate an arbitrary amount of super simple pages. Each page has a small header, a quote, and two small paragraphs of random text. No images, because we want to benchmark Markdown.
This site in particular tracks Markdown performance when sourcing from a single CSV file.

This uses the local file system plugin, though we might switch to sourcing from csv since that has a more efficient internal representation (fewer `File` nodes).
The site can generate an arbitrary amount of super simple pages. Each page has a small header, a quote, and two small paragraphs of random text. No images, because we want to benchmark Markdown.

## Install

Expand Down
18 changes: 18 additions & 0 deletions benchmarks/gabe-csv-markdown/gatsby-config.js
@@ -0,0 +1,18 @@
module.exports = {
siteMetadata: {
title: `Gatsby CSV Markdown Benchmark for Gabe`,
description: "A blog like no other blog",
author: "Bob the Blogger",
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `blurp`,
path: __dirname + '/gendata.csv',
},
},
`gatsby-transformer-remark`,
`gatsby-transformer-csv`,
],
}
62 changes: 62 additions & 0 deletions benchmarks/gabe-csv-markdown/gatsby-node.js
@@ -0,0 +1,62 @@
const path = require(`path`)

const blogPost = path.resolve(`./src/templates/blog-post.js`)

exports.createPages = async ({ graphql, actions }) => {
const { createPage } = actions

const result = await graphql(`
query {
allMarkdownRemark {
nodes {
id
frontmatter {
slug
title # used in prev/next
}
}
}
}
`)

if (result.errors) {
throw result.errors
}

const posts = result.data.allMarkdownRemark.nodes

posts.forEach(({ id, frontmatter: { slug } }, index) => {
const previous = index === posts.length - 1 ? null : posts[index + 1]
const next = index === 0 ? null : posts[index - 1]

createPage({
path: slug,
component: blogPost,
context: {
id,
slug,
previous,
next,
},
})
})
}

// Not sure if there is a better way than to create a proxy node for markdown to pick up
// I certainly can't get remark to to pick up csv nodes :(
exports.onCreateNode = ({ node, actions }) => {
const { createNode } = actions

if (node.internal.type === `GendataCsv`) {
createNode({
id: `${node.id}-MarkdownProxy`,
parent: node.id,
internal: {
type: `MarkdownProxy`,
mediaType: "text/markdown",
content: node.articleContent,
contentDigest: node.articleContent,
},
})
}
}

0 comments on commit da624c5

Please sign in to comment.