Skip to content

Commit a7ea9d7

Browse files
authored
Merge pull request #383 from Vagr9K/june-2022-upgrades
June 2022 upgrade cycle (Gatsby v4.17).
2 parents 5ca3ccd + 0b9d854 commit a7ea9d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+36546
-36398
lines changed

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ module.exports = {
3232
tsx: "never",
3333
},
3434
],
35+
"react/function-component-definition": [
36+
"error",
37+
{
38+
namedComponents: "arrow-function",
39+
unnamedComponents: "arrow-function",
40+
},
41+
],
3542
},
3643
overrides: [
3744
{
@@ -59,6 +66,7 @@ module.exports = {
5966
rules: {
6067
"react/require-default-props": "off",
6168
"react/prop-types": "off",
69+
"no-restricted-exports": "off",
6270
},
6371

6472
parser: "@typescript-eslint/parser",
@@ -111,6 +119,9 @@ module.exports = {
111119
peerDependencies: false,
112120
},
113121
],
122+
"import/no-relative-packages": "off",
123+
"jest/no-conditional-in-test": "off",
124+
"jest/prefer-snapshot-hint": "off",
114125
},
115126
},
116127
],

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Continuous Integration
22
on: [push]
33
jobs:
44
static-check:
5+
if: always()
56
runs-on: ubuntu-latest
67
steps:
78
- uses: actions/checkout@v2
@@ -13,6 +14,7 @@ jobs:
1314
- run: yarn lint:all
1415

1516
type-check:
17+
if: always()
1618
runs-on: ubuntu-latest
1719
steps:
1820
- uses: actions/checkout@v2
@@ -24,6 +26,7 @@ jobs:
2426
- run: yarn type-check
2527

2628
jest-tests:
29+
if: always()
2730
runs-on: ubuntu-latest
2831
strategy:
2932
matrix:
@@ -40,6 +43,7 @@ jobs:
4043
run: yarn test
4144

4245
e2e-tests:
46+
if: always()
4347
runs-on: ubuntu-latest
4448
strategy:
4549
matrix:
@@ -52,7 +56,7 @@ jobs:
5256
cache: 'yarn'
5357
- run: yarn install
5458
- name: Run E2E tests
55-
uses: cypress-io/github-action@v2
59+
uses: cypress-io/github-action@v4.1.0
5660
with:
5761
working-directory: ${{ matrix.project }}
5862
build: yarn build

.stylelintrc.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
{
2-
"extends": ["stylelint-config-recommended", "stylelint-prettier/recommended"]
2+
"extends": [
3+
"stylelint-config-recommended",
4+
"stylelint-config-styled-components",
5+
"stylelint-prettier/recommended"
6+
],
7+
8+
"overrides": [
9+
{
10+
"files": ["**/*.tsx"],
11+
"customSyntax": "@stylelint/postcss-css-in-js"
12+
}
13+
]
314
}

.yarn/releases/yarn-3.0.0.cjs

Lines changed: 0 additions & 631 deletions
This file was deleted.

.yarn/releases/yarn-3.2.1.cjs

Lines changed: 786 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ plugins:
88
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
99
spec: "@yarnpkg/plugin-workspace-tools"
1010

11-
yarnPath: .yarn/releases/yarn-3.0.0.cjs
11+
yarnPath: .yarn/releases/yarn-3.2.1.cjs

cypress.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./cypress/config";

cypress.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

cypress/config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from "cypress";
2+
3+
export default defineConfig({
4+
fixturesFolder: false,
5+
e2e: {
6+
baseUrl: "http://localhost:9000",
7+
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
8+
},
9+
});
File renamed without changes.
File renamed without changes.

cypress/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"lib": ["es5", "dom"],
55
"types": ["cypress", "cypress-axe", "@testing-library/cypress"]
66
},
7-
"include": ["./**/*.ts", "./.eslintrc.js"]
7+
"include": ["./**/*.ts", "../cypress.config.ts", "./.eslintrc.js"]
88
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./cypress/config";

