Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83bbe9e

Browse files
committed
Merge upstream master branch 'upstream/master' into www/use-localized-link
1 parent 01b1035 commit 83bbe9e

File tree

1,218 files changed

+165946
-11859
lines changed

Some content is hidden

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

1,218 files changed

+165946
-11859
lines changed

.circleci/config.yml

Lines changed: 203 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ aliases:
5757
- <<: *install_node_modules
5858
- run: yarn list react
5959
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*"
60-
- run: yarn jest -w 1 --ci
61-
- run: GATSBY_DB_NODES=loki yarn jest -w 1 --ci
60+
- run: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 --ci
61+
- run: GATSBY_DB_NODES=loki node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 --ci
6262

6363
e2e-test-workflow: &e2e-test-workflow
6464
filters:
@@ -130,6 +130,49 @@ commands:
130130
- slack/status:
131131
channel: eng-react-integration-status
132132

133+
run-benchmark:
134+
parameters:
135+
working_directory:
136+
type: string
137+
NUM_PAGES:
138+
type: string
139+
BENCHMARK_CONTENT_SOURCE:
140+
type: string
141+
BENCHMARK_REPO_NAME:
142+
type: string
143+
default: gatsbyjs/gatsby
144+
BENCHMARK_SITE_TYPE:
145+
type: string
146+
default: BLOG
147+
steps:
148+
- checkout
149+
- run:
150+
command: npm install
151+
working_directory: << parameters.working_directory >>
152+
- run:
153+
command: npm run build
154+
working_directory: << parameters.working_directory >>
155+
environment:
156+
BENCHMARK_BUILD_TYPE: COLD_START
157+
NUM_PAGES: << parameters.NUM_PAGES >>
158+
BENCHMARK_CONTENT_SOURCE: << parameters.BENCHMARK_CONTENT_SOURCE >>
159+
BENCHMARK_REPO_NAME: << parameters.BENCHMARK_REPO_NAME >>
160+
BENCHMARK_SITE_TYPE: << parameters.BENCHMARK_SITE_TYPE >>
161+
CI_NAME: circleci
162+
- run:
163+
command: npm install
164+
working_directory: << parameters.working_directory >>
165+
- run:
166+
command: npm run build
167+
working_directory: << parameters.working_directory >>
168+
environment:
169+
BENCHMARK_BUILD_TYPE: WARM_START
170+
NUM_PAGES: << parameters.NUM_PAGES >>
171+
BENCHMARK_CONTENT_SOURCE: << parameters.BENCHMARK_CONTENT_SOURCE >>
172+
BENCHMARK_REPO_NAME: << parameters.BENCHMARK_REPO_NAME >>
173+
BENCHMARK_SITE_TYPE: << parameters.BENCHMARK_SITE_TYPE >>
174+
CI_NAME: circleci
175+
133176
e2e-test:
134177
parameters:
135178
skip_file_change_test:
@@ -340,7 +383,7 @@ jobs:
340383
key: yarn-packages-v2-{{ checksum "yarn.lock" }}
341384
- run:
342385
name: "Run Tests"
343-
command: yarn test
386+
command: yarn jest -w 1 --ci
344387

345388
bootstrap-with-experimental-react:
346389
executor: node
@@ -361,22 +404,170 @@ jobs:
361404
paths:
362405
- "*"
363406

