Skip to content

Commit

Permalink
fix(deps): update jest monorepo to v29 (major) (#6296)
Browse files Browse the repository at this point in the history
* fix(deps): update jest monorepo to v29

* rm snapshot format in presets

* update snapshots

* try removing res in test project

* add back resolution, bump to 29

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dominic Saadi <[email protected]>
  • Loading branch information
renovate[bot] and jtoar authored Aug 26, 2022
1 parent d3b3c14 commit 65c1a7c
Show file tree
Hide file tree
Showing 43 changed files with 1,501 additions and 1,357 deletions.
2 changes: 1 addition & 1 deletion __fixtures__/test-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
},
"packageManager": "[email protected]",
"resolutions": {
"jest": "28.1.3"
"jest": "29.0.0"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@types/prompts": "2.4.0",
"all-contributors-cli": "6.20.0",
"ansi-colors": "4.1.3",
"babel-jest": "28.1.3",
"babel-jest": "29.0.0",
"babel-plugin-auto-import": "1.1.0",
"babel-plugin-remove-code": "0.0.6",
"boxen": "5.1.2",
Expand All @@ -80,7 +80,7 @@
"fast-glob": "3.2.11",
"fs-extra": "10.1.0",
"is-port-reachable": "3.1.0",
"jest": "28.1.3",
"jest": "29.0.0",
"jscodeshift": "0.13.1",
"lerna": "5.4.3",
"lodash.template": "4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@types/split2": "3.2.1",
"@types/yargs": "17.0.11",
"aws-lambda": "1.0.7",
"jest": "28.1.3",
"jest": "29.0.0",
"typescript": "4.7.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/split2": "3.2.1",
"@types/uuid": "8.3.4",
"aws-lambda": "1.0.7",
"jest": "28.1.3",
"jest": "29.0.0",
"split2": "4.1.0",
"typescript": "4.7.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"firebase": "9.9.3",
"firebase-admin": "10.3.0",
"gotrue-js": "0.9.29",
"jest": "28.1.3",
"jest": "29.0.0",
"magic-sdk": "9.0.0",
"netlify-identity-widget": "1.9.2",
"react": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@babel/cli": "7.18.10",
"@babel/core": "7.18.13",
"@types/listr": "0.14.4",
"jest": "28.1.3",
"jest": "29.0.0",
"typescript": "4.7.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/__tests__/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ afterEach(() => jest.clearAllMocks())
test('the build tasks are in the correct sequence', async () => {
await handler({})
expect(Listr.mock.calls[0][0].map((x) => x.title)).toMatchInlineSnapshot(`
Array [
[
"Generating Prisma Client...",
"Verifying graphql schema...",
"Building API...",
Expand All @@ -61,7 +61,7 @@ test('Should run prerender for web', async () => {

await handler({ side: ['web'], prerender: true })
expect(Listr.mock.calls[0][0].map((x) => x.title)).toMatchInlineSnapshot(`
Array [
[
"Cleaning Web...",
"Building Web...",
]
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/__tests__/dev.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('yarn rw dev', () => {
)

expect(apiCommand.command).toMatchInlineSnapshot(
`"yarn cross-env NODE_ENV=development NODE_OPTIONS=--enable-source-maps yarn nodemon --quiet --watch \\"/mocked/project/redwood.toml\\" --exec \\"yarn rw-api-server-watch --debug-port 18911 | rw-log-formatter\\""`
`"yarn cross-env NODE_ENV=development NODE_OPTIONS=--enable-source-maps yarn nodemon --quiet --watch "/mocked/project/redwood.toml" --exec "yarn rw-api-server-watch --debug-port 18911 | rw-log-formatter""`
)

expect(generateCommand.command).toEqual('yarn rw-gen-watch')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default async ({ db }: { db: PrismaClient }) => {

exports[`creates a JS file with expected contents 1`] = `
"/**
* @typedef { import(\\"@prisma/client\\").PrismaClient } PrismaClient
* @typedef { import("@prisma/client").PrismaClient } PrismaClient
* @param {{db: PrismaClient}} db
*/
export default async ({ db }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ exports[`creates a JavaScript validator directive: js directive 1`] = `
import { logger } from 'src/lib/logger'
export const schema = gql\`
\\"\\"\\"
"""
Use @requireAdmin to validate access to a field, query or mutation.
\\"\\"\\"
"""
directive @requireAdmin on FIELD_DEFINITION
\`
Expand Down Expand Up @@ -72,9 +72,9 @@ exports[`creates a TypeScript transformer directive: ts directive 1`] = `
import { logger } from 'src/lib/logger'
export const schema = gql\`
\\"\\"\\"
"""
Use @bazingaFooBar to transform the resolved value to return a modified result.
\\"\\"\\"
"""
directive @bazingaFooBar on FIELD_DEFINITION
\`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const handler = async (event, context) => {
exports[`creates a single word function file: Scenario snapshot 1`] = `
"export const standard = defineScenario({
// Define the \\"fixture\\" to write into your test database here
// Define the "fixture" to write into your test database here
// See guide: https://redwoodjs.com/docs/testing#scenarios
})
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MetaTags } from '@redwoodjs/web'
const HomePage = () => {
return (
<>
<MetaTags title=\\"Home\\" description=\\"Home page\\" />
<MetaTags title="Home" description="Home page" />
<h1>HomePage</h1>
<p>
Expand All @@ -32,7 +32,7 @@ import { MetaTags } from '@redwoodjs/web'
const ContactUsPage = () => {
return (
<>
<MetaTags title=\\"ContactUs\\" description=\\"ContactUs page\\" />
<MetaTags title="ContactUs" description="ContactUs page" />
<h1>ContactUsPage</h1>
<p>
Expand All @@ -57,7 +57,7 @@ import { MetaTags } from '@redwoodjs/web'
const CatsPage = () => {
return (
<>
<MetaTags title=\\"Cats\\" description=\\"Cats page\\" />
<MetaTags title="Cats" description="Cats page" />
<h1>CatsPage</h1>
<p>
Expand All @@ -82,7 +82,7 @@ import { MetaTags } from '@redwoodjs/web'
const PostPage = ({ id }) => {
return (
<>
<MetaTags title=\\"Post\\" description=\\"Post page\\" />
<MetaTags title="Post" description="Post page" />
<h1>PostPage</h1>
<p>
Expand Down Expand Up @@ -178,7 +178,7 @@ describe('PostPage', () => {
`;

exports[`file generation 1`] = `
Object {
{
"fileContent": "import HomePage from './HomePage'
export const generated = (args) => {
Expand All @@ -192,7 +192,7 @@ export default { title: 'Pages/HomePage' }
`;

exports[`file generation 2`] = `
Object {
{
"fileContent": "import { render } from '@redwoodjs/testing/web'
import HomePage from './HomePage'
Expand All @@ -213,14 +213,14 @@ describe('HomePage', () => {
`;

exports[`file generation 3`] = `
Object {
{
"fileContent": "import { Link, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
const HomePage = () => {
return (
<>
<MetaTags title=\\"Home\\" description=\\"Home page\\" />
<MetaTags title="Home" description="Home page" />
<h1>HomePage</h1>
<p>
Expand All @@ -241,14 +241,14 @@ export default HomePage
`;

exports[`file generation 4`] = `
Object {
{
"fileContent": "import { Router, Route } from '@redwoodjs/router'
const Routes = () => {
return (
<Router>
<Route path=\\"/home\\" page={HomePage} name=\\"home\\" />
<Route path=\\"/about\\" page={AboutPage} name=\\"about\\" />
<Route path="/home" page={HomePage} name="home" />
<Route path="/about" page={AboutPage} name="about" />
<Route notfound page={NotFoundPage} />
</Router>
)
Expand All @@ -260,7 +260,7 @@ export default Routes",
`;

exports[`file generation with route params 1`] = `
Object {
{
"fileContent": "import PostPage from './PostPage'
export const generated = (args) => {
Expand All @@ -274,7 +274,7 @@ export default { title: 'Pages/PostPage' }
`;

exports[`file generation with route params 2`] = `
Object {
{
"fileContent": "import { render } from '@redwoodjs/testing/web'
import PostPage from './PostPage'
Expand All @@ -295,14 +295,14 @@ describe('PostPage', () => {
`;

exports[`file generation with route params 3`] = `
Object {
{
"fileContent": "import { Link, routes } from '@redwoodjs/router'
import { MetaTags } from '@redwoodjs/web'
const PostPage = ({ id }) => {
return (
<>
<MetaTags title=\\"Post\\" description=\\"Post page\\" />
<MetaTags title="Post" description="Post page" />
<h1>PostPage</h1>
<p>
Expand All @@ -324,14 +324,14 @@ export default PostPage
`;

exports[`file generation with route params 4`] = `
Object {
{
"fileContent": "import { Router, Route } from '@redwoodjs/router'
const Routes = () => {
return (
<Router>
<Route path=\\"/post/{id}\\" page={PostPage} name=\\"post\\" />
<Route path=\\"/about\\" page={AboutPage} name=\\"about\\" />
<Route path="/post/{id}" page={PostPage} name="post" />
<Route path="/about" page={AboutPage} name="about" />
<Route notfound page={NotFoundPage} />
</Router>
)
Expand Down Expand Up @@ -384,7 +384,7 @@ type TsParamFilesPageProps = {
const TsParamFilesPage = ({ id }: TsParamFilesPageProps) => {
return (
<>
<MetaTags title=\\"TsParamFiles\\" description=\\"TsParamFiles page\\" />
<MetaTags title="TsParamFiles" description="TsParamFiles page" />
<h1>TsParamFilesPage</h1>
<p>
Expand Down Expand Up @@ -414,7 +414,7 @@ type TsParamTypeFilesPageProps = {
const TsParamTypeFilesPage = ({ id }: TsParamTypeFilesPageProps) => {
return (
<>
<MetaTags title=\\"TsParamTypeFiles\\" description=\\"TsParamTypeFiles page\\" />
<MetaTags title="TsParamTypeFiles" description="TsParamTypeFiles page" />
<h1>TsParamTypeFilesPage</h1>
<p>
Expand Down
Loading

0 comments on commit 65c1a7c

Please sign in to comment.