Skip to content

Commit

Permalink
Merge branch 'master' into feat/no-watch-on-build
Browse files Browse the repository at this point in the history
* master: (1595 commits)
  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)
  Add thijs koerselman portfolio to sites list (gatsbyjs#10304)
  chore(release): Publish
  fix(gatsby): don't remount matchPath pages (gatsbyjs#10261)
  chore(release): Publish
  feat(gatsby-source-contentful): enable RichText for all users (gatsbyjs#10301)
  docs(tutorial): update 404 screenshot (gatsbyjs#10295)
  feat(gatsby-plugin-typescript): allow specifying babel preset options (gatsbyjs#10248)
  docs(gatsby-plugin-sass): fix typo in docs (gatsbyjs#10292)
  fix(ci): actually only run tests on non-docs changes (gatsbyjs#10287)
  fix(blog): rename for correct date in link (gatsbyjs#10290)
  Adds a more descriptive link purpose (gatsbyjs#9266)
  fix(www): comment out down showcase site
  ...
  • Loading branch information
m-allanson committed Dec 7, 2018
2 parents 3699cfe + 7ad166e commit cf66353
Show file tree
Hide file tree
Showing 2,017 changed files with 86,329 additions and 27,749 deletions.
57 changes: 0 additions & 57 deletions .babel-preset.js

This file was deleted.

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,
}
191 changes: 191 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
executors:
node:
parameters:
image:
type: string
default: "10"
docker:
- image: circleci/node:<< parameters.image >>

aliases:
e2e-executor: &e2e-executor
docker:
- image: cypress/browsers:chrome69

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

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

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

attach_to_bootstrap: &attach_to_bootstrap
attach_workspace:
at: packages

ignore_master: &ignore_master
filters:
branches:
ignore:
- master

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

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

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

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:
executor: node
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *persist_cache
- run: yarn bootstrap
- persist_to_workspace:
root: packages
paths:
- "*"

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

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

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

unit_tests_node10:
executor: node
<<: *test_template

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

e2e_tests_gatsbygram:
<<: *e2e-executor
steps:
- e2e-test:
test_path: examples/gatsbygram

e2e_tests_path-prefix:
<<: *e2e-executor
steps:
- e2e-test:
test_path: e2e-tests/path-prefix

e2e_tests_gatsby-image:
<<: *e2e-executor
steps:
- e2e-test:
test_path: e2e-tests/gatsby-image

e2e_tests_runtime:
<<: *e2e-executor
steps:
- e2e-test:
test_path: e2e-tests/production-runtime

workflows:
version: 2
build-test:
jobs:
- 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:
<<: *ignore_docs
- e2e_tests_gatsbygram:
<<: *e2e-test-workflow
- e2e_tests_path-prefix:
<<: *e2e-test-workflow
- e2e_tests_gatsby-image:
<<: *e2e-test-workflow
- e2e_tests_runtime:
<<: *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, *.svg}]
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
Loading

0 comments on commit cf66353

Please sign in to comment.