Skip to content

Commit

Permalink
Merge branch 'master' into svgo
Browse files Browse the repository at this point in the history
* master: (1037 commits)
  Update starters.yml (gatsbyjs#10505)
  chore(release): Publish
  fix(graphql-skip-limit): fix hasNextPage (gatsbyjs#10504)
  chore: use cjs instead of esm for consistency (gatsbyjs#10494)
  feat(gatsby-remark-copy-linked-files): add support for video elements with `src` attribute (gatsbyjs#10395)
  typofix (gatsbyjs#10488)
  Add kobit.in to showcase (gatsbyjs#10496)
  fix(docs): window.reload => window.location.reload (gatsbyjs#10459)
  feat(www): add unbird feedback component to starter lib (gatsbyjs#10450)
  fix(blog): youfit case study typofix
  Doc improvements to Visual testing with Storybook guide (gatsbyjs#10436)
  fix(gatsby-plugin-offline): prevent incorrect revisioning of static file by workbox (gatsbyjs#10416)
  fix(starters): ttag repo link
  fix typo in pull request template (gatsbyjs#10454)
  fix(www) Fix query for plugin links always ?=undefined (gatsbyjs#10453)
  chore(release): Publish
  fix(gatsby): fix extracting StaticQuery nested in shorthand fragment (gatsbyjs#10443)
  fix(www): avoid querying for no-cache=1 (gatsbyjs#10389)
  fix(gatsby-image): update typescript definitions - properly mark fields as optional (gatsbyjs#10419)
  refactor(gatsby): improve EnsureResources (gatsbyjs#10224)
  ...
  • Loading branch information
m-allanson committed Dec 17, 2018
2 parents 42dab81 + 84124da commit 55f39a7
Show file tree
Hide file tree
Showing 1,641 changed files with 50,027 additions and 19,517 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,
}
170 changes: 94 additions & 76 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
17 changes: 4 additions & 13 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.json}]
indent_style = space
indent_size = 4

# Matches the exact package.json, or *rc
[{package.json,*.yml,*rc}]
indent_style = space
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = 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 maintainer 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
Loading

0 comments on commit 55f39a7

Please sign in to comment.