Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: gatsby@2.24.63
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gatsby@2.24.64
Choose a head ref

Commits on Sep 18, 2020

  1. Copy the full SHA
    55052ef View commit details
  2. Fix gatsby-plugin-manifest using withAssetPrefix in manifest file lin…

    …k, where it gets improperly sanitized (#26844)
    
    * Do not use withAssetPrefix on manifest href
    
    Since Gatsby core removes the `assetPrefix` from `<link>` elements' `href` if their `rel` is set to `manifest`, we shouldn't try to add it here.
    
    * use withPrefix in client-side manifest link localization
    
    * improved manifest plugin tests to consider assetPrefix correctly
    nonAlgebraic authored Sep 18, 2020
    Copy the full SHA
    8325026 View commit details
  3. Copy the full SHA
    694fe16 View commit details
  4. Copy the full SHA
    d58a65b View commit details
  5. Copy the full SHA
    4c89787 View commit details
  6. Copy the full SHA
    cd93374 View commit details
  7. Copy the full SHA
    390ae17 View commit details
  8. feat(gatsby-cli): enable set packagemanager (#26856)

    * Address configuration issues related to package manager selection
    
    * fix linting
    
    * use the right cli
    
    * clean up yargs
    
    * change console log
    
    * missing comma
    
    * find the eslint bug
    
    * think it was this
    
    * add everything back
    
    * change logic a bit, shouldn't also set telemetry
    
    * add whitespace
    
    * ignore TS error for the moment to validate the logic
    
    * switch order of validate script commands
    
    * Update packages/gatsby-cli/src/init-starter.ts
    
    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    
    * use pathExists
    
    * use pathExists
    
    * We want to keep the lock files
    
    * set package manager to yarn for gatsby new tests
    
    * fix tests and remove yarn.lock from official starters
    
    * might be a typescript issue
    
    * use positional arguments instead
    
    * adjust tests
    
    * fix plugin command top level error
    
    * run in gatsby project
    
    * make it a one off test like feedback
    
    * update links to .com and rename as options
    
    * remove unused prompt code
    
    * Allow for package-manager as key
    
    * decouple publish starters script from CLI version by keeping yarn import
    
    * Update scripts/publish-starters.sh
    
    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    
    Co-authored-by: Laurie Barth <laurie@lauriesrklaptop.lan>
    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    5 people authored Sep 18, 2020
    Copy the full SHA
    5658b87 View commit details

Commits on Sep 21, 2020

  1. chore: write graphql schema, fragments and config file to cache (#26829)

    * chore: write graphql schema, fragments and config file to cache
    
    To provide graphql config baseline support for:
    - vscode-graphql
    - graphql-codegen
    - graphiql 2 (upcoming)
    
    - `fragments.graphql` is generated from plugins/core so implicit fragment support works across all config-consuming tooling
    - `schema.graphql` is written to file to make tooling faster, and to ensure tooling works without `develop` process running
    - `graphql.config.json` is written to the `.cache` directory, as `endpoints` config used by `vscode-graphql` for executing queries needs to know the current port.
    
    each of the tools above can be configured to load `.cache/graphql.config.json` instead of from the root directory
    this could not be achieved with a plugin, because the existing plugin interfaces don't provide a complete enough schema, or a collation of fragments.
    
    * migrate to redux store and plugins
    
    * consolidate to a single plugin, use store emitter
    
    * chore: address review comments
    
    * chore: gitignore index.js
    acao authored Sep 21, 2020
    Copy the full SHA
    8ad565f View commit details
  2. Copy the full SHA
    866abdf View commit details
  3. Copy the full SHA
    ece4a6e View commit details
  4. fix(gatsby-plugin-graphql-config): add dependencies (#26970)

    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    wardpeet and gatsbybot authored Sep 21, 2020
    Copy the full SHA
    5c5c045 View commit details
  5. fix(gatsby-remark-copy-linked-files): respect assetPrefix (#26976)

    * test(gatsby-remarkc-copy-linked-files): get rid of "undefined" in assertions - it doesn't inspire confidence
    
    * fix(gatsby-remark-copy-linked-files): honor assetPrefix correctly
    
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    pieh and gatsbybot authored Sep 21, 2020
    Copy the full SHA
    6270c3d View commit details
  6. Fix typegen issue (#26950)

    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    ascorbic and gatsbybot authored Sep 21, 2020
    Copy the full SHA
    e4980d6 View commit details

Commits on Sep 22, 2020

  1. chore: Add starters to README (#26943)

    Co-authored-by: Roshan Jossy <rjossy@goodgamestudios.com>
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    Co-authored-by: Lennart <lekoarts@gmail.com>
    4 people authored Sep 22, 2020
    Copy the full SHA
    ffdf820 View commit details
  2. Copy the full SHA
    1b40112 View commit details
  3. Copy the full SHA
    2e970c6 View commit details
  4. fix: update starters and examples (#26973)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 22, 2020
    Copy the full SHA
    1a7a446 View commit details
  5. Copy the full SHA
    a8ce6e6 View commit details
  6. update gatsby-interface dependency (#26689)

    * update gatsby-interface dependency
    
    This removes the reliance on a version of gatsby-interface that had
    overly strict pinned versions in its peerDependencies set.
    
    Enables the fixes in
    https://github.com/gatsby-inc/gatsby-interface/pull/341 and
    https://github.com/gatsby-inc/gatsby-interface/pull/337 to be included
    in the actual Gatsby dependency tree that gets installed.
    
    Fix: #26688
    
    * Add missing comma
    
    Oops, messed that up in the merge!
    
    * Unpin gatsby-interface dependency
    
    Co-authored-by: Max Stoiber <contact@mxstbr.com>
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    3 people authored Sep 22, 2020
    Copy the full SHA
    a344a12 View commit details
  7. chore(docs): rename the Github learning team (#26673)

    * Rename the Github learning team
    
    - Update team name in CODEOWNERS
    - Update team name references in docs
    
    [ch11559]
    
    * Update team name within PR template [ch11559]
    
    * Rename team in PR management
    
    [ch11559]
    
    * Remove deprecated doc project & website team
    
    * Remove mention of Learning GitHub project
    
    * Remove mention of Learning GitHub project
    
    Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
    Janson Hartliep and Aisha Blake authored Sep 22, 2020
    Copy the full SHA
    510370d View commit details

Commits on Sep 23, 2020

  1. 1
    Copy the full SHA
    1b87ef6 View commit details
  2. Copy the full SHA
    699c526 View commit details
  3. chore(release): Publish

     - gatsby-admin@0.1.153
     - gatsby-cli@2.12.100
     - gatsby-plugin-graphql-config@0.0.1
     - gatsby-plugin-manifest@2.4.31
     - gatsby-recipes@0.2.28
     - gatsby-remark-copy-linked-files@2.3.16
     - gatsby-source-contentful@2.3.47
     - gatsby@2.24.64
    wardpeet committed Sep 23, 2020
    Copy the full SHA
    cb5c3d1 View commit details
Showing 409 changed files with 6,360 additions and 2,000 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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.
-->

@@ -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
6 changes: 3 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
71 changes: 71 additions & 0 deletions benchmarks/gabe-csv-markdown/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions benchmarks/gabe-csv-markdown/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// empty.
18 changes: 18 additions & 0 deletions benchmarks/gabe-csv-markdown/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -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`,
],
}
65 changes: 65 additions & 0 deletions benchmarks/gabe-csv-markdown/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const path = require(`path`)
const { createFilePath } = require(`gatsby-source-filesystem`)

exports.createPages = async ({ graphql, actions }) => {
const { createPage } = actions
const blogPost = path.resolve(`./src/templates/blog-post.js`)

const result = await graphql(
`
{
allMarkdownRemark(sort: null) {
edges {
node {
id
frontmatter {
slug
title
}
}
}
}
}
`
)

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

// Create blog posts pages.
const posts = result.data.allMarkdownRemark.edges

posts.forEach((post, index) => {
const previous = index === posts.length - 1 ? null : posts[index + 1].node
const next = index === 0 ? null : posts[index - 1].node

createPage({
path: post.node.frontmatter.slug,
component: blogPost,
context: {
slug: post.node.frontmatter.slug,
id: post.node.id,
previous,
next,
},
})
})
}

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: String(Math.random()),
},
})
}
}
60 changes: 60 additions & 0 deletions benchmarks/gabe-csv-markdown/gen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
const fs = require("fs")
const path = require("path")
const faker = require(`faker`)

console.log("Start of gen")

const N = parseInt(process.env.N, 10) || 100
const FILE = path.resolve("gendata.csv")

// We may want to tweak this a little but for this purpose we have a CSV with one column; the full page contents
// We then hand that off to markdown

console.log("Now generating " + N + " articles into", FILE)
fs.writeFileSync(FILE, "articleContent,a,b,c\n")

function createArticle(n) {
const title = faker.lorem.sentence()
const desc = faker.lorem.sentence()
const slug = faker.helpers.slugify(title).toLowerCase()
const date = faker.date.recent(1000).toISOString().slice(0, 10)
const tags = faker.random
.words(3)
.split(` `)
.map(w => `"${w}"`)
.join(`, `)

const pageContent = `---
articleNumber: ${n}
title: "${title.replace(/"/g, '\\"')}"
description: "${desc.replace(/"/g, '\\"')}"
slug: '${slug}'
date: ${date}
tags: [${tags}]
---
# ${title}
> ${desc}
${faker.lorem.paragraphs(2)}
`

// Note: you can only escape double quotes (by doubling them, not by backslash)
// any other content needs to be wrapped in double quotes and is consumed as-is (including newlines and commas)
fs.appendFileSync(
FILE,

'"' + pageContent
.trim()
.replace(/"/g, '""')
+ '",1,2,3' +
"\n" // markdown does care about newlines
)
}

for (let i = 0; i < N; ++i) {
createArticle(i)
}

console.log("Finished generating " + N + " articles into", FILE)
console.log("End of gen")
39 changes: 39 additions & 0 deletions benchmarks/gabe-csv-markdown/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "gabe-csv-markdown",
"private": true,
"description": "Benchmark site for testing baseline markdown perf when sourcing all pages through one CSV file",
"author": "Peter van der Zee <pvdz@github>",
"version": "0.1.0",
"license": "MIT",
"scripts": {
"bench": "rm -rf gendata.csv; gatsby clean; N=${N:-512} node gen.js; CI=1 node --max_old_space_size=${M:-2}000 node_modules/.bin/gatsby build",
"build": "gatsby build",
"clean": "gatsby clean",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\""
},
"devDependencies": {
"prettier": "2.0.4"
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby/tree/master/benchmarks/"
},
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
},
"keywords": [
"gatsby",
"benchmark",
"markdown"
],
"dependencies": {
"faker": "^4.1.0",
"gatsby": "^2",
"gatsby-source-filesystem": "^2",
"gatsby-transformer-csv": "^2",
"gatsby-transformer-remark": "^2",
"react": "^16.12.0",
"react-dom": "^16.12.0"
}
}
File renamed without changes.
70 changes: 70 additions & 0 deletions benchmarks/gabe-csv-markdown/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React from "react"
import { Link, graphql } from "gatsby"

import Bio from "../components/bio"
import Layout from "../components/layout"

class BlogIndex extends React.Component {
render() {
const { data } = this.props
const siteTitle = data.site.siteMetadata.title
const posts = data.allMarkdownRemark.edges

return (
<Layout location={this.props.location} title={siteTitle}>
<Bio />
{posts.map(({ node }) => {
const title = node.frontmatter.title || node.frontmatter.slug
return (
<article key={node.frontmatter.slug}>
<header>
<h3
style={{
marginBottom: '5px',
}}
>
<Link style={{ boxShadow: `none` }} to={'/' + node.frontmatter.slug}>
{title}
</Link>
</h3>
<small>{node.frontmatter.date}</small>
</header>
<section>
<p
dangerouslySetInnerHTML={{
__html: node.frontmatter.description || node.excerpt,
}}
/>
</section>
</article>
)
})}
</Layout>
)
}
}

export default BlogIndex

export const pageQuery = graphql`
query {
site {
siteMetadata {
title
}
}
allMarkdownRemark(limit: 100) {
edges {
node {
excerpt
frontmatter {
slug
date(formatString: "MMMM DD, YYYY")
title
description
}
}
}
}
}
`
Loading