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.43
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.44
Choose a head ref
  • 6 commits
  • 30 files changed
  • 11 contributors

Commits on Aug 11, 2020

  1. chore(docs): detailed info on licensing starters (#26347)

    * docs: detailed info on licensing starters
    
    * fix: spelling
    
    * fix link
    
    * Update docs/docs/creating-a-starter.md
    
    Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
    
    * Update docs/docs/creating-a-starter.md
    
    Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
    
    Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
    moonmeister and Aisha Blake authored Aug 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    94a3f9d View commit details
  2. Fix typos and linter dictionary errors (#26371)

    * Fix typos and linter dictionary errors
    
    * fix MongoDB
    
    * Remove duplicate paragraph
    
    * Leave the URLs be
    
    Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
    Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
    3 people authored Aug 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fd2194f View commit details
  3. chore(gatsby): Convert jobs-manager to typescript (#22189)

    * chore(gatsby) convert jobs-manager to typescript
    
    * chore(gatsby) revert jobs-manager tests to js
    
    * chore(gatsby) fix formatting for jobs-manager
    
    * chore(gatsby) move imports for jobs-manager after imports
    
    * Chore(gatsby) check contentDigest of job when checking internalJob
    
    * Chore(gatsby) declare WorkerError before usage
    
    * chore: format
    
    * Fix types
    
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    Co-authored-by: Peter van der Zee <github-public@qfox.nl>
    3 people authored Aug 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f59fb37 View commit details
  4. Stripe eCommerce tutorial prices migration (#25504)

    * Migrate example to Prices.
    
    * Update Stripe eCommerce tutorial to use Prices.
    
    * Fix linting.
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Fix button color and outline.
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Update docs/tutorial/ecommerce-tutorial/index.md
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    
    * Fieldset and select label.
    
    * Document getStripe utility function.
    
    * remove outline: none from example
    
    Co-authored-by: Marcy Sutton <marcy@gatsbyjs.com>
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
    4 people authored Aug 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bfe9ce5 View commit details

Commits on Aug 12, 2020

  1. fix(structured-logging): fix wrongly reporting status as success when…

    … we should still be in pending state (#26380)
    pieh authored Aug 12, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d74ea66 View commit details
  2. chore(release): Publish

     - gatsby-admin@0.1.133
     - gatsby-cli@2.12.84
     - gatsby@2.24.44
    sidharthachatterjee committed Aug 12, 2020
    Copy the full SHA
    baa0d6c View commit details
Showing with 918 additions and 436 deletions.
  1. +9 −2 dictionary.txt
  2. +8 −2 docs/docs/creating-a-starter.md
  3. +4 −6 docs/docs/query-filters.md
  4. +210 −92 docs/tutorial/ecommerce-tutorial/index.md
  5. +5 −0 examples/ecommerce-tutorial-with-stripe/.env.example
  6. +73 −0 examples/ecommerce-tutorial-with-stripe/.gitignore
  7. +1 −1 examples/ecommerce-tutorial-with-stripe/README.md
  8. +1 −1 examples/ecommerce-tutorial-with-stripe/gatsby-config.js
  9. +1 −1 examples/ecommerce-tutorial-with-stripe/netlify.toml
  10. +2 −2 examples/ecommerce-tutorial-with-stripe/package.json
  11. +98 −0 examples/ecommerce-tutorial-with-stripe/src/components/Products/ProductCard.js
  12. +61 −0 examples/ecommerce-tutorial-with-stripe/src/components/Products/Products.js
  13. +0 −66 examples/ecommerce-tutorial-with-stripe/src/components/Products/SkuCard.js
  14. +0 −46 examples/ecommerce-tutorial-with-stripe/src/components/Products/Skus.js
  15. +32 −18 examples/ecommerce-tutorial-with-stripe/src/components/checkout.js
  16. +5 −2 examples/ecommerce-tutorial-with-stripe/src/components/layout.js
  17. +2 −2 examples/ecommerce-tutorial-with-stripe/src/pages/advanced.js
  18. +14 −0 examples/ecommerce-tutorial-with-stripe/src/utils/stripejs.js
  19. +4 −0 packages/gatsby-admin/CHANGELOG.md
  20. +2 −2 packages/gatsby-admin/package.json
  21. +6 −0 packages/gatsby-cli/CHANGELOG.md
  22. +1 −1 packages/gatsby-cli/package.json
  23. +71 −0 packages/gatsby-cli/src/reporter/redux/__tests__/integration.ts
  24. +113 −0 packages/gatsby-cli/src/reporter/redux/__tests__/internal-actions.ts
  25. +1 −1 packages/gatsby-cli/src/reporter/redux/index.ts
  26. +52 −55 packages/gatsby-cli/src/reporter/redux/internal-actions.ts
  27. +4 −0 packages/gatsby/CHANGELOG.md
  28. +2 −2 packages/gatsby/package.json
  29. +4 −4 packages/gatsby/src/redux/types.ts
  30. +132 −130 packages/gatsby/src/utils/{jobs-manager.js → jobs-manager.ts}
11 changes: 9 additions & 2 deletions dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0BSD
½
1000px
@@ -243,6 +244,7 @@ bois
Bolda
Bölüm
bool
booleans
bootcamp
bootcamps
bootstrapable
@@ -387,6 +389,9 @@ Commento
Commentors
CommonJS
CommonMark
comparator
Comparator
comparators
compile-to-js
componentChunkName
componentChunkNames
@@ -428,8 +433,8 @@ Costa
Costea
Coughlan
counterintuitive
COVID-19
COVID
COVID-19
cowpaths
Coyier
CPG
@@ -664,6 +669,7 @@ filesystem-based
filesystem-explorer-options
filesystem-query
Fillerama
filterValue
FindCollabs
findDirtyIds
findIdsWithoutDataDependencies
@@ -1253,6 +1259,7 @@ METROGLAM
Meuleman
Michał
Microfrontends
micromatch
microservices
microsites
middleware
@@ -1331,11 +1338,11 @@ Nicky
Nie
Nik
no-brainer
Node.js
nodeId
nodeID
NodeID
nodemailer
Node.js
NodeSchool
nodesPromise
Nolen
10 changes: 8 additions & 2 deletions docs/docs/creating-a-starter.md
Original file line number Diff line number Diff line change
@@ -15,17 +15,19 @@ For a starter to work properly, it needs to include some files (see the [Hello W
- `static`: a directory for static assets, such as a `favicon.ico` file.
- `.gitignore`: a file telling Git which resources to leave out of source control, such as the `node_modules` directory, log files, Gatsby `.cache` and `public` directories.
- `.prettierrc` _(optional)_: a configuration file for [Prettier](https://prettier.io/), a JavaScript linter and formatter used for Gatsby development.
- `LICENSE`: a file containing an [appropriate open source license](#open-source-license), preferably with a [BSD Zero Clause License](https://choosealicense.com/licenses/0bsd/).

Your starter should also have these qualities:

- Open source and available from a stable URL
- Available from a stable URL
- Open source license
- Configurable
- Fast
- Web accessible

Let's expand upon these items to prepare you for creating a winning starter.

## Open source and available from a stable URL
## Available from a stable URL

The Gatsby CLI allows users to install a new site with a starter using the command `gatsby new <site-name> <starter-url>`. For this to work, your starter needs to be available to download. The easiest way to accomplish this is to host your starter on GitHub or GitLab and use the publicly available repo URL, such as:

@@ -35,6 +37,10 @@ Although the official starters live in the Gatsby repo, community members can of

`gatsby new my-app https://github.com/netlify-templates/gatsby-starter-netlify-cms`

## Open source license

Gatsby recommends all starters use the [BSD Zero Clause License](https://choosealicense.com/licenses/0bsd/)(0BSD). While the [MIT License](https://choosealicense.com/licenses/mit/) is more common (and was used in Gatsby official starters [for a long time](https://github.com/gatsbyjs/gatsby/pull/25441)), MIT's "License and copyright notice" condition make it a bad fit for starters. Starters, by design, are for people to customize and use for their own sites (open and closed source). The 0BSD has no "License and copyright notice" condition. This allows folks to use and customize the starter without reference to the original license or source. This is how most creators expect starters to be treated and how developers expect to use starters, despite many having the MIT license. Using 0BSD represents better alignment between expectations and licensing.

## Configurable

Starters should utilize metadata in `gatsby-config.js` wherever possible, as this is typically the first place users will look for site configuration information. Some examples of things you could make configurable in `gatsby-config` include:
10 changes: 4 additions & 6 deletions docs/docs/query-filters.md
Original file line number Diff line number Diff line change
@@ -6,15 +6,13 @@ title: Query Filters with GraphQL in Gatsby
## Summary

Gatsby stores all data loaded during the source-nodes phase in Redux and it allows you to write GraphQL queries to query that data. This data, stored as individual "nodes", can be searched through using a query language that is inspired by [MongoDb queries](https://docs.mongodb.com/manual/reference/operator/query/).
Gatsby stores all data loaded during the source-nodes phase in Redux and it allows you to write GraphQL queries to query that data. This data, stored as individual "nodes", can be searched through using a query language that is inspired by [MongoDB queries](https://docs.mongodb.com/manual/reference/operator/query/).

Filtering is used in GraphQL root fields of Node types (e.g. for File type it would be `file` and `allFile`). `filter` GraphQL argument is passed to the filtering system and will return all the nodes that match each of the given filters. The resto of the processing, such as pagination, is handled on GraphQL resolver level.

Filtering is used in GraphQL root fields of Node types (e.g. for File type it would be `file` and `allFile`). The GraphQL `filter` argument is passed to the filtering system and will return all the nodes that match each of the given filters. The rest of the processing, such as pagination, is handled on GraphQL resolver level.
Filtering is used in GraphQL root fields of Node types (e.g. for File type it would be `file` and `allFile`). The GraphQL `filter` argument is passed to the filtering system and will return all the nodes that match each of the given filters. The rest of the processing, such as pagination, is handled on the GraphQL resolver level.

### History and Sift

For a long time Gatsby used the [sift.js](https://github.com/crcn/sift.js) library through which you can use [MongoDb queries](https://docs.mongodb.com/manual/reference/operator/query/) in JavaScript.
For a long time Gatsby used the [sift.js](https://github.com/crcn/sift.js) library through which you can use [MongoDB queries](https://docs.mongodb.com/manual/reference/operator/query/) in JavaScript.

Unfortunately Sift did not align with how Gatsby used it and so a custom system was written to slowly replace it. This system was called "fast filters" and as of gatsby@2.23.0 (June 2020) the Sift library is no longer used.

@@ -137,7 +135,7 @@ Specific rules:
- Glob pattern is converted to a JavaScript RegExp with [micromatch](https://github.com/micromatch/micromatch)
- The `regex` filterValue must be a stringified regular expression, including leading and trailing forward slash and optional flags; Like `"/foo/g"`
- Never returns nodes with partial paths
- While testing, result values are explicitly casted to a string through `String(resultValue)` before passing it to `regex.test()`
- While testing, result values are explicitly cast to a string through `String(resultValue)` before passing it to `regex.test()`
### Nulls and partial paths
Loading