diff --git a/package.json b/package.json index de37c8b9951d..22c94bae63e6 100644 --- a/package.json +++ b/package.json @@ -62,14 +62,14 @@ "@testing-library/user-event": "14.3.0", "@types/babel__generator": "7", "@types/fs-extra": "9.0.13", - "@types/jest": "27.5.2", + "@types/jest": "28.1.6", "@types/jscodeshift": "0.11.5", "@types/lodash.template": "4.5.1", "@types/ncp": "2.0.5", "@types/prompts": "2.4.0", "all-contributors-cli": "6.20.0", "ansi-colors": "4.1.3", - "babel-jest": "27.5.1", + "babel-jest": "28.1.3", "babel-plugin-auto-import": "1.1.0", "babel-plugin-remove-code": "0.0.6", "boxen": "5.1.2", @@ -80,7 +80,7 @@ "fast-glob": "3.2.11", "fs-extra": "10.1.0", "is-port-reachable": "3.1.0", - "jest": "27.5.1", + "jest": "28.1.3", "jscodeshift": "0.13.1", "lerna": "5.3.0", "lodash.template": "4.5.0", diff --git a/packages/api-server/package.json b/packages/api-server/package.json index 3ea5628757ff..75e48385570a 100644 --- a/packages/api-server/package.json +++ b/packages/api-server/package.json @@ -56,7 +56,7 @@ "@types/split2": "3.2.1", "@types/yargs": "17.0.11", "aws-lambda": "1.0.7", - "jest": "27.5.1", + "jest": "28.1.3", "typescript": "4.7.4" }, "gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1" diff --git a/packages/api/package.json b/packages/api/package.json index 8bb5ca110707..a1063f389aab 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -59,7 +59,7 @@ "@types/split2": "3.2.1", "@types/uuid": "8.3.4", "aws-lambda": "1.0.7", - "jest": "27.5.1", + "jest": "28.1.3", "split2": "4.1.0", "typescript": "4.7.4" }, diff --git a/packages/auth/package.json b/packages/auth/package.json index 86709daa43e3..e04dba2de0fd 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -46,7 +46,7 @@ "firebase": "9.9.2", "firebase-admin": "10.3.0", "gotrue-js": "0.9.29", - "jest": "27.5.1", + "jest": "28.1.3", "magic-sdk": "8.1.1", "netlify-identity-widget": "1.9.2", "react": "17.0.2", diff --git a/packages/cli/package.json b/packages/cli/package.json index dd0f15849d42..2fdc7cb42356 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -69,7 +69,7 @@ "@babel/cli": "7.16.7", "@babel/core": "7.16.7", "@types/listr": "0.14.4", - "jest": "27.5.1", + "jest": "28.1.3", "typescript": "4.7.4" }, "gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1" diff --git a/packages/cli/src/commands/generate/component/__tests__/__snapshots__/component.test.ts.snap b/packages/cli/src/commands/generate/component/__tests__/__snapshots__/component.test.ts.snap index 8986b6d9f85d..e9a3ce3ff9de 100644 --- a/packages/cli/src/commands/generate/component/__tests__/__snapshots__/component.test.ts.snap +++ b/packages/cli/src/commands/generate/component/__tests__/__snapshots__/component.test.ts.snap @@ -37,6 +37,7 @@ exports[`creates a multi word component 1`] = ` return (

{'UserProfile'}

+

{'Find me in ./web/src/components/UserProfile/UserProfile.js'}

) @@ -80,6 +81,7 @@ exports[`creates a single word component 1`] = ` return (

{'User'}

+

{'Find me in ./web/src/components/User/User.js'}

) diff --git a/packages/cli/src/commands/generate/layout/__tests__/__snapshots__/layout.test.ts.snap b/packages/cli/src/commands/generate/layout/__tests__/__snapshots__/layout.test.ts.snap index 40f5c2262e88..730e4506b0bf 100644 --- a/packages/cli/src/commands/generate/layout/__tests__/__snapshots__/layout.test.ts.snap +++ b/packages/cli/src/commands/generate/layout/__tests__/__snapshots__/layout.test.ts.snap @@ -14,10 +14,15 @@ const A11yLayout = ({ children }) => { return ( <> {/* renders a link that remains hidden till focused; put it at the top of your layout */} + + + {/* renders a div as the target for the link; put it next to your main content */} + +
{children}
) diff --git a/packages/cli/src/commands/generate/page/__tests__/__snapshots__/page.test.js.snap b/packages/cli/src/commands/generate/page/__tests__/__snapshots__/page.test.js.snap index b10b103973b9..e37e3ac2340f 100644 --- a/packages/cli/src/commands/generate/page/__tests__/__snapshots__/page.test.js.snap +++ b/packages/cli/src/commands/generate/page/__tests__/__snapshots__/page.test.js.snap @@ -10,12 +10,16 @@ const HomePage = () => {

HomePage

+

- Find me in ./web/src/pages/HomePage/HomePage.js + Find me in + ./web/src/pages/HomePage/HomePage.js

+

- My default route is named home, link to me with \` - Home\` + My default route is named + home, link to me with \`Home + \`

) @@ -35,11 +39,15 @@ const ContactUsPage = () => {

ContactUsPage

+

- Find me in ./web/src/pages/ContactUsPage/ContactUsPage.js + Find me in + ./web/src/pages/ContactUsPage/ContactUsPage.js

+

- My default route is named contactUs, link to me with \` + My default route is named + contactUs, link to me with \` ContactUs\`

@@ -60,12 +68,16 @@ const CatsPage = () => {

CatsPage

+

- Find me in ./web/src/pages/CatsPage/CatsPage.js + Find me in + ./web/src/pages/CatsPage/CatsPage.js

+

- My default route is named cats, link to me with \` - Cats\` + My default route is named + cats, link to me with \`Cats + \`

) @@ -85,13 +97,18 @@ const PostPage = ({ id }) => {

PostPage

+

- Find me in ./web/src/pages/PostPage/PostPage.js + Find me in + ./web/src/pages/PostPage/PostPage.js

+

- My default route is named post, link to me with \` + My default route is named + post, link to me with \` Post 42\`

+

The parameter passed to me is {id}

) @@ -223,12 +240,16 @@ const HomePage = () => {

HomePage

+

- Find me in ./web/src/pages/HomePage/HomePage.js + Find me in + ./web/src/pages/HomePage/HomePage.js

+

- My default route is named home, link to me with \` - Home\` + My default route is named + home, link to me with \`Home + \`

) @@ -305,13 +326,18 @@ const PostPage = ({ id }) => {

PostPage

+

- Find me in ./web/src/pages/PostPage/PostPage.js + Find me in + ./web/src/pages/PostPage/PostPage.js

+

- My default route is named post, link to me with \` + My default route is named + post, link to me with \` Post 42\`

+

The parameter passed to me is {id}

) diff --git a/packages/cli/src/commands/generate/scaffold/__tests__/__snapshots__/scaffold.test.js.snap b/packages/cli/src/commands/generate/scaffold/__tests__/__snapshots__/scaffold.test.js.snap index 102fbeff2665..9dbdffb66627 100644 --- a/packages/cli/src/commands/generate/scaffold/__tests__/__snapshots__/scaffold.test.js.snap +++ b/packages/cli/src/commands/generate/scaffold/__tests__/__snapshots__/scaffold.test.js.snap @@ -292,16 +292,19 @@ const PostsLayout = ({ children }) => { return (
+

Posts

+
+
New Post
+
{children}
) @@ -346,6 +349,7 @@ const NewPost = () => {

New Post

+
@@ -395,6 +399,7 @@ const NewUserProfile = () => {

New UserProfile

+
@@ -524,66 +529,82 @@ const Post = ({ post }) => {

- Post {post?.id} Detail + Post + {post?.id} Detail

+ + + + + + + + + + + + + +
Id{post.id}
Title{post.title}
Slug{post.slug}
Author{post.author}
Body{post.body}
Image{post.image}
Posted at{timeTag(post.postedAt)}
Is pinned{checkboxInputTag(post.isPinned)}
Read time{post.readTime}
Rating{post.rating}
Upvotes{post.upvotes}
Metadata{jsonDisplay(post.metadata)}
Huge number{post.hugeNumber}
+