Skip to content

Commit af70e92

Browse files
committed
Update dev dependencies.
Includes fixes for the newer versions of Prettier, ESLint, and TypeScript. Note that there are now 3 TypeScript errors due to this TypeScript v5.4.2 bug: microsoft/TypeScript#57738
1 parent 614bb3d commit af70e92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+409
-377
lines changed

Cache.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe("Class `Cache`.", { concurrency: true }, () => {
1818
throws(() => {
1919
new Cache(
2020
// @ts-expect-error Testing invalid.
21-
null
21+
null,
2222
);
2323
}, new TypeError("Constructor argument 1 `store` must be an object."));
2424
});

CacheContext.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React from "react";
1010
* @type {React.Context<Cache | undefined>}
1111
*/
1212
const CacheContext = React.createContext(
13-
/** @type {Cache | undefined} */ (undefined)
13+
/** @type {Cache | undefined} */ (undefined),
1414
);
1515

1616
CacheContext.displayName = "CacheContext";

CacheContext.test.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { strictEqual } from "node:assert";
44
import { describe, it } from "node:test";
5+
56
import React from "react";
67

78
import Cache from "./Cache.mjs";
@@ -28,8 +29,8 @@ describe("React context `CacheContext`.", { concurrency: true }, () => {
2829
React.createElement(
2930
CacheContext.Provider,
3031
{ value },
31-
React.createElement(TestComponent)
32-
)
32+
React.createElement(TestComponent),
33+
),
3334
);
3435

3536
strictEqual(contextValue, value);

HYDRATION_TIME_MS.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("Constant `HYDRATION_TIME_MS`.", { concurrency: true }, () => {
1010
it("Bundle size.", async () => {
1111
await assertBundleSize(
1212
new URL("./HYDRATION_TIME_MS.mjs", import.meta.url),
13-
65
13+
65,
1414
);
1515
});
1616

HydrationTimeStampContext.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import React from "react";
88
* @type {React.Context<DOMHighResTimeStamp | undefined>}
99
*/
1010
const HydrationTimeStampContext = React.createContext(
11-
/** @type {DOMHighResTimeStamp | undefined} */ (undefined)
11+
/** @type {DOMHighResTimeStamp | undefined} */ (undefined),
1212
);
1313

1414
HydrationTimeStampContext.displayName = "HydrationTimeStampContext";

HydrationTimeStampContext.test.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { strictEqual } from "node:assert";
44
import { describe, it } from "node:test";
5+
56
import React from "react";
67

78
import HydrationTimeStampContext from "./HydrationTimeStampContext.mjs";
@@ -15,7 +16,7 @@ describe(
1516
it("Bundle size.", async () => {
1617
await assertBundleSize(
1718
new URL("./HydrationTimeStampContext.mjs", import.meta.url),
18-
150
19+
150,
1920
);
2021
});
2122

@@ -33,11 +34,11 @@ describe(
3334
React.createElement(
3435
HydrationTimeStampContext.Provider,
3536
{ value },
36-
React.createElement(TestComponent)
37-
)
37+
React.createElement(TestComponent),
38+
),
3839
);
3940

4041
strictEqual(contextValue, value);
4142
});
42-
}
43+
},
4344
);

