Skip to content

Commit

Permalink
Merge branch 'master' into chore/bump-yaml-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
tyhopp authored Jan 5, 2023
2 parents 3e7606a + 7fda6d1 commit ce16ed1
Show file tree
Hide file tree
Showing 122 changed files with 2,139 additions and 2,384 deletions.
4 changes: 3 additions & 1 deletion docs/docs/reference/built-in-components/gatsby-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,13 @@ You may need to adjust your dev tools to the verbose log level in order to see t

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.

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

- The `onLoad` and `onError` callbacks are not supported. See [discussion #199 in the Partytown repo](https://github.com/BuilderIO/partytown/discussions/199).
- 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).

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.

## Usage in Gatsby SSR and Browser APIs

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:
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "1.0.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"@contentful/rich-text-types": "^14.1.2",
"@contentful/rich-text-types": "^16.0.2",
"gatsby": "next",
"gatsby-plugin-image": "next",
"gatsby-plugin-sharp": "next",
Expand Down
12 changes: 6 additions & 6 deletions e2e-tests/development-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@
},
"devDependencies": {
"@playwright/test": "^1.29.1",
"@testing-library/cypress": "^7.0.7",
"cross-env": "^5.2.1",
"@testing-library/cypress": "^8.0.7",
"cross-env": "^7.0.3",
"cypress": "^9.7.0",
"cypress-image-snapshot": "^4.0.1",
"express": "^4.18.2",
"fs-extra": "^7.0.1",
"fs-extra": "^11.1.0",
"gatsby-core-utils": "next",
"gatsby-cypress": "next",
"is-ci": "^2.0.0",
"prettier": "2.8.1",
"is-ci": "^3.0.1",
"prettier": "^2.8.1",
"start-server-and-test": "^1.14.0",
"typescript": "^4.9.4",
"yargs": "^12.0.5"
"yargs": "^17.6.2"
},
"repository": {
"type": "git",
Expand Down
15 changes: 9 additions & 6 deletions e2e-tests/mdx/gatsby-node.js → e2e-tests/mdx/gatsby-node.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const fs = require(`fs-extra`)
const path = require(`path`)
import fs from "fs-extra"
import path from "path"
import slugify from "@sindresorhus/slugify"
import { fileURLToPath } from "url"

const slugify = require(`@sindresorhus/slugify`)
const __dirname = path.dirname(fileURLToPath(import.meta.url))

exports.onPostBuild = async ({ graphql }) => {
export const onPostBuild = async ({ graphql }) => {
const results = await graphql(`
{
mdx(slug: { eq: "html" }) {
Expand All @@ -19,7 +21,7 @@ exports.onPostBuild = async ({ graphql }) => {
)
}

exports.createSchemaCustomization = ({ actions }) => {
export const createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions

createTypes(`
Expand All @@ -31,8 +33,9 @@ exports.createSchemaCustomization = ({ actions }) => {
}
`)
}

// Add custom fields to our MDX nodes
exports.onCreateNode = async ({ node, actions, getNode, reporter, cache }) => {
export const onCreateNode = async ({ node, actions, getNode, reporter, cache }) => {
const { createNodeField } = actions
if (node.internal.type === `Mdx`) {
// Set slug based on frontmatter, fall back to filename
Expand Down
10 changes: 5 additions & 5 deletions e2e-tests/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"version": "1.0.0",
"dependencies": {
"@mdx-js/react": "^2",
"@sindresorhus/slugify": "^1.0.0",
"@sindresorhus/slugify": "^2.1.1",
"cypress": "^9.7.0",
"fs-extra": "^8.1.0",
"fs-extra": "^11.1.0",
"gatsby": "next",
"gatsby-plugin-mdx": "next",
"gatsby-plugin-sharp": "next",
Expand Down Expand Up @@ -43,10 +43,10 @@
"update": "node scripts/update.js"
},
"devDependencies": {
"cross-env": "^5.2.1",
"cross-env": "^7.0.3",
"gatsby-cypress": "next",
"is-ci": "^2.0.0",
"prettier": "2.8.1",
"is-ci": "^3.0.1",
"prettier": "^2.8.1",
"start-server-and-test": "^1.14.0"
}
}
1 change: 1 addition & 0 deletions e2e-tests/path-prefix/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ yarn-error.log

# Cypress output
cypress/videos/
cypress/screenshots/
14 changes: 7 additions & 7 deletions e2e-tests/path-prefix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"prebuild": "del-cli -f assets && make-dir assets/blog",
"build": "cross-env CYPRESS_SUPPORT=y gatsby build --prefix-paths",
"postbuild": "cpy --cwd=./public --parents '**/*' '../assets/blog'",
"postbuild": "cpy . '../assets/blog' --cwd=./public",
"develop": "gatsby develop",
"format": "prettier --write '**/*.js'",
"test": "npm run build && npm run start-server-and-test",
Expand All @@ -37,16 +37,16 @@
"cy:run": "node ../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome"
},
"devDependencies": {
"cpy-cli": "^2.0.0",
"cross-env": "^5.2.1",
"del-cli": "^3.0.1",
"cpy-cli": "^4.2.0",
"cross-env": "^7.0.3",
"del-cli": "^5.0.0",
"gatsby-cypress": "next",
"is-ci": "^2.0.0",
"make-dir-cli": "^2.0.0",
"is-ci": "^3.0.1",
"make-dir-cli": "^3.0.0",
"npm-run-all": "^4.1.5",
"prettier": "2.8.1",
"start-server-and-test": "^1.14.0",
"wait-on": "^6.0.1"
"wait-on": "^7.0.1"
},
"repository": {
"type": "git",
Expand Down
10 changes: 5 additions & 5 deletions e2e-tests/production-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"gatsby-plugin-sharp": "next",
"gatsby-plugin-stylus": "next",
"gatsby-source-filesystem": "next",
"glob": "^7.1.3",
"glob": "^8.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.32.8",
Expand Down Expand Up @@ -56,12 +56,12 @@
},
"devDependencies": {
"@playwright/test": "^1.29.1",
"cross-env": "^5.2.1",
"cross-env": "^7.0.3",
"express": "^4.18.2",
"fs-extra": "^7.0.1",
"fs-extra": "^11.1.0",
"gatsby-core-utils": "next",
"is-ci": "^2.0.0",
"prettier": "2.8.1",
"is-ci": "^3.0.1",
"prettier": "^2.8.1",
"start-server-and-test": "^1.14.0"
},
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/themes/development-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"cy:run": "node ../../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome"
},
"devDependencies": {
"cross-env": "^5.2.1",
"cross-env": "^7.0.3",
"cypress": "^9.7.0",
"gatsby-cypress": "next",
"is-ci": "^2.0.0",
"prettier": "2.8.1",
"is-ci": "^3.0.1",
"prettier": "^2.8.1",
"start-server-and-test": "^1.14.0"
},
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/themes/production-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"cy:run": "node ../../../scripts/cypress-run-with-conditional-record-flag.js --browser chrome"
},
"devDependencies": {
"cross-env": "^5.2.1",
"cross-env": "^7.0.3",
"cypress": "^9.7.0",
"gatsby-cypress": "next",
"is-ci": "^2.0.0",
"prettier": "2.8.1",
"is-ci": "^3.0.1",
"prettier": "^2.8.1",
"start-server-and-test": "^1.14.0"
},
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/visual-regression/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"cy:clean-snapshots": "rimraf cypress/snapshots/*"
},
"devDependencies": {
"cross-env": "^5.2.1",
"cross-env": "^7.0.3",
"cypress-junit-reporter": "^1.3.1",
"gatsby-cypress": "next",
"is-ci": "^2.0.0",
"prettier": "2.8.1",
"is-ci": "^3.0.1",
"prettier": "^2.8.1",
"start-server-and-test": "^1.14.0"
},
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"packageManager": "yarn@1.22.19",
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/core": "^7.20.7",
"@babel/eslint-parser": "^7.19.1",
"@babel/eslint-plugin": "^7.19.1",
"@babel/node": "^7.15.4",
"@babel/plugin-transform-typescript": "^7.15.4",
"@babel/runtime": "^7.15.4",
"@babel/node": "^7.20.7",
"@babel/plugin-transform-typescript": "^7.20.7",
"@babel/runtime": "^7.20.7",
"@lerna/prompt": "3.18.5",
"@types/babel__code-frame": "^7.0.3",
"@types/better-queue": "^3.8.3",
Expand Down
14 changes: 7 additions & 7 deletions packages/babel-plugin-remove-graphql-queries/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-remove-graphql-queries",
"version": "5.4.0-next.1",
"version": "5.4.0-next.2",
"author": "Jason Quense <monastic.panic@gmail.com>",
"repository": {
"type": "git",
Expand All @@ -9,14 +9,14 @@
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-plugin-remove-graphql-queries#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@babel/types": "^7.15.4",
"gatsby-core-utils": "^4.4.0-next.1"
"@babel/runtime": "^7.20.7",
"@babel/types": "^7.20.7",
"gatsby-core-utils": "^4.4.0-next.2"
},
"devDependencies": {
"@babel/cli": "^7.15.4",
"@babel/core": "^7.15.5",
"babel-preset-gatsby-package": "^3.4.0-next.0",
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.7",
"babel-preset-gatsby-package": "^3.4.0-next.1",
"cross-env": "^7.0.3"
},
"peerDependencies": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions packages/babel-preset-gatsby-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-gatsby-package",
"version": "3.4.0-next.0",
"version": "3.4.0-next.1",
"author": "Philipp Spiess <hello@philippspiess.com>",
"repository": {
"type": "git",
Expand All @@ -9,24 +9,24 @@
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-preset-gatsby-package#readme",
"dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/plugin-transform-typescript": "^7.15.4",
"@babel/preset-env": "^7.15.4",
"@babel/preset-flow": "^7.14.0",
"@babel/preset-react": "^7.14.0",
"@babel/runtime": "^7.15.4",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/plugin-transform-typescript": "^7.20.7",
"@babel/preset-env": "^7.20.2",
"@babel/preset-flow": "^7.18.6",
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.20.7",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-lodash": "^3.3.4",
"core-js": "^3.22.3"
},
"devDependencies": {
"@babel/cli": "^7.15.4",
"@babel/core": "^7.15.5",
"@babel/helper-plugin-test-runner": "7.14.5",
"@babel/plugin-transform-modules-commonjs": "^7.15.4",
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.7",
"@babel/helper-plugin-test-runner": "7.18.6",
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@types/babel__core": "^7.1.20",
"cross-env": "^7.0.3"
},
Expand Down
26 changes: 13 additions & 13 deletions packages/babel-preset-gatsby/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-gatsby",
"version": "3.4.0-next.1",
"version": "3.4.0-next.2",
"author": "Philipp Spiess <hello@philippspiess.com>",
"repository": {
"type": "git",
Expand All @@ -9,20 +9,20 @@
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-preset-gatsby#readme",
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.14.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-classes": "^7.15.4",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/plugin-transform-spread": "^7.14.6",
"@babel/preset-env": "^7.15.4",
"@babel/preset-react": "^7.14.0",
"@babel/runtime": "^7.15.4",
"@babel/plugin-transform-classes": "^7.20.7",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/plugin-transform-spread": "^7.20.7",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.20.7",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"gatsby-core-utils": "^4.4.0-next.1",
"gatsby-core-utils": "^4.4.0-next.2",
"gatsby-legacy-polyfills": "^3.4.0-next.0"
},
"peerDependencies": {
Expand All @@ -37,8 +37,8 @@
"watch": "babel -w src --out-dir . --ignore \"**/__tests__\" --ignore \"**/utils/path-serializer.ts\" --extensions \".ts,.js\""
},
"devDependencies": {
"@babel/cli": "^7.15.4",
"babel-preset-gatsby-package": "^3.4.0-next.0",
"@babel/cli": "^7.20.7",
"babel-preset-gatsby-package": "^3.4.0-next.1",
"cross-env": "^7.0.3",
"slash": "^3.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/create-gatsby/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-gatsby",
"version": "3.4.0-next.1",
"version": "3.4.0-next.2",
"main": "lib/index.js",
"bin": "cli.js",
"license": "MIT",
Expand All @@ -26,7 +26,7 @@
"enquirer": "^2.3.6",
"execa": "^5.1.1",
"fs-extra": "^10.1.0",
"gatsby-plugin-utils": "^4.4.0-next.1",
"gatsby-plugin-utils": "^4.4.0-next.2",
"joi": "^17.7.0",
"microbundle": "^0.15.1",
"node-fetch": "^2.6.7",
Expand All @@ -41,6 +41,6 @@
},
"author": "Matt Kane <matt@gatsbyjs.com>",
"dependencies": {
"@babel/runtime": "^7.15.4"
"@babel/runtime": "^7.20.7"
}
}
Loading

0 comments on commit ce16ed1

Please sign in to comment.