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.78
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.79
Choose a head ref
  • 10 commits
  • 45 files changed
  • 10 contributors

Commits on Oct 15, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1656152 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    239d539 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b27d755 View commit details
  4. chore(gatsby-cli): Categorize errors (#27449)

    * chore(gatsby-cli): Categorize errors
    
    * edit message
    
    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    julienp and wardpeet authored Oct 15, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    85c4adc View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    eb9bac8 View commit details
  6. fix(blog-starter): don't pass data via context - pass identifiers (#2…

    …7359)
    
    * fix(blog-starter): don't pass data via context - pass identifiers
    
    * don't use fragment
    
    * use nodes and not edges
    
    * drop console.log
    pieh authored Oct 15, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6abef2c View commit details
  7. docs(gatsby-plugin-image): Update now we know min gatsby version (#27473

    )
    
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    ascorbic and gatsbybot authored Oct 15, 2020
    Copy the full SHA
    0a1eec4 View commit details
  8. chore(deps): update minor and patch for gatsby-transformer-screenshot (

    …#27157)
    
    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Oct 15, 2020
    Copy the full SHA
    c76ab29 View commit details

Commits on Oct 16, 2020

  1. Copy the full SHA
    a70a66e View commit details
  2. chore(release): Publish

     - gatsby-admin@0.1.167
     - gatsby-cli@2.12.109
     - gatsby-plugin-image@0.0.3
     - gatsby-plugin-mdx@1.2.47
     - gatsby-plugin-netlify@2.3.20
     - gatsby-plugin-offline@3.2.33
     - gatsby-plugin-page-creator@2.3.33
     - gatsby-plugin-utils@0.2.33
     - gatsby-remark-images@3.3.35
     - gatsby-source-contentful@2.3.54
     - gatsby-transformer-remark@2.8.41
     - gatsby-transformer-screenshot@2.3.19
     - gatsby@2.24.79
    LekoArts committed Oct 16, 2020
    Copy the full SHA
    396fb6d View commit details
Showing with 307 additions and 61 deletions.
  1. +5 −0 e2e-tests/README.md
  2. +1 −1 e2e-tests/development-runtime/package.json
  3. +1 −1 e2e-tests/gatsby-static-image/package.json
  4. +1 −1 e2e-tests/production-runtime/package.json
  5. +4 −0 packages/gatsby-admin/CHANGELOG.md
  6. +2 −2 packages/gatsby-admin/package.json
  7. +4 −0 packages/gatsby-cli/CHANGELOG.md
  8. +1 −1 packages/gatsby-cli/package.json
  9. +1 −0 packages/gatsby-cli/src/reporter/__tests__/__snapshots__/index.ts.snap
  10. +1 −1 packages/gatsby-cli/src/reporter/redux/internal-actions.ts
  11. +1 −1 packages/gatsby-cli/src/reporter/redux/types.ts
  12. +43 −2 packages/gatsby-cli/src/structured-errors/error-map.ts
  13. +1 −1 packages/gatsby-cli/src/structured-errors/types.ts
  14. +4 −0 packages/gatsby-plugin-image/CHANGELOG.md
  15. +7 −9 packages/gatsby-plugin-image/README.md
  16. +1 −1 packages/gatsby-plugin-image/package.json
  17. +7 −3 packages/gatsby-plugin-image/src/babel-plugin-parse-static-images.ts
  18. +1 −1 packages/gatsby-plugin-image/src/components/static-image.server.tsx
  19. +4 −0 packages/gatsby-plugin-mdx/CHANGELOG.md
  20. +59 −0 packages/gatsby-plugin-mdx/__tests__/gatsby-node.js
  21. +55 −0 packages/gatsby-plugin-mdx/gatsby-node.js
  22. +2 −1 packages/gatsby-plugin-mdx/package.json
  23. +4 −0 packages/gatsby-plugin-netlify/CHANGELOG.md
  24. +2 −2 packages/gatsby-plugin-netlify/package.json
  25. +4 −0 packages/gatsby-plugin-offline/CHANGELOG.md
  26. +2 −2 packages/gatsby-plugin-offline/package.json
  27. +6 −0 packages/gatsby-plugin-page-creator/CHANGELOG.md
  28. +1 −1 packages/gatsby-plugin-page-creator/package.json
  29. +2 −1 packages/gatsby-plugin-page-creator/src/gatsby-node.ts
  30. +4 −0 packages/gatsby-plugin-utils/CHANGELOG.md
  31. +2 −2 packages/gatsby-plugin-utils/package.json
  32. +4 −0 packages/gatsby-remark-images/CHANGELOG.md
  33. +2 −2 packages/gatsby-remark-images/package.json
  34. +4 −0 packages/gatsby-source-contentful/CHANGELOG.md
  35. +2 −2 packages/gatsby-source-contentful/package.json
  36. +4 −0 packages/gatsby-transformer-remark/CHANGELOG.md
  37. +2 −2 packages/gatsby-transformer-remark/package.json
  38. +4 −0 packages/gatsby-transformer-screenshot/CHANGELOG.md
  39. +2 −2 packages/gatsby-transformer-screenshot/lambda/package.json
  40. +1 −1 packages/gatsby-transformer-screenshot/package.json
  41. +6 −0 packages/gatsby/CHANGELOG.md
  42. +4 −4 packages/gatsby/package.json
  43. +8 −1 packages/gatsby/src/utils/webpack-utils.ts
  44. +7 −9 starters/blog/gatsby-node.js
  45. +24 −4 starters/blog/src/templates/blog-post.js
5 changes: 5 additions & 0 deletions e2e-tests/README.md
Original file line number Diff line number Diff line change
@@ -15,6 +15,11 @@ These are end to end tests triggered via a CI job. You can run these tests local
- OPTIONAL: Use [gatsby-dev-cli][gatsby-dev-cli] to link current changes in packages
- Run the `test` script, e.g. `yarn test` or `npm test`

Alternatively you can do what the CI does:

- From the gatsby root run `./scripts/e2e-test.sh "e2e-tests/gatsby-image" "yarn test"`
- The script uses sudo to install -g gatsby-cli. You won't need to and you can ctrl+c the prompt away

Thanks for contributing to Gatsby! 💜

[gatsby-dev-cli]: https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-dev-cli
2 changes: 1 addition & 1 deletion e2e-tests/development-runtime/package.json
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"author": "Dustin Schau <dustin@gatsbyjs.com>",
"dependencies": {
"gatsby": "^2.4.4",
"gatsby-plugin-image": "^0.0.1",
"gatsby-plugin-image": "^0.0.2",
"gatsby-image": "^2.0.41",
"gatsby-plugin-manifest": "^2.0.17",
"gatsby-plugin-offline": "^2.1.0",
2 changes: 1 addition & 1 deletion e2e-tests/gatsby-static-image/package.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"dependencies": {
"cypress": "^3.1.0",
"gatsby": "^2.0.118",
"gatsby-plugin-image": "^0.0.1",
"gatsby-plugin-image": "^0.0.2",
"gatsby-plugin-sharp": "^2.0.20",
"react": "^16.8.0",
"react-dom": "^16.8.0"
2 changes: 1 addition & 1 deletion e2e-tests/production-runtime/package.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"dependencies": {
"cypress": "3.4.1",
"gatsby": "^2.22.9",
"gatsby-plugin-image": "^0.0.1",
"gatsby-plugin-image": "^0.0.2",
"gatsby-plugin-manifest": "^2.0.17",
"gatsby-plugin-offline": "^3.0.0",
"gatsby-plugin-react-helmet": "^3.0.6",
4 changes: 4 additions & 0 deletions packages/gatsby-admin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

## [0.1.167](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.1.166...gatsby-admin@0.1.167) (2020-10-16)

**Note:** Version bump only for package gatsby-admin

## [0.1.166](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.1.165...gatsby-admin@0.1.166) (2020-10-15)

**Note:** Version bump only for package gatsby-admin
4 changes: 2 additions & 2 deletions packages/gatsby-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-admin",
"version": "0.1.166",
"version": "0.1.167",
"main": "index.js",
"author": "Max Stoiber",
"license": "MIT",
@@ -20,7 +20,7 @@
"@typescript-eslint/parser": "^2.34.0",
"csstype": "^2.6.13",
"formik": "^2.1.5",
"gatsby": "^2.24.78",
"gatsby": "^2.24.79",
"gatsby-interface": "^0.0.193",
"gatsby-plugin-typescript": "^2.4.22",
"gatsby-plugin-webfonts": "^1.1.3",
4 changes: 4 additions & 0 deletions packages/gatsby-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.12.109](https://github.com/gatsbyjs/gatsby/compare/gatsby-cli@2.12.108...gatsby-cli@2.12.109) (2020-10-16)

**Note:** Version bump only for package gatsby-cli

## [2.12.108](https://github.com/gatsbyjs/gatsby/compare/gatsby-cli@2.12.107...gatsby-cli@2.12.108) (2020-10-15)

**Note:** Version bump only for package gatsby-cli
2 changes: 1 addition & 1 deletion packages/gatsby-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-cli",
"description": "Gatsby command-line interface for creating new sites and running Gatsby commands",
"version": "2.12.108",
"version": "2.12.109",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"bin": {
"gatsby": "cli.js"
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ Object {
exports[`report.error handles "structuredError" signature correctly 1`] = `
Object {
"category": "USER",
"code": "95312",
"context": Object {
"ref": "navigator",
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/reporter/redux/internal-actions.ts
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ export const createLog = ({
group?: string
code?: string
type?: string
category?: ErrorCategory
category?: keyof typeof ErrorCategory
filePath?: string
location?: IStructuredError["location"]
docsUrl?: string
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/reporter/redux/types.ts
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ interface ILog {
group: string | undefined
code: string | undefined
type: string | undefined
category?: ErrorCategory
category?: keyof typeof ErrorCategory
filePath: string | undefined
location: IStructuredError["location"] | undefined
docsUrl: string | undefined
45 changes: 43 additions & 2 deletions packages/gatsby-cli/src/structured-errors/error-map.ts
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ const errors = {
`"${context.ref}" is not available during server side rendering.`,
level: Level.ERROR,
docsUrl: `https://gatsby.dev/debug-html`,
category: ErrorCategory.USER,
},
"95313": {
text: (context): string =>
@@ -51,6 +52,7 @@ const errors = {
`${context.stageLabel} failed\n\n${context.sourceMessage}\n\nIf you're trying to use a package make sure that '${context.packageName}' is installed. If you're trying to use a local file make sure that the path is correct.`,
type: Type.WEBPACK,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85901": {
text: (context): string =>
@@ -78,6 +80,7 @@ const errors = {
},
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
// Deprecated
"85909": {
@@ -105,6 +108,7 @@ const errors = {
type: Type.GRAPHQL,
level: Level.ERROR,
docsUrl: `https://www.gatsbyjs.org/docs/graphql/`,
category: ErrorCategory.USER,
},
"85911": {
text: (context): string =>
@@ -117,6 +121,7 @@ const errors = {
`),
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85912": {
text: (context): string =>
@@ -148,6 +153,7 @@ const errors = {
`String interpolation is not allowed in graphql tag:\n\n${context.codeFrame}`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85917": {
text: (context): string =>
@@ -165,6 +171,7 @@ const errors = {
}`),
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
// Duplicate fragment
"85919": {
@@ -180,6 +187,7 @@ const errors = {
`),
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
// Undefined variables in Queries
"85920": {
@@ -206,24 +214,37 @@ const errors = {
},
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85921": {
text: (context): string =>
`There was an error in your GraphQL query:\n\n${context.sourceMessage}\n\nIf you're e.g. filtering for specific nodes make sure that you choose the correct field (that has the same type "${context.inputType}") or adjust the context variable to the type "${context.expectedType}".`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85922": {
text: (context): string =>
`There was an error in your GraphQL query:\n\n${context.sourceMessage}\n\nThis can happen if you e.g. accidentally added { } to the field "${context.fieldName}". If you didn't expect "${context.fieldName}" to be of type "${context.fieldType}" make sure that your input source and/or plugin is correct.`,
`There was an error in your GraphQL query:
${context.sourceMessage}
This can happen if you e.g. accidentally added { } to the field "${context.fieldName}". If you didn't expect "${context.fieldName}" to be of type "${context.fieldType}" make sure that your input source and/or plugin is correct.
However, if you expect "value" to exist, the field might be accessible in another subfield. Please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have.
It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned
"dummy content". Visit our docs to learn how you can define the schema for "${context.type}":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85923": {
text: (context): string =>
`There was an error in your GraphQL query:\n\n${context.sourceMessage}\n\nIf you don't expect "${context.field}" to exist on the type "${context.type}" it is most likely a typo.\nHowever, if you expect "${context.field}" to exist there are a couple of solutions to common problems:\n\n- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server\n- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have\n- You want to optionally use your field "${context.field}" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add at least one entry with that field ("dummy content")\n\nIt is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "${context.type}":\nhttps://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85924": {
text: (context): string =>
@@ -236,6 +257,7 @@ const errors = {
}".${optionalGraphQLInfo(context)}`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85925": {
text: (context): string =>
@@ -248,43 +270,50 @@ const errors = {
)}`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85926": {
text: (context): string =>
`There was an error in your GraphQL query:\n\n${context.sourceMessage}\n\nThis can happen when you used graphql\`{ ...yourQuery }\` instead of graphql(\`{ ...yourQuery }\`) inside gatsby-node.js\n\nYou can't use the template literal function you're used to (from page queries) and rather have to call graphql() as a normal function.`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"85927": {
text: (context): string =>
`There was an error in your GraphQL query:\n\n${context.sourceMessage}\n\nSee if ${context.variable} has a typo or ${context.operation} doesn't actually require this variable.`,
type: Type.GRAPHQL,
level: Level.ERROR,
category: ErrorCategory.USER,
},
// Config errors
"10122": {
text: (context): string =>
`The site's gatsby-config.js failed validation:\n\n${context.sourceMessage}`,
type: Type.CONFIG,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"10123": {
text: (context): string =>
`We encountered an error while trying to load your site's ${context.configName}. Please fix the error and try again.`,
type: Type.CONFIG,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"10124": {
text: (context): string =>
`It looks like you were trying to add the config file? Please rename "${context.nearMatch}" to "${context.configName}.js"`,
type: Type.CONFIG,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"10125": {
text: (context): string =>
`Your ${context.configName} file is in the wrong place. You've placed it in the src/ directory. It must instead be at the root of your site next to your package.json file.`,
type: Type.CONFIG,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"10126": {
text: (context): string =>
@@ -295,6 +324,7 @@ const errors = {
`\nare not supported in the root gatsby-config.`,
type: Type.CONFIG,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"10226": {
text: (context): string =>
@@ -332,6 +362,7 @@ const errors = {
4
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"11323": {
text: (context): string =>
@@ -343,6 +374,7 @@ const errors = {
4
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"11324": {
text: (context): string =>
@@ -361,6 +393,7 @@ const errors = {
4
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"11326": {
text: (context): string =>
@@ -376,16 +409,19 @@ const errors = {
4
)}\n\nSee the documentation for the "createPage" action — https://www.gatsbyjs.org/docs/actions/#createPage`,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"11327": {
text: (context): string =>
`You have an empty file in the "src/pages" directory at "${context.relativePath}". Please remove it or make it a valid component`,
level: Level.ERROR,
category: ErrorCategory.USER,
},
"11328": {
text: (context): string =>
`A page component must export a React component for it to be valid. Please make sure this file exports a React component:\n\n${context.fileName}`,
level: Level.ERROR,
category: ErrorCategory.USER,
},
// invalid or deprecated APIs
"11329": {
@@ -425,6 +461,7 @@ const errors = {
} here: https://www.gatsbyjs.org/docs/node-apis/#${context.api}`,
type: Type.PLUGIN,
level: Level.ERROR,
category: ErrorCategory.USER,
},
// Invalid plugin options
"11331": {
@@ -464,6 +501,7 @@ const errors = {
`for custom ssl --https, --cert-file, and --key-file must be used together`,
level: Level.ERROR,
docsUrl: `https://www.gatsbyjs.org/docs/local-https/#custom-key-and-certificate-files`,
category: ErrorCategory.USER,
},
"11522": {
text: (): string => `Failed to generate dev SSL certificate`,
@@ -476,18 +514,21 @@ const errors = {
`It looks like you gave wrong argument orders . Try running instead "gatsby new ${context.starter} ${context.rootPath}"`,
level: Level.ERROR,
docsUrl: `https://www.gatsbyjs.org/docs/gatsby-cli/#new`,
category: ErrorCategory.USER,
},
"11611": {
text: (context): string =>
`It looks like you passed a URL to your project name. Try running instead "gatsby new new-gatsby-project ${context.rootPath}"`,
level: Level.ERROR,
docsUrl: `https://www.gatsbyjs.org/docs/gatsby-cli/#new`,
category: ErrorCategory.USER,
},
"11612": {
text: (context): string =>
`Could not create a project in "${context.path}" because it's not a valid path`,
level: Level.ERROR,
docsUrl: `https://www.gatsbyjs.org/docs/gatsby-cli/#new`,
category: ErrorCategory.USER,
},
"11613": {
text: (context): string =>
@@ -508,6 +549,6 @@ export interface IErrorMapEntry {
// keyof typeof is used for these enums so that the public facing API (e.g. used by setErrorMap) doesn't rely on enum but gives an union
level: keyof typeof Level
type?: keyof typeof Type
category?: ErrorCategory
category?: keyof typeof ErrorCategory
docsUrl?: string
}
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/structured-errors/types.ts
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ export interface IStructuredError {
start: ILocationPosition
end?: ILocationPosition
}
category?: ErrorCategory
category?: keyof typeof ErrorCategory
error?: Error
group?: string
level: IErrorMapEntry["level"]
4 changes: 4 additions & 0 deletions packages/gatsby-plugin-image/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

## [0.0.3](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-image@0.0.2...gatsby-plugin-image@0.0.3) (2020-10-16)

**Note:** Version bump only for package gatsby-plugin-image

## 0.0.2 (2020-10-15)

**Note:** Version bump only for package gatsby-plugin-image
Loading