Skip to content

Commit

Permalink
Merge branch 'master' into feature/gatsbyjs#6659
Browse files Browse the repository at this point in the history
* master: (870 commits)
  fix(graphql-skip-limit): declare `graphql` peer dependency (gatsbyjs#10305)
  fix(gatsby-plugin-offline): gracefully degrade if appshell isn't precached (gatsbyjs#10329)
  Service workers note (gatsbyjs#10276)
  fix(docs): link fixes, podcast addition (gatsbyjs#10332)
  feat(docs): Create clearer pathways in docs (gatsbyjs#9898)
  feat(www): Rename community section to creators (gatsbyjs#10312)
  docs(graphql-reference): clarify filtering using comma/and operator (gatsbyjs#10321)
  chore(release): Publish
  feat(gatsby-plugin-sass): Support Dart SASS (gatsbyjs#10159)
  fix(gatsby-source-drupal): use basic auth credentials to fetch remote files as well. (gatsbyjs#10302)
  fix(gatsby-source-filesystem): allow empty password for basic auth in createRemoteFileNode (gatsbyjs#10280)
  docs(gatsby-remark-prismjs): Use Gatsby V2 project structure (gatsbyjs#10059)
  chore: update link for react-gatsby-firebase-authentication (gatsbyjs#10314)
  fix(www): Awesome Gatsby sidebar link (gatsbyjs#10313)
  Add thijs koerselman to creators list (gatsbyjs#10303)
  chore(release): Publish
  fix(gatsby-plugin-emotion): allow for React.Fragment shorthand syntax (gatsbyjs#10291)
  feat(www): Update starter cards (gatsbyjs#10258)
  Update index.md (gatsbyjs#10307)
  Update index.md (gatsbyjs#10306)
  ...
  • Loading branch information
m-allanson committed Dec 7, 2018
2 parents 61af17c + b62159a commit bfd81d3
Show file tree
Hide file tree
Showing 1,387 changed files with 41,740 additions and 15,225 deletions.
4 changes: 1 addition & 3 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ if (process.env.NODE_ENV !== `test`) {
ignore.push(`**/__tests__`)
}

const presetAbsPath = require(`path`).join(__dirname, '.babel-preset.js')

module.exports = {
sourceMaps: true,
presets: [presetAbsPath],
presets: ["babel-preset-gatsby-package"],
ignore,
}
164 changes: 91 additions & 73 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
aliases:
node6: &node6
docker:
- image: circleci/node:6

node8: &node8
docker:
- image: circleci/node:8

node10: &node10
executors:
node:
parameters:
image:
type: string
default: "10"
docker:
- image: circleci/node:10
- image: circleci/node:<< parameters.image >>

node10_browsers: &node10_browsers
aliases:
e2e-executor: &e2e-executor
docker:
- image: circleci/node:10-browsers
- image: cypress/browsers:chrome69

restore_node_modules: &restore_node_modules
restore_cache: &restore_cache
restore_cache:
name: Restore node_modules cache
keys:
- node-modules-{{ checksum "yarn.lock" }}
- yarn-cypress-cache-{{ checksum "yarn.lock" }}

install_node_modules: &install_node_modules
run:
name: Install node modules
command: |
yarn
command: yarn --frozen-lockfile

persist_node_modules: &persist_node_modules
persist_cache: &persist_cache
save_cache:
name: Save node modules cache
key: node-modules-{{ checksum "yarn.lock" }}
key: yarn-cypress-cache-{{ checksum "yarn.lock" }}
paths:
- node_modules
- ~/.cache

attach_to_bootstrap: &attach_to_bootstrap
attach_workspace:
Expand All @@ -44,108 +40,126 @@ aliases:
ignore:
- master

ignore_docs: &ignore_docs
filters:
branches:
ignore:
- /docs.+/
- /blog.+/

test_template: &test_template
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*"
- <<: *restore_node_modules
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_node_modules
- <<: *persist_cache
- <<: *attach_to_bootstrap
- run: yarn jest -w 1

integration_test_workflow: &integration_test_workflow
<<: *ignore_master
e2e-test-workflow: &e2e-test-workflow
filters:
branches:
ignore:
- master
- /docs.+/
- /blog.+/
requires:
- bootstrap

version: 2
commands:
e2e-test:
parameters:
trigger_pattern:
type: string
default: "packages/*|.circleci/*"
test_path:
type: string
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "<< parameters.trigger_pattern >>|<< parameters.test_path >>/*"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_cache
- <<: *attach_to_bootstrap
- run: ./scripts/e2e-test.sh "<< parameters.test_path >>"

version: 2.1

jobs:
bootstrap:
<<: *node10
executor: node
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*"
- <<: *restore_node_modules
- run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_node_modules
- <<: *persist_cache
- run: yarn bootstrap
- persist_to_workspace:
root: packages
paths:
- "*"

lint:
<<: *node10
executor: node
steps:
- checkout
- <<: *restore_node_modules
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_node_modules
- <<: *persist_cache
- run: yarn lint

unit_tests_node6:
<<: *node6
executor:
name: node
image: "6"
<<: *test_template

unit_tests_node8:
<<: *node8
executor:
name: node
image: "8"
<<: *test_template

unit_tests_node10:
<<: *node10
executor: node
<<: *test_template

integration_tests:
<<: *node10
executor: node
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*"
- <<: *restore_node_modules
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*|.circleci/*"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_node_modules
- <<: *persist_cache
- <<: *attach_to_bootstrap
- run: yarn test:integration

e2e_tests_gatsbygram:
<<: *node10_browsers
<<: *e2e-executor
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*|examples/gatsbygram/*"
- <<: *restore_node_modules
- <<: *install_node_modules
- <<: *attach_to_bootstrap
- run: ./scripts/integration-test.sh examples/gatsbygram
- e2e-test:
test_path: examples/gatsbygram

e2e_tests_path-prefix:
<<: *node10_browsers
<<: *e2e-executor
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*"
- <<: *restore_node_modules
- <<: *install_node_modules
- <<: *attach_to_bootstrap
- run: ./scripts/integration-test.sh integration-tests/path-prefix
- e2e-test:
test_path: e2e-tests/path-prefix

e2e_tests_gatsby-image:
<<: *node10_browsers
<<: *e2e-executor
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*"
- <<: *restore_node_modules
- <<: *install_node_modules
- <<: *attach_to_bootstrap
- run: ./scripts/integration-test.sh integration-tests/gatsby-image
- e2e-test:
test_path: e2e-tests/gatsby-image

e2e_tests_runtime:
<<: *node10_browsers
<<: *e2e-executor
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|integration-tests/*"
- <<: *restore_node_modules
- <<: *install_node_modules
- <<: *attach_to_bootstrap
- run: ./scripts/integration-test.sh integration-tests/production-runtime
- e2e-test:
test_path: e2e-tests/production-runtime

workflows:
version: 2
Expand All @@ -154,20 +168,24 @@ workflows:
- bootstrap
- lint
- unit_tests_node6:
<<: *ignore_docs
requires:
- bootstrap
- unit_tests_node8:
<<: *ignore_docs
requires:
- bootstrap
- unit_tests_node10:
<<: *ignore_docs
requires:
- bootstrap
- integration_tests
- integration_tests:
<<: *ignore_docs
- e2e_tests_gatsbygram:
<<: *integration_test_workflow
<<: *e2e-test-workflow
- e2e_tests_path-prefix:
<<: *integration_test_workflow
<<: *e2e-test-workflow
- e2e_tests_gatsby-image:
<<: *integration_test_workflow
<<: *e2e-test-workflow
- e2e_tests_runtime:
<<: *integration_test_workflow
<<: *e2e-test-workflow
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
trim_trailing_whitespace = true
52 changes: 25 additions & 27 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prettier/flowtype",
"prettier/react"
],
"plugins": ["flowtype", "react"],
"plugins": ["flowtype", "prettier", "react"],
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
Expand All @@ -27,36 +27,22 @@
"spyOn": true
},
"rules": {
"no-console": "off",
"no-inner-declarations": "off",
"valid-jsdoc": "off",
"require-jsdoc": "off",
"quotes": ["error", "backtick"],
"consistent-return": ["error"],
"arrow-body-style": [
"error",
"as-needed",
{ "requireReturnForObjectLiteral": true }
],
"jsx-quotes": ["error", "prefer-double"],
"semi": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
],
"react/prop-types": [
"error",
{
"ignore": ["children"]
}
]
"consistent-return": ["error"],
"no-console": "off",
"no-inner-declarations": "off",
"prettier/prettier": "error",
"quotes": ["error", "backtick"],
"react/display-name": "off",
"react/jsx-key": "warn",
"react/no-unescaped-entities": "warn",
"react/prop-types": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off"
},
"overrides": [
{
Expand All @@ -71,6 +57,18 @@
"___loader": false,
"___emitter": false
}
},
{
"files": ["**/cypress/integration/**/*", "**/cypress/support/**/*"],
"globals": {
"cy": false,
"Cypress": false
}
}
],
"settings": {
"react": {
"version": "16.4.2"
}
]
}
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/*.js.snap text eol=lf
**/__testfixtures__/** text eol=lf
**/__tests__/fixtures/** text eol=lf
**/*.md text eol=lf
8 changes: 1 addition & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<!--
Q. Which branch should I use for my pull request?
A. Use `master` branch (probably).
Q. Which branch if my change is a bug fix for Gatsby v1?
A. In this case, you should use the `v1` branch
Q. Which branch if I'm still not sure?
A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)
A. Your best bet is to go for `master`. If you are unsure, ask in the PR, and a Gatsby mantainer will be happy to help :)
Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output
junit.xml

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

0 comments on commit bfd81d3

Please sign in to comment.