examples/advanced-demo/cypress.json

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from "cypress";
2+
import pluginConfig from "./plugins/index";
3+
4+
export default defineConfig({
5+
fixturesFolder: false,
6+
chromeWebSecurity: false,
7+
e2e: {
8+
// We've imported your old cypress plugins here.
9+
// You may want to clean this up later by importing these.
10+
setupNodeEvents(on, config) {
11+
pluginConfig(on);
12+
13+
return config;
14+
},
15+
baseUrl: "http://localhost:9000",
16+
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
17+
},
18+
});

examples/advanced-demo/cypress/plugins/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type SiteMapData = {
1414

1515
type ParseSitemapArgs = { siteUrl: string; sitemapString: string };
1616

17-
const pluginConfig: Cypress.PluginConfig = (on) => {
17+
const pluginConfig = (on: Cypress.PluginEvents): void => {
1818
on("task", {
1919
// Parse the RSS feed and return a list of links to posts
2020
parseRss(rssString: string) {

examples/advanced-demo/cypress/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"lib": ["es5", "dom"],
55
"types": ["cypress", "cypress-axe", "@testing-library/cypress"]
66
},
7-
"include": ["./**/*.ts", "./.eslintrc.js"]
7+
"include": ["./**/*.ts", "../cypress.config.ts", "./.eslintrc.js"]
88
}

examples/advanced-demo/package.json

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "gatsby-theme-advanced-demo",
44
"description": "GatsbyJS theme demo built on top of gatsby-theme-advanced.",
5-
"version": "4.0.0",
5+
"version": "4.17.0",
66
"author": "Ruben Harutyunyan <vagr9k@gmail.com>",
77
"keywords": [
88
"gatsby",
@@ -39,9 +39,9 @@
3939
"test:e2e:ci": "CYPRESS_SUPPORT=y npm run build && start-server-and-test serve http://localhost:9000 cy:run"
4040
},
4141
"dependencies": {
42-
"gatsby": "^4.0.0",
43-
"gatsby-plugin-image": "^2.0.0",
44-
"gatsby-plugin-mdx": "^3.0.0",
42+
"gatsby": "^4.17.1",
43+
"gatsby-plugin-image": "^2.17.0",
44+
"gatsby-plugin-mdx": "^3.17.0",
4545
"gatsby-theme-advanced": "*",
4646
"lodash": "^4.17.21",
4747
"react": "^17.0.2",
@@ -50,49 +50,52 @@
5050
"react-share": "^4.4.0"
5151
},
5252
"devDependencies": {
53-
"@testing-library/cypress": "^8.0.1",
54-
"@testing-library/jest-dom": "^5.14.1",
55-
"@testing-library/react": "^12.1.2",
56-
"@types/jest": "^27.0.2",
57-
"@types/lodash": "^4.14.176",
58-
"@types/node": "^16.11.4",
59-
"@types/react": "^17.0.31",
60-
"@types/react-dom": "^17.0.10",
61-
"@types/react-helmet": "^6.1.4",
62-
"@types/xml2js": "^0.4.9",
63-
"@typescript-eslint/eslint-plugin": "^5.1.0",
64-
"axe-core": "^4.3.3",
65-
"babel-jest": "^27.3.1",
66-
"babel-preset-gatsby": "^2.0.0",
67-
"cypress": "^8.6.0",
68-
"cypress-axe": "^0.13.0",
69-
"eslint": "^7.32.0",
70-
"eslint-config-airbnb": "^18.2.1",
71-
"eslint-config-airbnb-typescript": "^14.0.1",
72-
"eslint-config-prettier": "^8.3.0",
53+
"@stylelint/postcss-css-in-js": "^0.38.0",
54+
"@testing-library/cypress": "^8.0.3",
55+
"@testing-library/jest-dom": "^5.16.4",
56+
"@testing-library/react": "^12.1.5",
57+
"@types/jest": "^28.1.3",
58+
"@types/lodash": "^4.14.182",
59+
"@types/node": "^18.0.0",
60+
"@types/react": "^17.0.47",
61+
"@types/react-dom": "^17.0.17",
62+
"@types/react-helmet": "^6.1.5",
63+
"@types/xml2js": "^0.4.11",
64+
"@typescript-eslint/eslint-plugin": "^5.29.0",
65+
"axe-core": "^4.4.2",
66+
"babel-jest": "^28.1.1",
67+
"babel-preset-gatsby": "^2.17.0",
68+
"cypress": "^10.2.0",
69+
"cypress-axe": "^1.0.0",
70+
"eslint": "^8.18.0",
71+
"eslint-config-airbnb": "^19.0.4",
72+
"eslint-config-airbnb-typescript": "^17.0.0",
73+
"eslint-config-prettier": "^8.5.0",
7374
"eslint-plugin-cypress": "^2.12.1",
74-
"eslint-plugin-import": "^2.25.2",
75-
"eslint-plugin-jest": "^25.2.2",
76-
"eslint-plugin-jest-dom": "^3.9.2",
77-
"eslint-plugin-jsx-a11y": "^6.4.1",
75+
"eslint-plugin-import": "^2.26.0",
76+
"eslint-plugin-jest": "^26.5.3",
77+
"eslint-plugin-jest-dom": "^4.0.2",
78+
"eslint-plugin-jsx-a11y": "^6.6.0",
7879
"eslint-plugin-prettier": "^4.0.0",
79-
"eslint-plugin-react": "^7.26.1",
80-
"eslint-plugin-react-hooks": "^4.2.0",
81-
"eslint-plugin-testing-library": "^4.12.4",
82-
"gatsby-cypress": "^2.0.0",
83-
"gh-pages": "^3.2.3",
84-
"jest": "^27.3.1",
85-
"markdownlint-cli2": "^0.3.2",
86-
"prettier": "^2.4.1",
80+
"eslint-plugin-react": "^7.30.1",
81+
"eslint-plugin-react-hooks": "^4.6.0",
82+
"eslint-plugin-testing-library": "^5.5.1",
83+
"gatsby-cypress": "^2.17.0",
84+
"gh-pages": "^4.0.0",
85+
"jest": "^28.1.1",
86+
"markdownlint-cli2": "^0.4.0",
87+
"postcss-syntax": "^0.36.2",
88+
"prettier": "^2.7.1",
8789
"start-server-and-test": "^1.14.0",
88-
"stylelint": "^13.13.1",
89-
"stylelint-config-prettier": "^8.0.2",
90-
"stylelint-config-recommended": "^5.0.0",
91-
"stylelint-prettier": "^1.2.0",
92-
"ts-jest": "^27.0.7",
93-
"ts-node": "^10.4.0",
94-
"ts-prune": "^0.10.1",
95-
"typescript": "^4.4.4",
90+
"stylelint": "^14.9.1",
91+
"stylelint-config-prettier": "^9.0.3",
92+
"stylelint-config-recommended": "^8.0.0",
93+
"stylelint-config-styled-components": "^0.1.1",
94+
"stylelint-prettier": "^2.0.0",
95+
"ts-jest": "^28.0.5",
96+
"ts-node": "^10.8.1",
97+
"ts-prune": "^0.10.3",
98+
"typescript": "^4.7.4",
9699
"write-good": "^1.0.8",
97100
"xml2js": "^0.4.23"
98101
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./cypress/config";

examples/amaranth-demo/cypress.json

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from "cypress";
2+
import pluginConfig from "./plugins/index";
3+
4+
export default defineConfig({
5+
fixturesFolder: false,
6+
chromeWebSecurity: false,
7+
e2e: {
8+
// We've imported your old cypress plugins here.
9+
// You may want to clean this up later by importing these.
10+
setupNodeEvents(on, config) {
11+
pluginConfig(on);
12+
13+
return config;
14+
},
15+
baseUrl: "http://localhost:9000",
16+
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
17+
},
18+
});

examples/amaranth-demo/cypress/plugins/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type SiteMapData = {
1414

1515
type ParseSitemapArgs = { siteUrl: string; sitemapString: string };
1616

17-
const pluginConfig: Cypress.PluginConfig = (on) => {
17+
const pluginConfig = (on: Cypress.PluginEvents): void => {
1818
on("task", {
1919
// Parse the RSS feed and return a list of links to posts
2020
parseRss(rssString: string) {

examples/amaranth-demo/cypress/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"lib": ["es5", "dom"],
55
"types": ["cypress", "cypress-axe", "@testing-library/cypress"]
66
},
7-
"include": ["./**/*.ts", "./.eslintrc.js"]
7+
"include": ["./**/*.ts", "../cypress.config.ts", ".eslintrc.js"]
88
}

0 commit comments

Comments
 (0)