Skip to content

Commit f55dc00

Browse files
chore(deps): update all non-major dependencies (#6046)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
1 parent 717bb2e commit f55dc00

File tree

43 files changed

+1354
-1283
lines changed

Some content is hidden

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

43 files changed

+1354
-1283
lines changed

docs/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
"devDependencies": {
2121
"@iconify-json/carbon": "^1.1.36",
2222
"@iconify-json/logos": "^1.1.43",
23-
"@shikijs/vitepress-twoslash": "^1.10.0",
24-
"@unocss/reset": "^0.61.0",
23+
"@shikijs/vitepress-twoslash": "^1.10.3",
24+
"@unocss/reset": "^0.61.3",
2525
"@vite-pwa/assets-generator": "^0.2.4",
2626
"@vite-pwa/vitepress": "^0.5.0",
2727
"@vitejs/plugin-vue": "latest",
2828
"fast-glob": "^3.3.2",
2929
"https-localhost": "^4.7.1",
30-
"unocss": "^0.61.0",
30+
"unocss": "^0.61.3",
3131
"unplugin-vue-components": "^0.27.2",
3232
"vite": "^5.2.8",
3333
"vite-plugin-pwa": "^0.20.0",
34-
"vitepress": "^1.2.3",
34+
"vitepress": "^1.3.1",
3535
"workbox-window": "^7.1.0"
3636
}
3737
}

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export default antfu(
5151

5252
// TODO: migrate and turn it back on
5353
'ts/ban-types': 'off',
54+
'ts/no-unsafe-function-type': 'off',
5455

5556
'no-restricted-imports': [
5657
'error',

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,34 @@
3636
"test:browser:playwright": "pnpm -C test/browser run test:playwright"
3737
},
3838
"devDependencies": {
39-
"@antfu/eslint-config": "^2.21.2",
40-
"@antfu/ni": "^0.21.12",
41-
"@playwright/test": "^1.45.0",
39+
"@antfu/eslint-config": "^2.22.2",
40+
"@antfu/ni": "^0.22.0",
41+
"@playwright/test": "^1.45.1",
4242
"@rollup/plugin-commonjs": "^26.0.1",
4343
"@rollup/plugin-json": "^6.1.0",
4444
"@rollup/plugin-node-resolve": "^15.2.3",
45-
"@types/node": "^20.14.9",
46-
"@types/ws": "^8.5.10",
45+
"@types/node": "^20.14.10",
46+
"@types/ws": "^8.5.11",
4747
"@vitest/browser": "workspace:*",
4848
"@vitest/coverage-istanbul": "workspace:*",
4949
"@vitest/coverage-v8": "workspace:*",
5050
"@vitest/ui": "workspace:*",
5151
"bumpp": "^9.4.1",
52-
"esbuild": "^0.22.0",
53-
"eslint": "^9.6.0",
52+
"esbuild": "^0.23.0",
53+
"eslint": "^9.7.0",
5454
"fast-glob": "^3.3.2",
5555
"magic-string": "^0.30.10",
5656
"pathe": "^1.1.2",
5757
"rimraf": "^6.0.1",
58-
"rollup": "^4.18.0",
58+
"rollup": "^4.18.1",
5959
"rollup-plugin-dts": "^6.1.1",
6060
"rollup-plugin-esbuild": "^6.1.1",
61-
"rollup-plugin-license": "^3.5.1",
62-
"tsx": "^4.16.0",
63-
"typescript": "^5.5.2",
61+
"rollup-plugin-license": "^3.5.2",
62+
"tsx": "^4.16.2",
63+
"typescript": "^5.5.3",
6464
"vite": "^5.3.3",
6565
"vitest": "workspace:*",
66-
"zx": "^8.1.3"
66+
"zx": "^8.1.4"
6767
},
6868
"pnpm": {
6969
"overrides": {

packages/browser/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@
7676
}
7777
},
7878
"dependencies": {
79-
"@testing-library/dom": "^10.2.0",
79+
"@testing-library/dom": "^10.3.1",
8080
"@testing-library/user-event": "^14.5.2",
8181
"@vitest/utils": "workspace:*",
8282
"magic-string": "^0.30.10",
8383
"msw": "^2.3.1",
8484
"sirv": "^2.0.4",
85-
"ws": "^8.17.1"
85+
"ws": "^8.18.0"
8686
},
8787
"devDependencies": {
8888
"@testing-library/jest-dom": "^6.4.6",
89-
"@types/ws": "^8.5.10",
89+
"@types/ws": "^8.5.11",
9090
"@vitest/runner": "workspace:*",
9191
"@vitest/ui": "workspace:*",
9292
"@vitest/ws-client": "workspace:*",
@@ -95,10 +95,10 @@
9595
"flatted": "^3.3.1",
9696
"pathe": "^1.1.2",
9797
"periscopic": "^4.0.2",
98-
"playwright": "^1.45.0",
99-
"playwright-core": "^1.45.0",
98+
"playwright": "^1.45.1",
99+
"playwright-core": "^1.45.1",
100100
"safaridriver": "^0.1.2",
101101
"vitest": "workspace:*",
102-
"webdriverio": "^8.39.0"
102+
"webdriverio": "^8.39.1"
103103
}
104104
}