LoadingCacheValue.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ export default class LoadingCacheValue {
4141

4242
if (!(loadingResult instanceof Promise))
4343
throw new TypeError(
44-
"Argument 4 `loadingResult` must be a `Promise` instance."
44+
"Argument 4 `loadingResult` must be a `Promise` instance.",
4545
);
4646

4747
if (!(abortController instanceof AbortController))
4848
throw new TypeError(
49-
"Argument 5 `abortController` must be an `AbortController` instance."
49+
"Argument 5 `abortController` must be an `AbortController` instance.",
5050
);
5151

5252
/**
@@ -118,7 +118,7 @@ export default class LoadingCacheValue {
118118
detail: {
119119
loadingCacheValue: this,
120120
},
121-
})
121+
}),
122122
);
123123

124124
return result;
@@ -133,7 +133,7 @@ export default class LoadingCacheValue {
133133
detail: {
134134
loadingCacheValue: this,
135135
},
136-
})
136+
}),
137137
);
138138
}
139139
}

LoadingCacheValue.test.mjs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
1717
it("Bundle size.", async () => {
1818
await assertBundleSize(
1919
new URL("./LoadingCacheValue.mjs", import.meta.url),
20-
650
20+
650,
2121
);
2222
});
2323

@@ -29,7 +29,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
2929
new Cache(),
3030
"a",
3131
Promise.resolve(),
32-
new AbortController()
32+
new AbortController(),
3333
);
3434
}, new TypeError("Argument 1 `loading` must be a `Loading` instance."));
3535
});
@@ -42,7 +42,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
4242
true,
4343
"a",
4444
Promise.resolve(),
45-
new AbortController()
45+
new AbortController(),
4646
);
4747
}, new TypeError("Argument 2 `cache` must be a `Cache` instance."));
4848
});
@@ -55,7 +55,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
5555
// @ts-expect-error Testing invalid.
5656
true,
5757
Promise.resolve(),
58-
new AbortController()
58+
new AbortController(),
5959
);
6060
}, new TypeError("Argument 3 `cacheKey` must be a string."));
6161
});
@@ -68,7 +68,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
6868
"a",
6969
// @ts-expect-error Testing invalid.
7070
true,
71-
new AbortController()
71+
new AbortController(),
7272
);
7373
}, new TypeError("Argument 4 `loadingResult` must be a `Promise` instance."));
7474
});
@@ -81,7 +81,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
8181
"a",
8282
Promise.resolve(),
8383
// @ts-expect-error Testing invalid.
84-
true
84+
true,
8585
);
8686
}, new TypeError("Argument 5 `abortController` must be an `AbortController` instance."));
8787
});
@@ -115,7 +115,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
115115
cache,
116116
cacheKey,
117117
loadingResult,
118-
abortController
118+
abortController,
119119
);
120120

121121
strictEqual(events.length, 1);
@@ -193,7 +193,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
193193
cache,
194194
cacheKey,
195195
firstLoadingResult,
196-
firstAbortController
196+
firstAbortController,
197197
);
198198

199199
strictEqual(events.length, 1);
@@ -214,7 +214,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
214214
assertTypeOf(firstLoadingCacheValue.timeStamp, "number");
215215
strictEqual(
216216
performance.now() - firstLoadingCacheValue.timeStamp < 50,
217-
true
217+
true,
218218
);
219219
strictEqual(firstLoadingCacheValue.abortController, firstAbortController);
220220
assertInstanceOf(firstLoadingCacheValue.promise, Promise);
@@ -233,7 +233,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
233233
cache,
234234
cacheKey,
235235
secondLoadingResult,
236-
secondAbortController
236+
secondAbortController,
237237
);
238238

239239
strictEqual(events.length, 1);
@@ -254,11 +254,11 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
254254
assertTypeOf(secondLoadingCacheValue.timeStamp, "number");
255255
strictEqual(
256256
performance.now() - secondLoadingCacheValue.timeStamp < 50,
257-
true
257+
true,
258258
);
259259
strictEqual(
260260
secondLoadingCacheValue.timeStamp >= firstLoadingCacheValue.timeStamp,
261-
true
261+
true,
262262
);
263263
strictEqual(secondLoadingCacheValue.abortController, secondAbortController);
264264
assertInstanceOf(secondLoadingCacheValue.promise, Promise);
@@ -353,7 +353,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
353353
cache,
354354
cacheKey,
355355
firstLoadingResult,
356-
firstAbortController
356+
firstAbortController,
357357
);
358358

359359
strictEqual(events.length, 1);
@@ -374,7 +374,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
374374
assertTypeOf(firstLoadingCacheValue.timeStamp, "number");
375375
strictEqual(
376376
performance.now() - firstLoadingCacheValue.timeStamp < 50,
377-
true
377+
true,
378378
);
379379
strictEqual(firstLoadingCacheValue.abortController, firstAbortController);
380380
assertInstanceOf(firstLoadingCacheValue.promise, Promise);
@@ -393,7 +393,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
393393
cache,
394394
cacheKey,
395395
secondLoadingResult,
396-
secondAbortController
396+
secondAbortController,
397397
);
398398

399399
strictEqual(events.length, 1);
@@ -414,11 +414,11 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
414414
assertTypeOf(secondLoadingCacheValue.timeStamp, "number");
415415
strictEqual(
416416
performance.now() - secondLoadingCacheValue.timeStamp < 50,
417-
true
417+
true,
418418
);
419419
strictEqual(
420420
secondLoadingCacheValue.timeStamp >= firstLoadingCacheValue.timeStamp,
421-
true
421+
true,
422422
);
423423
strictEqual(secondLoadingCacheValue.abortController, secondAbortController);
424424
assertInstanceOf(secondLoadingCacheValue.promise, Promise);
@@ -440,7 +440,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
440440
});
441441
deepStrictEqual(cache.store, { [cacheKey]: firstCacheValue });
442442
strictEqual(firstResult, firstCacheValue);
443-
}
443+
},
444444
);
445445

446446
const secondLoadingCheck = secondLoadingCacheValue.promise.then(
@@ -450,7 +450,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
450450
deepStrictEqual(loading.store, {});
451451
deepStrictEqual(cache.store, { [cacheKey]: secondCacheValue });
452452
strictEqual(secondResult, secondCacheValue);
453-
}
453+
},
454454
);
455455

456456
secondLoadingResultResolve(secondCacheValue);
@@ -519,7 +519,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
519519
() => {
520520
resolve(cacheValue);
521521
},
522-
{ once: true }
522+
{ once: true },
523523
);
524524
});
525525

@@ -528,7 +528,7 @@ describe("Class `LoadingCacheValue`.", { concurrency: true }, () => {
528528
cache,
529529
cacheKey,
530530
loadingResult,
531-
abortController
531+
abortController,
532532
);
533533

534534
strictEqual(events.length, 1);

LoadingContext.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import React from "react";
1010
* @type {React.Context<Loading | undefined>}
1111
*/
1212
const LoadingContext = React.createContext(
13-
/** @type {Loading | undefined} */ (undefined)
13+
/** @type {Loading | undefined} */ (undefined),
1414
);
1515

1616
LoadingContext.displayName = "LoadingContext";

LoadingContext.test.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { strictEqual } from "node:assert";
44
import { describe, it } from "node:test";
5+
56
import React from "react";
67

78
import Loading from "./Loading.mjs";
@@ -13,7 +14,7 @@ describe("React context `LoadingContext`.", { concurrency: true }, () => {
1314
it("Bundle size.", async () => {
1415
await assertBundleSize(
1516
new URL("./LoadingContext.mjs", import.meta.url),
16-
120
17+
120,
1718
);
1819
});
1920

@@ -31,8 +32,8 @@ describe("React context `LoadingContext`.", { concurrency: true }, () => {
3132
React.createElement(
3233
LoadingContext.Provider,
3334
{ value },
34-
React.createElement(TestComponent)
35-
)
35+
React.createElement(TestComponent),
36+
),
3637
);
3738

3839
strictEqual(contextValue, value);

Provider.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ import LoadingContext from "./LoadingContext.mjs";
3333
*/
3434
export default function Provider({ cache, children }) {
3535
const hydrationTimeStampRef = React.useRef(
36-
/** @type {DOMHighResTimeStamp | undefined} */ (undefined)
36+
/** @type {DOMHighResTimeStamp | undefined} */ (undefined),
3737
);
3838

3939
if (!hydrationTimeStampRef.current)
4040
hydrationTimeStampRef.current = performance.now();
4141

4242
const loadingRef = React.useRef(
43-
/** @type {Loading | undefined} */ (undefined)
43+
/** @type {Loading | undefined} */ (undefined),
4444
);
4545

4646
if (!loadingRef.current) loadingRef.current = new Loading();
@@ -57,9 +57,9 @@ export default function Provider({ cache, children }) {
5757
React.createElement(
5858
LoadingContext.Provider,
5959
{ value: loadingRef.current },
60-
children
61-
)
62-
)
60+
children,
61+
),
62+
),
6363
);
6464
}
6565

0 commit comments

Comments
 (0)