Skip to content

Commit 5a32096

Browse files
snitin315alexander-akait
authored andcommitted
chore: update snapshots & fix ci failures (#4875)
1 parent 29bbdf9 commit 5a32096

File tree

2 files changed

+71
-66
lines changed

2 files changed

+71
-66
lines changed

lib/Server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,11 @@ class Server {
18881888
/** @type {import("webpack-dev-middleware").API<Request, Response>}*/
18891889
(middleware).waitUntilValid((stats) => {
18901890
res.setHeader("Content-Type", "text/html");
1891+
// HEAD requests should not return body content
1892+
if (req.method === "HEAD") {
1893+
res.end();
1894+
return;
1895+
}
18911896
res.write(
18921897
'<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body>'
18931898
);

test/e2e/__snapshots__/overlay.test.js.snap.webpack5

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,8 +2155,8 @@ exports[`overlay should show an error when "client.overlay.warnings" is "true":
21552155
exports[`overlay should show error for uncaught promise rejection: overlay html 1`] = `
21562156
"<body>
21572157
<div
2158-
id=\\"webpack-dev-server-client-overlay-div\\"
2159-
style=\\"
2158+
id="webpack-dev-server-client-overlay-div"
2159+
style="
21602160
position: fixed;
21612161
box-sizing: border-box;
21622162
inset: 0px;
@@ -2169,10 +2169,10 @@ exports[`overlay should show error for uncaught promise rejection: overlay html
21692169
overflow: auto;
21702170
background-color: rgba(0, 0, 0, 0.9);
21712171
color: white;
2172-
\\"
2172+
"
21732173
>
21742174
<div
2175-
style=\\"
2175+
style="
21762176
color: rgb(232, 59, 70);
21772177
font-size: 2em;
21782178
white-space: pre-wrap;
@@ -2181,13 +2181,13 @@ exports[`overlay should show error for uncaught promise rejection: overlay html
21812181
flex: 0 0 auto;
21822182
max-height: 50%;
21832183
overflow: auto;
2184-
\\"
2184+
"
21852185
>
21862186
Uncaught runtime errors:
21872187
</div>
21882188
<button
2189-
aria-label=\\"Dismiss\\"
2190-
style=\\"
2189+
aria-label="Dismiss"
2190+
style="
21912191
color: rgb(255, 255, 255);
21922192
line-height: 1rem;
21932193
font-size: 1.5rem;
@@ -2198,34 +2198,34 @@ exports[`overlay should show error for uncaught promise rejection: overlay html
21982198
top: 0px;
21992199
background-color: transparent;
22002200
border: none;
2201-
\\"
2201+
"
22022202
>
22032203
×
22042204
</button>
22052205
<div>
22062206
<div
2207-
style=\\"
2207+
style="
22082208
background-color: rgba(206, 17, 38, 0.1);
22092209
color: rgb(252, 207, 207);
22102210
padding: 1rem 1rem 1.5rem;
2211-
\\"
2211+
"
22122212
>
22132213
<div
2214-
style=\\"
2214+
style="
22152215
color: rgb(232, 59, 70);
22162216
font-size: 1.2em;
22172217
margin-bottom: 1rem;
22182218
font-family: sans-serif;
2219-
\\"
2219+
"
22202220
>
22212221
ERROR
22222222
</div>
22232223
<div
2224-
style=\\"
2224+
style="
22252225
line-height: 1.5;
22262226
font-size: 1rem;
22272227
font-family: Menlo, Consolas, monospace;
2228-
\\"
2228+
"
22292229
>
22302230
Async error at &lt;anonymous&gt;:3:26
22312231
</div>
@@ -2239,8 +2239,8 @@ exports[`overlay should show error for uncaught promise rejection: overlay html
22392239
exports[`overlay should show error for uncaught runtime error: overlay html 1`] = `
22402240
"<body>
22412241
<div
2242-
id=\\"webpack-dev-server-client-overlay-div\\"
2243-
style=\\"
2242+
id="webpack-dev-server-client-overlay-div"
2243+
style="
22442244
position: fixed;
22452245
box-sizing: border-box;
22462246
inset: 0px;
@@ -2253,10 +2253,10 @@ exports[`overlay should show error for uncaught runtime error: overlay html 1`]
22532253
overflow: auto;
22542254
background-color: rgba(0, 0, 0, 0.9);
22552255
color: white;
2256-
\\"
2256+
"
22572257
>
22582258
<div
2259-
style=\\"
2259+
style="
22602260
color: rgb(232, 59, 70);
22612261
font-size: 2em;
22622262
white-space: pre-wrap;
@@ -2265,13 +2265,13 @@ exports[`overlay should show error for uncaught runtime error: overlay html 1`]
22652265
flex: 0 0 auto;
22662266
max-height: 50%;
22672267
overflow: auto;
2268-
\\"
2268+
"
22692269
>
22702270
Uncaught runtime errors:
22712271
</div>
22722272
<button
2273-
aria-label=\\"Dismiss\\"
2274-
style=\\"
2273+
aria-label="Dismiss"
2274+
style="
22752275
color: rgb(255, 255, 255);
22762276
line-height: 1rem;
22772277
font-size: 1.5rem;
@@ -2282,34 +2282,34 @@ exports[`overlay should show error for uncaught runtime error: overlay html 1`]
22822282
top: 0px;
22832283
background-color: transparent;
22842284
border: none;
2285-
\\"
2285+
"
22862286
>
22872287
×
22882288
</button>
22892289
<div>
22902290
<div
2291-
style=\\"
2291+
style="
22922292
background-color: rgba(206, 17, 38, 0.1);
22932293
color: rgb(252, 207, 207);
22942294
padding: 1rem 1rem 1.5rem;
2295-
\\"
2295+
"
22962296
>
22972297
<div
2298-
style=\\"
2298+
style="
22992299
color: rgb(232, 59, 70);
23002300
font-size: 1.2em;
23012301
margin-bottom: 1rem;
23022302
font-family: sans-serif;
2303-
\\"
2303+
"
23042304
>
23052305
ERROR
23062306
</div>
23072307
<div
2308-
style=\\"
2308+
style="
23092309
line-height: 1.5;
23102310
font-size: 1rem;
23112311
font-family: Menlo, Consolas, monospace;
2312-
\\"
2312+
"
23132313
>
23142314
Injected error at throwError (&lt;anonymous&gt;:2:15) at
23152315
&lt;anonymous&gt;:3:9 at addScriptContent
@@ -2325,8 +2325,8 @@ exports[`overlay should show error for uncaught runtime error: overlay html 1`]
23252325
exports[`overlay should show error when it is not filtered: overlay html 1`] = `
23262326
"<body>
23272327
<div
2328-
id=\\"webpack-dev-server-client-overlay-div\\"
2329-
style=\\"
2328+
id="webpack-dev-server-client-overlay-div"
2329+
style="
23302330
position: fixed;
23312331
box-sizing: border-box;
23322332
inset: 0px;
@@ -2339,10 +2339,10 @@ exports[`overlay should show error when it is not filtered: overlay html 1`] = `
23392339
overflow: auto;
23402340
background-color: rgba(0, 0, 0, 0.9);
23412341
color: white;
2342-
\\"
2342+
"
23432343
>
23442344
<div
2345-
style=\\"
2345+
style="
23462346
color: rgb(232, 59, 70);
23472347
font-size: 2em;
23482348
white-space: pre-wrap;
@@ -2351,13 +2351,13 @@ exports[`overlay should show error when it is not filtered: overlay html 1`] = `
23512351
flex: 0 0 auto;
23522352
max-height: 50%;
23532353
overflow: auto;
2354-
\\"
2354+
"
23552355
>
23562356
Compiled with problems:
23572357
</div>
23582358
<button
2359-
aria-label=\\"Dismiss\\"
2360-
style=\\"
2359+
aria-label="Dismiss"
2360+
style="
23612361
color: rgb(255, 255, 255);
23622362
line-height: 1rem;
23632363
font-size: 1.5rem;
@@ -2368,34 +2368,34 @@ exports[`overlay should show error when it is not filtered: overlay html 1`] = `
23682368
top: 0px;
23692369
background-color: transparent;
23702370
border: none;
2371-
\\"
2371+
"
23722372
>
23732373
×
23742374
</button>
23752375
<div>
23762376
<div
2377-
style=\\"
2377+
style="
23782378
background-color: rgba(206, 17, 38, 0.1);
23792379
color: rgb(252, 207, 207);
23802380
padding: 1rem 1rem 1.5rem;
2381-
\\"
2381+
"
23822382
>
23832383
<div
2384-
style=\\"
2384+
style="
23852385
color: rgb(232, 59, 70);
23862386
font-size: 1.2em;
23872387
margin-bottom: 1rem;
23882388
font-family: sans-serif;
2389-
\\"
2389+
"
23902390
>
23912391
ERROR
23922392
</div>
23932393
<div
2394-
style=\\"
2394+
style="
23952395
line-height: 1.5;
23962396
font-size: 1rem;
23972397
font-family: Menlo, Consolas, monospace;
2398-
\\"
2398+
"
23992399
>
24002400
Unfiltered error
24012401
</div>
@@ -2409,19 +2409,19 @@ exports[`overlay should show error when it is not filtered: overlay html 1`] = `
24092409
exports[`overlay should show error when it is not filtered: page html 1`] = `
24102410
"<body>
24112411
<h1>webpack-dev-server is running...</h1>
2412-
<script type=\\"text/javascript\\" charset=\\"utf-8\\" src=\\"/main.js\\"></script>
2412+
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
24132413

24142414
<iframe
2415-
id=\\"webpack-dev-server-client-overlay\\"
2416-
src=\\"about:blank\\"
2417-
style=\\"
2415+
id="webpack-dev-server-client-overlay"
2416+
src="about:blank"
2417+
style="
24182418
position: fixed;
24192419
inset: 0px;
24202420
width: 100vw;
24212421
height: 100vh;
24222422
border: none;
24232423
z-index: 2147483647;
2424-
\\"
2424+
"
24252425
></iframe>
24262426
</body>
24272427
"
@@ -2535,8 +2535,8 @@ exports[`overlay should show overlay when Trusted Types are enabled: page html 1
25352535
exports[`overlay should show warning when it is not filtered: overlay html 1`] = `
25362536
"<body>
25372537
<div
2538-
id=\\"webpack-dev-server-client-overlay-div\\"
2539-
style=\\"
2538+
id="webpack-dev-server-client-overlay-div"
2539+
style="
25402540
position: fixed;
25412541
box-sizing: border-box;
25422542
inset: 0px;
@@ -2549,10 +2549,10 @@ exports[`overlay should show warning when it is not filtered: overlay html 1`] =
25492549
overflow: auto;
25502550
background-color: rgba(0, 0, 0, 0.9);
25512551
color: white;
2552-
\\"
2552+
"
25532553
>
25542554
<div
2555-
style=\\"
2555+
style="
25562556
color: rgb(232, 59, 70);
25572557
font-size: 2em;
25582558
white-space: pre-wrap;
@@ -2561,13 +2561,13 @@ exports[`overlay should show warning when it is not filtered: overlay html 1`] =
25612561
flex: 0 0 auto;
25622562
max-height: 50%;
25632563
overflow: auto;
2564-
\\"
2564+
"
25652565
>
25662566
Compiled with problems:
25672567
</div>
25682568
<button
2569-
aria-label=\\"Dismiss\\"
2570-
style=\\"
2569+
aria-label="Dismiss"
2570+
style="
25712571
color: rgb(255, 255, 255);
25722572
line-height: 1rem;
25732573
font-size: 1.5rem;
@@ -2578,34 +2578,34 @@ exports[`overlay should show warning when it is not filtered: overlay html 1`] =
25782578
top: 0px;
25792579
background-color: transparent;
25802580
border: none;
2581-
\\"
2581+
"
25822582
>
25832583
×
25842584
</button>
25852585
<div>
25862586
<div
2587-
style=\\"
2587+
style="
25882588
background-color: rgba(251, 245, 180, 0.1);
25892589
color: rgb(251, 245, 180);
25902590
padding: 1rem 1rem 1.5rem;
2591-
\\"
2591+
"
25922592
>
25932593
<div
2594-
style=\\"
2594+
style="
25952595
color: rgb(232, 59, 70);
25962596
font-size: 1.2em;
25972597
margin-bottom: 1rem;
25982598
font-family: sans-serif;
2599-
\\"
2599+
"
26002600
>
26012601
WARNING
26022602
</div>
26032603
<div
2604-
style=\\"
2604+
style="
26052605
line-height: 1.5;
26062606
font-size: 1rem;
26072607
font-family: Menlo, Consolas, monospace;
2608-
\\"
2608+
"
26092609
>
26102610
Unfiltered warning
26112611
</div>
@@ -2619,19 +2619,19 @@ exports[`overlay should show warning when it is not filtered: overlay html 1`] =
26192619
exports[`overlay should show warning when it is not filtered: page html 1`] = `
26202620
"<body>
26212621
<h1>webpack-dev-server is running...</h1>
2622-
<script type=\\"text/javascript\\" charset=\\"utf-8\\" src=\\"/main.js\\"></script>
2622+
<script type="text/javascript" charset="utf-8" src="/main.js"></script>
26232623

26242624
<iframe
2625-
id=\\"webpack-dev-server-client-overlay\\"
2626-
src=\\"about:blank\\"
2627-
style=\\"
2625+
id="webpack-dev-server-client-overlay"
2626+
src="about:blank"
2627+
style="
26282628
position: fixed;
26292629
inset: 0px;
26302630
width: 100vw;
26312631
height: 100vh;
26322632
border: none;
26332633
z-index: 2147483647;
2634-
\\"
2634+
"
26352635
></iframe>
26362636
</body>
26372637
"

0 commit comments

Comments
 (0)