packages/browser/src/client/tester/mocker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class VitestBrowserClientMocker {
236236
try {
237237
Object.defineProperty(newContainer, property, descriptor)
238238
}
239-
catch (error) {
239+
catch {
240240
// Ignore errors, just move on to the next prop.
241241
}
242242
continue

packages/browser/src/client/tester/runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function createBrowserRunner(
110110
try {
111111
await updateFilesLocations(files, this.sourceMapCache)
112112
}
113-
catch (_) {}
113+
catch {}
114114
}
115115
return rpc().onCollected(files)
116116
}

packages/browser/src/node/plugin.ts

Lines changed: 55 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -88,65 +88,69 @@ export default (browserServer: BrowserServer, base = '/'): Plugin[] => {
8888
)
8989
}
9090

91-
coverageFolder && server.middlewares.use(
92-
coveragePath!,
93-
sirv(coverageFolder[0], {
94-
single: true,
95-
dev: true,
96-
setHeaders: (res) => {
97-
res.setHeader(
98-
'Cache-Control',
99-
'public,max-age=0,must-revalidate',
100-
)
101-
},
102-
}),
103-
)
91+
if (coverageFolder) {
92+
server.middlewares.use(
93+
coveragePath!,
94+
sirv(coverageFolder[0], {
95+
single: true,
96+
dev: true,
97+
setHeaders: (res) => {
98+
res.setHeader(
99+
'Cache-Control',
100+
'public,max-age=0,must-revalidate',
101+
)
102+
},
103+
}),
104+
)
105+
}
104106

105107
const screenshotFailures = project.config.browser.ui && project.config.browser.screenshotFailures
106108