364-
run_benchmarks:
407+
benchmark_markdown_id_512:
365408
docker:
366-
- image: circleci/node:12
409+
- image: "circleci/node:12"
367410
resource_class: xlarge
368411
steps:
369-
- checkout
370-
- run: ./scripts/build-benchmark.sh
412+
- run-benchmark:
413+
working_directory: benchmarks/markdown_id
414+
NUM_PAGES: "512"
415+
BENCHMARK_CONTENT_SOURCE: MDX
416+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
417+
BENCHMARK_SITE_TYPE: BLOG
418+
419+
benchmark_markdown_id_4096:
420+
docker:
421+
- image: "circleci/node:12"
422+
resource_class: xlarge
423+
steps:
424+
- run-benchmark:
425+
working_directory: benchmarks/markdown_id
426+
NUM_PAGES: "4096"
427+
BENCHMARK_CONTENT_SOURCE: MDX
428+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
429+
BENCHMARK_SITE_TYPE: BLOG
430+
431+
benchmark_markdown_id_8192:
432+
docker:
433+
- image: "circleci/node:12"
434+
resource_class: xlarge
435+
steps:
436+
- run-benchmark:
437+
working_directory: benchmarks/markdown_id
438+
NUM_PAGES: "8192"
439+
BENCHMARK_CONTENT_SOURCE: MDX
440+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
441+
BENCHMARK_SITE_TYPE: BLOG
442+
443+
benchmark_markdown_id_32768:
444+
docker:
445+
- image: "circleci/node:12"
446+
resource_class: xlarge
447+
steps:
448+
- run-benchmark:
449+
working_directory: benchmarks/markdown_id
450+
NUM_PAGES: "32768"
451+
BENCHMARK_CONTENT_SOURCE: MDX
452+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_id
453+
BENCHMARK_SITE_TYPE: BLOG
454+
455+
benchmark_markdown_slug_512:
456+
docker:
457+
- image: "circleci/node:12"
458+
resource_class: xlarge
459+
steps:
460+
- run-benchmark:
461+
working_directory: benchmarks/markdown_slug
462+
NUM_PAGES: "512"
463+
BENCHMARK_CONTENT_SOURCE: MDX
464+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
465+
BENCHMARK_SITE_TYPE: BLOG
466+
467+
benchmark_markdown_slug_4096:
468+
docker:
469+
- image: "circleci/node:12"
470+
resource_class: xlarge
471+
steps:
472+
- run-benchmark:
473+
working_directory: benchmarks/markdown_slug
474+
NUM_PAGES: "4096"
475+
BENCHMARK_CONTENT_SOURCE: MDX
476+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
477+
BENCHMARK_SITE_TYPE: BLOG
478+
479+
benchmark_markdown_slug_8192:
480+
docker:
481+
- image: "circleci/node:12"
482+
resource_class: xlarge
483+
steps:
484+
- run-benchmark:
485+
working_directory: benchmarks/markdown_slug
486+
NUM_PAGES: "8192"
487+
BENCHMARK_CONTENT_SOURCE: MDX
488+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
489+
BENCHMARK_SITE_TYPE: BLOG
490+
491+
benchmark_markdown_slug_32768:
492+
docker:
493+
- image: "circleci/node:12"
494+
resource_class: xlarge
495+
steps:
496+
- run-benchmark:
497+
working_directory: benchmarks/markdown_slug
498+
NUM_PAGES: "32768"
499+
BENCHMARK_CONTENT_SOURCE: MDX
500+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_slug
501+
BENCHMARK_SITE_TYPE: BLOG
502+
503+
benchmark_markdown_table_512:
504+
docker:
505+
- image: "circleci/node:12"
506+
resource_class: xlarge
507+
steps:
508+
- run-benchmark:
509+
working_directory: benchmarks/markdown_table
510+
NUM_PAGES: "512"
511+
BENCHMARK_CONTENT_SOURCE: MDX
512+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
513+
BENCHMARK_SITE_TYPE: BLOG
514+
515+
benchmark_markdown_table_4096:
516+
docker:
517+
- image: "circleci/node:12"
518+
resource_class: xlarge
519+
steps:
520+
- run-benchmark:
521+
working_directory: benchmarks/markdown_table
522+
NUM_PAGES: "4096"
523+
BENCHMARK_CONTENT_SOURCE: MDX
524+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
525+
BENCHMARK_SITE_TYPE: BLOG
526+
527+
benchmark_markdown_table_8192:
528+
docker:
529+
- image: "circleci/node:12"
530+
resource_class: xlarge
531+
steps:
532+
- run-benchmark:
533+
working_directory: benchmarks/markdown_table
534+
NUM_PAGES: "8192"
535+
BENCHMARK_CONTENT_SOURCE: MDX
536+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
537+
BENCHMARK_SITE_TYPE: BLOG
538+
539+
benchmark_markdown_table_32768:
540+
docker:
541+
- image: "circleci/node:12"
542+
resource_class: xlarge
543+
steps:
544+
- run-benchmark:
545+
working_directory: benchmarks/markdown_table/benchmarks/markdown_table
546+
NUM_PAGES: "32768"
547+
BENCHMARK_CONTENT_SOURCE: MDX
548+
BENCHMARK_REPO_NAME: gatsbyjs/gatsby/benchmarks/markdown_table
549+
BENCHMARK_SITE_TYPE: BLOG
371550

372551
workflows:
373552
version: 2
374553

375-
run_benchmarks:
376-
jobs: [run_benchmarks]
554+
benchmark:
555+
jobs:
556+
- benchmark_markdown_id_512
557+
- benchmark_markdown_id_4096
558+
- benchmark_markdown_id_8192
559+
- benchmark_markdown_id_32768
560+
- benchmark_markdown_slug_512
561+
- benchmark_markdown_slug_4096
562+
- benchmark_markdown_slug_8192
563+
- benchmark_markdown_slug_32768
564+
- benchmark_markdown_table_512
565+
- benchmark_markdown_table_4096
566+
- benchmark_markdown_table_8192
567+
- benchmark_markdown_table_32768
377568
triggers:
378569
- schedule:
379-
cron: "12 3 * * *" # every day at 03:12
570+
cron: 12 3 * * *
380571
filters:
381572
branches:
382573
only:
@@ -431,8 +622,9 @@ workflows:
431622

