Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update e2e tests (major) #37289

Merged
merged 7 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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