109+
if (screenshotFailures) {
107110
// eslint-disable-next-line prefer-arrow-callback
108-
screenshotFailures && server.middlewares.use(`${base}__screenshot-error`, function vitestBrowserScreenshotError(req, res) {
109-
if (!req.url || !browserServer.provider) {
110-
res.statusCode = 404
111-
res.end()
112-
return
113-
}
111+
server.middlewares.use(`${base}__screenshot-error`, function vitestBrowserScreenshotError(req, res) {
112+
if (!req.url || !browserServer.provider) {
113+
res.statusCode = 404
114+
res.end()
115+
return
116+
}
114117

115-
const url = new URL(req.url, 'http://localhost')
116-
const file = url.searchParams.get('file')
117-
if (!file) {
118-
res.statusCode = 404
119-
res.end()
120-
return
121-
}
118+
const url = new URL(req.url, 'http://localhost')
119+
const file = url.searchParams.get('file')
120+
if (!file) {
121+
res.statusCode = 404
122+
res.end()
123+
return
124+
}
122125

123-
let stat: Stats | undefined
124-
try {
125-
stat = lstatSync(file)
126-
}
127-
catch (_) {
128-
}
126+
let stat: Stats | undefined
127+
try {
128+
stat = lstatSync(file)
129+
}
130+
catch {
131+
}
129132

130-
if (!stat?.isFile()) {
131-
res.statusCode = 404
132-
res.end()
133-
return
134-
}
133+
if (!stat?.isFile()) {
134+
res.statusCode = 404
135+
res.end()
136+
return
137+
}
135138

136-
const ext = extname(file)
137-
const buffer = readFileSync(file)
138-
res.setHeader(
139-
'Cache-Control',
140-
'public,max-age=0,must-revalidate',
141-
)
142-
res.setHeader('Content-Length', buffer.length)
143-
res.setHeader('Content-Type', ext === 'jpeg' || ext === 'jpg'
144-
? 'image/jpeg'
145-
: ext === 'webp'
146-
? 'image/webp'
147-
: 'image/png')
148-
res.end(buffer)
149-
})
139+
const ext = extname(file)
140+
const buffer = readFileSync(file)
141+
res.setHeader(
142+
'Cache-Control',
143+
'public,max-age=0,must-revalidate',
144+
)
145+
res.setHeader('Content-Length', buffer.length)
146+
res.setHeader('Content-Type', ext === 'jpeg' || ext === 'jpg'
147+
? 'image/jpeg'
148+
: ext === 'webp'
149+
? 'image/webp'
150+
: 'image/png')
151+
res.end(buffer)
152+
})
153+
}
150154
},
151155
},
152156
{

packages/expect/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export interface JestAssertion<T = any> extends jest.Matchers<void, T> {
119119
toStrictEqual: <E>(expected: E) => void
120120
toBe: <E>(expected: E) => void
121121
toMatch: (expected: string | RegExp) => void
122-
toMatchObject: <E extends {} | any[]>(expected: E) => void
122+
toMatchObject: <E extends object | any[]>(expected: E) => void
123123
toContain: <E>(item: E) => void
124124
toContainEqual: <E>(item: E) => void
125125
toBeTruthy: () => void
@@ -212,7 +212,7 @@ declare global {
212212
// support augmenting jest.Matchers by other libraries
213213
// eslint-disable-next-line ts/no-namespace
214214
namespace jest {
215-
// eslint-disable-next-line unused-imports/no-unused-vars
215+
// eslint-disable-next-line unused-imports/no-unused-vars, ts/no-empty-object-type
216216
interface Matchers<R, T = {}> {}
217217
}
218218
}

packages/runner/src/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function afterAll(fn: SuiteHooks['afterAll'][0], timeout?: number) {
2626
withTimeout(fn, timeout ?? getDefaultHookTimeout(), true),
2727
)
2828
}
29-
export function beforeEach<ExtraContext = {}>(
29+
export function beforeEach<ExtraContext = object>(
3030
fn: SuiteHooks<ExtraContext>['beforeEach'][0],
3131
timeout?: number,
3232
) {
@@ -35,7 +35,7 @@ export function beforeEach<ExtraContext = {}>(
3535
withTimeout(withFixtures(fn), timeout ?? getDefaultHookTimeout(), true),
3636
)
3737
}
38-
export function afterEach<ExtraContext = {}>(
38+
export function afterEach<ExtraContext = object>(
3939
fn: SuiteHooks<ExtraContext>['afterEach'][0],
4040
timeout?: number,
4141
) {

packages/runner/src/suite.ts

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function clearCollectorContext(
100100
collectorContext.currentSuite = defaultSuite
101101
}
102102

103-
export function getCurrentSuite<ExtraContext = {}>() {
103+
export function getCurrentSuite<ExtraContext = object>() {
104104
return (collectorContext.currentSuite
105105
|| defaultSuite) as SuiteCollector<ExtraContext>
106106
}
@@ -429,19 +429,24 @@ function createSuite() {
429429
cases.forEach((i, idx) => {
430430
const items = Array.isArray(i) ? i : [i]
431431
if (fnFirst) {
432-
arrayOnlyCases
433-
? suite(
432+
if (arrayOnlyCases) {
433+
suite(
434434
formatTitle(_name, items, idx),
435435
() => handler(...items),
436436
options,
437437
)
438-
: suite(formatTitle(_name, items, idx), () => handler(i), options)
438+
}
439+
else {
440+
suite(formatTitle(_name, items, idx), () => handler(i), options)
441+
}
439442
}
440443
else {
441-
arrayOnlyCases
442-
? suite(formatTitle(_name, items, idx), options, () =>
443-
handler(...items))
444-
: suite(formatTitle(_name, items, idx), options, () => handler(i))
444+
if (arrayOnlyCases) {
445+
suite(formatTitle(_name, items, idx), options, () => handler(...items))
446+
}
447+
else {
448+
suite(formatTitle(_name, items, idx), options, () => handler(i))
449+
}
445450
}
446451
})
447452

@@ -497,19 +502,24 @@ export function createTaskCollector(
497502
const items = Array.isArray(i) ? i : [i]
498503

499504
if (fnFirst) {
500-
arrayOnlyCases
501-
? test(
505+
if (arrayOnlyCases) {
506+
test(
502507
formatTitle(_name, items, idx),
503508
() => handler(...items),
504509
options,
505510
)
506-
: test(formatTitle(_name, items, idx), () => handler(i), options)
511+
}
512+
else {
513+
test(formatTitle(_name, items, idx), () => handler(i), options)
514+
}
507515
}
508516
else {
509-
arrayOnlyCases
510-
? test(formatTitle(_name, items, idx), options, () =>
511-
handler(...items))
512-
: test(formatTitle(_name, items, idx), options, () => handler(i))
517+
if (arrayOnlyCases) {
518+
test(formatTitle(_name, items, idx), options, () => handler(...items))
519+
}
520+
else {
521+
test(formatTitle(_name, items, idx), options, () => handler(i))
522+
}
513523
}
514524
})
515525

0 commit comments

Comments
 (0)