Skip to content

Commit ce16ed1

Browse files
authored
Merge branch 'master' into chore/bump-yaml-loader
2 parents 3e7606a + 7fda6d1 commit ce16ed1

File tree

122 files changed

+2139
-2384
lines changed

Some content is hidden

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

122 files changed

+2139
-2384
lines changed

docs/docs/reference/built-in-components/gatsby-script.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,13 @@ You may need to adjust your dev tools to the verbose log level in order to see t
324324

325325
By leveraging [Partytown](https://partytown.builder.io), scripts that use the `off-main-thread` strategy must also be aware of the [limitations mentioned in the Partytown documentation](https://partytown.builder.io/trade-offs). While the strategy can be powerful, it may not be the best solution for all scenarios.
326326

327-
In addition, there are other limitations that require upstream changes from Partytown to enable:
327+
These limitations require upstream changes from Partytown to enable:
328328

329329
- The `onLoad` and `onError` callbacks are not supported. See [discussion #199 in the Partytown repo](https://github.com/BuilderIO/partytown/discussions/199).
330330
- Scripts load only on server-side rendering (SSR) navigation (e.g. regular `<a>` tag navigation), and not on client-side rendering (CSR) navigation (e.g. Gatsby `<Link>` navigation). See [issue #74 in the Partytown repo](https://github.com/BuilderIO/partytown/issues/74).
331331

332+
In addition, the `off-main-thread` strategy cannot be used in the `wrapRootElement` API since script collection depends on location providers. Use the `wrapPageElement` API instead.
333+
332334
## Usage in Gatsby SSR and Browser APIs
333335

334336
The Gatsby `<Script>` component can also be used in the following [Gatsby SSR](/docs/reference/config-files/gatsby-ssr/) and [Gatsby Browser](/docs/reference/config-files/gatsby-browser/) APIs:

e2e-tests/contentful/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.0.0",
55
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
66
"dependencies": {
7-
"@contentful/rich-text-types": "^14.1.2",
7+
"@contentful/rich-text-types": "^16.0.2",
88
"gatsby": "next",
99
"gatsby-plugin-image": "next",
1010
"gatsby-plugin-sharp": "next",

e2e-tests/development-runtime/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
},
6161
"devDependencies": {
6262
"@playwright/test": "^1.29.1",
63-
"@testing-library/cypress": "^7.0.7",
64-
"cross-env": "^5.2.1",
63+
"@testing-library/cypress": "^8.0.7",
64+
"cross-env": "^7.0.3",
6565
"cypress": "^9.7.0",
6666
"cypress-image-snapshot": "^4.0.1",
6767
"express": "^4.18.2",
68-
"fs-extra": "^7.0.1",
68+
"fs-extra": "^11.1.0",
6969
"gatsby-core-utils": "next",
7070
"gatsby-cypress": "next",
71-
"is-ci": "^2.0.0",
72-
"prettier": "2.8.1",
71+
"is-ci": "^3.0.1",
72+
"prettier": "^2.8.1",
7373
"start-server-and-test": "^1.14.0",
7474
"typescript": "^4.9.4",
75-
"yargs": "^12.0.5"
75+
"yargs": "^17.6.2"
7676
},
7777
"repository": {
7878
"type": "git",

e2e-tests/mdx/gatsby-node.js renamed to e2e-tests/mdx/gatsby-node.mjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
const fs = require(`fs-extra`)
2-
const path = require(`path`)
1+
import fs from "fs-extra"
2+
import path from "path"
3+
import slugify from "@sindresorhus/slugify"
4+
import { fileURLToPath } from "url"
35

4-
const slugify = require(`@sindresorhus/slugify`)
6+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
57

6-
exports.onPostBuild = async ({ graphql }) => {
8+
export const onPostBuild = async ({ graphql }) => {
79
const results = await graphql(`
810
{
911
mdx(slug: { eq: "html" }) {
@@ -19,7 +21,7 @@ exports.onPostBuild = async ({ graphql }) => {
1921
)
2022
}
2123

22-
exports.createSchemaCustomization = ({ actions }) => {
24+
export const createSchemaCustomization = ({ actions }) => {
2325
const { createTypes } = actions
2426

2527
createTypes(`
@@ -31,8 +33,9 @@ exports.createSchemaCustomization = ({ actions }) => {
3133
}
3234
`)
3335
}
36+
3437
// Add custom fields to our MDX nodes
35-
exports.onCreateNode = async ({ node, actions, getNode, reporter, cache }) => {
38+
export const onCreateNode = async ({ node, actions, getNode, reporter, cache }) => {
3639
const { createNodeField } = actions
3740
if (node.internal.type === `Mdx`) {
3841
// Set slug based on frontmatter, fall back to filename

e2e-tests/mdx/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"version": "1.0.0",
55
"dependencies": {
66
"@mdx-js/react": "^2",
7-
"@sindresorhus/slugify": "^1.0.0",
7+
"@sindresorhus/slugify": "^2.1.1",
88
"cypress": "^9.7.0",
9-
"fs-extra": "^8.1.0",
9+
"fs-extra": "^11.1.0",
1010
"gatsby": "next",
1111
"gatsby-plugin-mdx": "next",
1212
"gatsby-plugin-sharp": "next",
@@ -43,10 +43,10 @@
4343
"update": "node scripts/update.js"
4444
},
4545
"devDependencies": {
46-
"cross-env": "^5.2.1",
46+
"cross-env": "^7.0.3",
4747
"gatsby-cypress": "next",
48-
"is-ci": "^2.0.0",
49-
"prettier": "2.8.1",
48+
"is-ci": "^3.0.1",
49+
"prettier": "^2.8.1",
5050
"start-server-and-test": "^1.14.0"
5151
}
5252
}

e2e-tests/path-prefix/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ yarn-error.log
1010

1111
# Cypress output
1212
cypress/videos/
13+
cypress/screenshots/

e2e-tests/path-prefix/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scripts": {
2626
"prebuild": "del-cli -f assets && make-dir assets/blog",
2727
"build": "cross-env CYPRESS_SUPPORT=y gatsby build --prefix-paths",
28-
"postbuild": "cpy --cwd=./public --parents '**/*' '../assets/blog'",
28+
"postbuild": "cpy . '../assets/blog' --cwd=./public",
2929
"develop": "gatsby develop",
3030
"format": "prettier --write '**/*.js'",
3131
"test": "npm run build && npm run start-server-and-test",
@@ -37,16 +37,16 @@
3737
"cy:run": "node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome"
3838
},
3939
"devDependencies": {
40-
"cpy-cli": "^2.0.0",
41-
"cross-env": "^5.2.1",
42-
"del-cli": "^3.0.1",
40+
"cpy-cli": "^4.2.0",
41+
"cross-env": "^7.0.3",
42+
"del-cli": "^5.0.0",
4343
"gatsby-cypress": "next",
44-
"is-ci": "^2.0.0",
45-
"make-dir-cli": "^2.0.0",
44+
"is-ci": "^3.0.1",
45+
"make-dir-cli": "^3.0.0",
4646
"npm-run-all": "^4.1.5",
4747
"prettier": "2.8.1",
4848
"start-server-and-test": "^1.14.0",
49-
"wait-on": "^6.0.1"
49+
"wait-on": "^7.0.1"
5050
},
5151
"repository": {
5252
"type": "git",

e2e-tests/production-runtime/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"gatsby-plugin-sharp": "next",
1717
"gatsby-plugin-stylus": "next",
1818
"gatsby-source-filesystem": "next",
19-
"glob": "^7.1.3",
19+
"glob": "^8.0.3",
2020
"react": "^18.2.0",
2121
"react-dom": "^18.2.0",
2222
"sass": "^1.32.8",
@@ -56,12 +56,12 @@
5656
},
5757
"devDependencies": {
5858
"@playwright/test": "^1.29.1",
59-
"cross-env": "^5.2.1",
59+
"cross-env": "^7.0.3",
6060
"express": "^4.18.2",
61-
"fs-extra": "^7.0.1",
61+
"fs-extra": "^11.1.0",
6262
"gatsby-core-utils": "next",
63-
"is-ci": "^2.0.0",
64-
"prettier": "2.8.1",
63+
"is-ci": "^3.0.1",
64+
"prettier": "^2.8.1",
6565
"start-server-and-test": "^1.14.0"
6666
},
6767
"repository": {

e2e-tests/themes/development-runtime/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
"cy:run": "node ../../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome"
2626
},
2727
"devDependencies": {
28-
"cross-env": "^5.2.1",
28+
"cross-env": "^7.0.3",
2929
"cypress": "^9.7.0",
3030
"gatsby-cypress": "next",
31-
"is-ci": "^2.0.0",
32-
"prettier": "2.8.1",
31+
"is-ci": "^3.0.1",
32+
"prettier": "^2.8.1",
3333
"start-server-and-test": "^1.14.0"
3434
},
3535
"repository": {

e2e-tests/themes/production-runtime/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"cy:run": "node ../../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome"
2323
},
2424
"devDependencies": {
25-
"cross-env": "^5.2.1",
25+
"cross-env": "^7.0.3",
2626
"cypress": "^9.7.0",
2727
"gatsby-cypress": "next",
28-
"is-ci": "^2.0.0",
29-
"prettier": "2.8.1",
28+
"is-ci": "^3.0.1",
29+
"prettier": "^2.8.1",
3030
"start-server-and-test": "^1.14.0"
3131
},
3232
"repository": {

0 commit comments

Comments
 (0)