Skip to content

Commit 5d58626

Browse files
authoredFeb 9, 2021
Upgrade packages for example/with-typescript-eslint-jest (#21963)
1 parent 6369981 commit 5d58626

File tree

3 files changed

+58
-44
lines changed

3 files changed

+58
-44
lines changed
 

‎examples/with-typescript-eslint-jest/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@
3131
"react-dom": "^17.0.1"
3232
},
3333
"devDependencies": {
34-
"@testing-library/react": "^10.0.1",
35-
"@types/jest": "^25.1.4",
36-
"@types/node": "^13.9.5",
37-
"@types/react": "^16.9.27",
38-
"@typescript-eslint/eslint-plugin": "^2.25.0",
39-
"@typescript-eslint/parser": "^2.25.0",
40-
"babel-jest": "^25.2.3",
41-
"eslint": "^6.8.0",
42-
"eslint-config-prettier": "^6.10.1",
34+
"@testing-library/react": "^11.2.5",
35+
"@types/jest": "^26.0.20",
36+
"@types/node": "^14.14.25",
37+
"@types/react": "^17.0.1",
38+
"@typescript-eslint/eslint-plugin": "^4.14.2",
39+
"@typescript-eslint/parser": "^4.14.2",
40+
"babel-jest": "^26.6.3",
41+
"eslint": "^7.19.0",
42+
"eslint-config-prettier": "^7.2.0",
4343
"eslint-plugin-react": "^7.19.0",
4444
"husky": "^4.2.3",
4545
"identity-obj-proxy": "^3.0.0",
46-
"jest": "^25.2.3",
47-
"jest-watch-typeahead": "^0.5.0",
46+
"jest": "^26.6.3",
47+
"jest-watch-typeahead": "^0.6.1",
4848
"lint-staged": "^10.0.10",
4949
"prettier": "^2.0.2",
50-
"typescript": "^3.8.3"
50+
"typescript": "^4.1.3"
5151
}
5252
}

‎examples/with-typescript-eslint-jest/pages/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Head from 'next/head'
2+
import Image from 'next/image'
23

34
export const Home = (): JSX.Element => (
45
<div className="container">
@@ -59,7 +60,8 @@ export const Home = (): JSX.Element => (
5960
target="_blank"
6061
rel="noopener noreferrer"
6162
>
62-
Powered by <img src="/vercel.svg" alt="Vercel Logo" className="logo" />
63+
Powered by{' '}
64+
<Image src="/vercel.svg" alt="Vercel Logo" height={'32'} width={'64'} />
6365
</a>
6466
</footer>
6567

@@ -182,10 +184,6 @@ export const Home = (): JSX.Element => (
182184
line-height: 1.5;
183185
}
184186
185-
.logo {
186-
height: 1em;
187-
}
188-
189187
@media (max-width: 600px) {
190188
.grid {
191189
width: 100%;

‎examples/with-typescript-eslint-jest/test/pages/__snapshots__/index.test.tsx.snap

+43-27
Original file line numberDiff line numberDiff line change
@@ -3,117 +3,133 @@
33
exports[`Home page matches snapshot 1`] = `
44
<DocumentFragment>
55
<div
6-
class="jsx-2250570153 container"
6+
class="jsx-1276654382 container"
77
>
88
<main
9-
class="jsx-2250570153"
9+
class="jsx-1276654382"
1010
>
1111
<h1
12-
class="jsx-2250570153 title"
12+
class="jsx-1276654382 title"
1313
>
1414
Welcome to
1515
<a
16-
class="jsx-2250570153"
16+
class="jsx-1276654382"
1717
href="https://nextjs.org"
1818
>
1919
Next.js!
2020
</a>
2121
</h1>
2222
<p
23-
class="jsx-2250570153 description"
23+
class="jsx-1276654382 description"
2424
>
2525
Get started by editing
2626
<code
27-
class="jsx-2250570153"
27+
class="jsx-1276654382"
2828
>
2929
pages/index.tsx
3030
</code>
3131
</p>
3232
<button
33-
class="jsx-2250570153"
33+
class="jsx-1276654382"
3434
>
3535
Test Button
3636
</button>
3737
<div
38-
class="jsx-2250570153 grid"
38+
class="jsx-1276654382 grid"
3939
>
4040
<a
41-
class="jsx-2250570153 card"
41+
class="jsx-1276654382 card"
4242
href="https://nextjs.org/docs"
4343
>
4444
<h3
45-
class="jsx-2250570153"
45+
class="jsx-1276654382"
4646
>
4747
Documentation →
4848
</h3>
4949
<p
50-
class="jsx-2250570153"
50+
class="jsx-1276654382"
5151
>
5252
Find in-depth information about Next.js features and API.
5353
</p>
5454
</a>
5555
<a
56-
class="jsx-2250570153 card"
56+
class="jsx-1276654382 card"
5757
href="https://nextjs.org/learn"
5858
>
5959
<h3
60-
class="jsx-2250570153"
60+
class="jsx-1276654382"
6161
>
6262
Learn →
6363
</h3>
6464
<p
65-
class="jsx-2250570153"
65+
class="jsx-1276654382"
6666
>
6767
Learn about Next.js in an interactive course with quizzes!
6868
</p>
6969
</a>
7070
<a
71-
class="jsx-2250570153 card"
71+
class="jsx-1276654382 card"
7272
href="https://github.com/vercel/next.js/tree/master/examples"
7373
>
7474
<h3
75-
class="jsx-2250570153"
75+
class="jsx-1276654382"
7676
>
7777
Examples →
7878
</h3>
7979
<p
80-
class="jsx-2250570153"
80+
class="jsx-1276654382"
8181
>
8282
Discover and deploy boilerplate example Next.js projects.
8383
</p>
8484
</a>
8585
<a
86-
class="jsx-2250570153 card"
86+
class="jsx-1276654382 card"
8787
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
8888
>
8989
<h3
90-
class="jsx-2250570153"
90+
class="jsx-1276654382"
9191
>
9292
Deploy →
9393
</h3>
9494
<p
95-
class="jsx-2250570153"
95+
class="jsx-1276654382"
9696
>
9797
Instantly deploy your Next.js site to a public URL with Vercel.
9898
</p>
9999
</a>
100100
</div>
101101
</main>
102102
<footer
103-
class="jsx-2250570153"
103+
class="jsx-1276654382"
104104
>
105105
<a
106-
class="jsx-2250570153"
106+
class="jsx-1276654382"
107107
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
108108
rel="noopener noreferrer"
109109
target="_blank"
110110
>
111111
Powered by
112-
<img
113-
alt="Vercel Logo"
114-
class="jsx-2250570153 logo"
115-
src="/vercel.svg"
116-
/>
112+
<div
113+
style="display: inline-block; max-width: 100%; overflow: hidden; position: relative; box-sizing: border-box; margin: 0px;"
114+
>
115+
<div
116+
style="box-sizing: border-box; display: block; max-width: 100%;"
117+
>
118+
<img
119+
alt=""
120+
aria-hidden="true"
121+
role="presentation"
122+
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+"
123+
style="max-width: 100%; display: block; margin: 0px; padding: 0px;"
124+
/>
125+
</div>
126+
<img
127+
alt="Vercel Logo"
128+
decoding="async"
129+
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
130+
style="visibility: hidden; position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; box-sizing: border-box; padding: 0px; margin: auto; display: block; width: 0px; height: 0px; min-width: 100%; max-width: 100%; min-height: 100%; max-height: 100%;"
131+
/>
132+
</div>
117133
</a>
118134
</footer>
119135
</div>

0 commit comments

Comments
 (0)
Please sign in to comment.