432623
build-test:
433624
jobs:
434-
- windows_unit_tests
435625
- bootstrap
626+
- windows_unit_tests:
627+
<<: *ignore_docs
436628
- lint:
437629
requires:
438630
- bootstrap

.eslintrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ module.exports = {
8585
plugins: ["@typescript-eslint/eslint-plugin"],
8686
rules: {
8787
...TSEslint.configs.recommended.rules,
88+
// This rule tries to prevent using `require()`. However in node code,
89+
// there are times where this makes sense. And it specifically is causing
90+
// problems in our tests where we often want this functionality for module
91+
// mocking. At this point it's easier to have it off and just encouarge
92+
// using top-level imports via code reviews.
93+
"@typescript-eslint/no-var-requires": "off",
8894
// This rule ensures that typescript types do not have semicolons
8995
// at the end of their lines, since our prettier setup is to have no semicolons
9096
// e.g.,
@@ -119,7 +125,10 @@ module.exports = {
119125
"error",
120126
"interface",
121127
],
122-
128+
"@typescript-eslint/no-use-before-define": [
129+
"error",
130+
{ functions: false },
131+
],
123132
// Allows us to write unions like `type Foo = "baz" | "bar"`
124133
// otherwise eslint will want to switch the strings to backticks,
125134
// which then crashes the ts compiler

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Bug Report 🐞
33
about: Something isn't working as expected? Here is the right place to report.
4+
labels: "type: bug"
45
---
56

67
<!--

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ contact_links:
44
url: https://www.gatsbyjs.org/docs/
55
about: Check out the Gatsby documentation for answers to common questions
66
- name: Gatsby Discord
7-
url: http://gatsby.dev/discord
7+
url: https://gatsby.dev/discord
88
about: Ask questions, get help and discuss new things you're building with the Gatsby community
99
- name: AskGatsbyJS Twitter
1010
url: https://twitter.com/AskGatsbyJS

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Documentation 📝
33
about: Suggest better docs coverage for a particular tool or process.
4+
labels: "type: documentation"
45
---
56

67
<!--

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Feature Request 💡
33
about: Suggest a new idea for the project.
4+
labels: "type: feature or enhancement"
45
---
56

67
<!--

.github/ISSUE_TEMPLATE/new_translation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
name: New Translation Request 🌐
33
about: Suggest a new language translation of the repo.
4+
# "not stale" b/c translation requests should be left open for more maintainers
5+
labels: "type: translation request, topic: i18n, not stale"
46
---
57

68
<!--

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Question 🤔
33
about: Usage question or discussion about Gatsby.
4+
labels: "type: question or discussion"
45
---
56

67
<!--

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-->
55

66
<!--
7-
Is this a blog post? Check out the docs at https://www.gatsbyjs.org/contributing/blog-and-website-contributions/, and please mention if the blog post is pre-approved
7+
Is this a blog post? Check out the docs at https://www.gatsbyjs.org/contributing/blog-contributions/, and please mention if the blog post is pre-approved
88
by someone from Gatsby.
99
-->
1010

.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@ module.exports = {
1515
semi: true,
1616
},
1717
},
18+
{
19+
"files": "docs/**/*.md",
20+
"options": {
21+
"parser": "mdx"
22+
}
23+
},
1824
],
1925
}

.typo-ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# What language dictionaries should it use? Currently Typo CI supports:
2+
# de
3+
# en
4+
# en_GB
5+
# en_CA
6+
# en_AU
7+
# en_ZA
8+
# es
9+
# fr
10+
# is
11+
# it
12+
# pt
13+
# pt_BR
14+
# sw
15+
dictionaries:
16+
- en
17+
- en_GB
18+
19+
# Any files/folders we should ignore?
20+
excluded_files:
21+
- "node_modules/**/*"
22+
- "package-lock.json"
23+
- "yarn.lock"
24+
- "package.json"
25+
- ".typo-ci.yml"
26+
- ".npmignore"
27+
- ".gitignore"
28+
- "packages/**/.npmignore"
29+
- "**/*.js"
30+
- "**/*.ts"
31+
- "**/*.jsx"
32+
- "**/*.tsx"
33+
# Any typos we should ignore?
34+
excluded_words:
35+
- typoci
36+
- xxs
37+
- agadoo
38+
- hevc
39+
- oss

0 commit comments

Comments
 (0)