Skip to content

Commit be87ceb

Browse files
committed
chore(deps): update vitest and typescript
1 parent a1af7c1 commit be87ceb

File tree

12 files changed

+1061
-448
lines changed

12 files changed

+1061
-448
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@hey-api/client-nuxt": "workspace:*",
5353
"@types/node": "22.10.5",
5454
"@typescript-eslint/eslint-plugin": "7.18.0",
55-
"@vitest/coverage-v8": "1.6.0",
55+
"@vitest/coverage-v8": "3.1.1",
5656
"eslint": "9.17.0",
5757
"eslint-config-prettier": "9.1.0",
5858
"eslint-plugin-simple-import-sort": "12.1.1",
@@ -66,11 +66,11 @@
6666
"prettier": "3.4.2",
6767
"rollup": "4.31.0",
6868
"rollup-plugin-dts": "6.1.1",
69-
"tsup": "8.3.5",
70-
"turbo": "2.4.0",
71-
"typescript": "5.5.3",
72-
"typescript-eslint": "8.19.1",
73-
"vitest": "1.6.0"
69+
"tsup": "8.4.0",
70+
"turbo": "2.5.0",
71+
"typescript": "5.8.3",
72+
"typescript-eslint": "8.29.1",
73+
"vitest": "3.1.1"
7474
},
7575
"packageManager": "[email protected]+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf"
7676
}

packages/nx-plugin/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@
5454
"latest-version": "9.0.0",
5555
"nx": "20.7.1",
5656
"openapi-diff": "0.23.7",
57-
"tslib": "2.3.0",
57+
"tslib": "2.8.1",
5858
"xcurl": "2.1.2"
5959
},
6060
"devDependencies": {
61-
"typescript": "5.5.3",
62-
"vitest": "1.6.0"
61+
"typescript": "5.8.3"
6362
},
6463
"files": [
6564
"dist",

packages/openapi-ts-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"rxjs": "7.8.1",
5858
"ts-node": "10.9.2",
5959
"tslib": "2.8.1",
60-
"typescript": "5.5.3",
60+
"typescript": "5.8.3",
6161
"vue": "3.5.13",
6262
"zod": "3.23.8"
6363
},

packages/openapi-ts-tests/test/2.0.x.test.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,18 @@ describe(`OpenAPI ${version}`, () => {
336336
const outputPath = typeof config.output === 'string' ? config.output : '';
337337
const filePaths = getFilePaths(outputPath);
338338

339-
filePaths.forEach((filePath) => {
340-
const fileContent = fs.readFileSync(filePath, 'utf-8');
341-
expect(fileContent).toMatchFileSnapshot(
342-
path.join(
343-
__dirname,
344-
'__snapshots__',
345-
version,
346-
filePath.slice(outputDir.length + 1),
347-
),
348-
);
349-
});
339+
await Promise.all(
340+
filePaths.map(async (filePath) => {
341+
const fileContent = fs.readFileSync(filePath, 'utf-8');
342+
await expect(fileContent).toMatchFileSnapshot(
343+
path.join(
344+
__dirname,
345+
'__snapshots__',
346+
version,
347+
filePath.slice(outputDir.length + 1),
348+
),
349+
);
350+
}),
351+
);
350352
});
351353
});

packages/openapi-ts-tests/test/3.0.x.test.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -574,16 +574,18 @@ describe(`OpenAPI ${version}`, () => {
574574
const outputPath = typeof config.output === 'string' ? config.output : '';
575575
const filePaths = getFilePaths(outputPath);
576576

577-
filePaths.forEach((filePath) => {
578-
const fileContent = fs.readFileSync(filePath, 'utf-8');
579-
expect(fileContent).toMatchFileSnapshot(
580-
path.join(
581-
__dirname,
582-
'__snapshots__',
583-
version,
584-
filePath.slice(outputDir.length + 1),
585-
),
586-
);
587-
});
577+
await Promise.all(
578+
filePaths.map(async (filePath) => {
579+
const fileContent = fs.readFileSync(filePath, 'utf-8');
580+
await expect(fileContent).toMatchFileSnapshot(
581+
path.join(
582+
__dirname,
583+
'__snapshots__',
584+
version,
585+
filePath.slice(outputDir.length + 1),
586+
),
587+
);
588+
}),
589+
);
588590
});
589591
});

packages/openapi-ts-tests/test/3.1.x.test.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -651,16 +651,18 @@ describe(`OpenAPI ${version}`, () => {
651651
const outputPath = typeof config.output === 'string' ? config.output : '';
652652
const filePaths = getFilePaths(outputPath);
653653

654-
filePaths.forEach((filePath) => {
655-
const fileContent = fs.readFileSync(filePath, 'utf-8');
656-
expect(fileContent).toMatchFileSnapshot(
657-
path.join(
658-
__dirname,
659-
'__snapshots__',
660-
version,
661-
filePath.slice(outputDir.length + 1),
662-
),
663-
);
664-
});
654+
await Promise.all(
655+
filePaths.map(async (filePath) => {
656+
const fileContent = fs.readFileSync(filePath, 'utf-8');
657+
await expect(fileContent).toMatchFileSnapshot(
658+
path.join(
659+
__dirname,
660+
'__snapshots__',
661+
version,
662+
filePath.slice(outputDir.length + 1),
663+
),
664+
);
665+
}),
666+
);
665667
});
666668
});

packages/openapi-ts-tests/test/clients.test.ts

Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -153,30 +153,32 @@ for (const client of clients) {
153153
const outputPath = typeof config.output === 'string' ? config.output : '';
154154
const filePaths = getFilePaths(outputPath);
155155

156-
filePaths.forEach((filePath) => {
157-
const fileContent = fs.readFileSync(filePath, 'utf-8');
156+
await Promise.all(
157+
filePaths.map(async (filePath) => {
158+
const fileContent = fs.readFileSync(filePath, 'utf-8');
158159

159-
// flaky test reordering client imports, skip
160-
if (
161-
client === '@hey-api/client-nuxt' &&
162-
typeof config.output === 'string' &&
163-
config.output.includes('bundle')
164-
) {
165-
expect(1).toBe(1);
166-
return;
167-
}
160+
// flaky test reordering client imports, skip
161+
if (
162+
client === '@hey-api/client-nuxt' &&
163+
typeof config.output === 'string' &&
164+
config.output.includes('bundle')
165+
) {
166+
expect(1).toBe(1);
167+
return;
168+
}
168169

169-
expect(fileContent).toMatchFileSnapshot(
170-
path.join(
171-
__dirname,
172-
'__snapshots__',
173-
'3.1.x',
174-
namespace,
175-
client,
176-
filePath.slice(outputDir.length + 1),
177-
),
178-
);
179-
});
170+
await expect(fileContent).toMatchFileSnapshot(
171+
path.join(
172+
__dirname,
173+
'__snapshots__',
174+
'3.1.x',
175+
namespace,
176+
client,
177+
filePath.slice(outputDir.length + 1),
178+
),
179+
);
180+
}),
181+
);
180182
});
181183
});
182184
}
@@ -307,20 +309,22 @@ describe('custom-client', () => {
307309
const outputPath = typeof config.output === 'string' ? config.output : '';
308310
const filePaths = getFilePaths(outputPath);
309311

310-
filePaths.forEach((filePath) => {
311-
const fileContent = fs.readFileSync(filePath, 'utf-8');
312+
await Promise.all(
313+
filePaths.map(async (filePath) => {
314+
const fileContent = fs.readFileSync(filePath, 'utf-8');
312315

313-
expect(fileContent).toMatchFileSnapshot(
314-
path.join(
315-
__dirname,
316-
'__snapshots__',
317-
'3.1.x',
318-
namespace,
319-
'client-custom',
320-
filePath.slice(outputDir.length + 1),
321-
),
322-
);
323-
});
316+
await expect(fileContent).toMatchFileSnapshot(
317+
path.join(
318+
__dirname,
319+
'__snapshots__',
320+
'3.1.x',
321+
namespace,
322+
'client-custom',
323+
filePath.slice(outputDir.length + 1),
324+
),
325+
);
326+
}),
327+
);
324328
});
325329
});
326330

@@ -450,19 +454,21 @@ describe('my-client', () => {
450454
const outputPath = typeof config.output === 'string' ? config.output : '';
451455
const filePaths = getFilePaths(outputPath);
452456

453-
filePaths.forEach((filePath) => {
454-
const fileContent = fs.readFileSync(filePath, 'utf-8');
457+
await Promise.all(
458+
filePaths.map(async (filePath) => {
459+
const fileContent = fs.readFileSync(filePath, 'utf-8');
455460

456-
expect(fileContent).toMatchFileSnapshot(
457-
path.join(
458-
__dirname,
459-
'__snapshots__',
460-
'3.1.x',
461-
namespace,
462-
'my-client',
463-
filePath.slice(outputDir.length + 1),
464-
),
465-
);
466-
});
461+
await expect(fileContent).toMatchFileSnapshot(
462+
path.join(
463+
__dirname,
464+
'__snapshots__',
465+
'3.1.x',
466+
namespace,
467+
'my-client',
468+
filePath.slice(outputDir.length + 1),
469+
),
470+
);
471+
}),
472+
);
467473
});
468474
});

packages/openapi-ts-tests/test/index.test.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ describe('OpenAPI v2', () => {
5353
input: V2_SPEC_PATH,
5454
output,
5555
});
56-
sync(`${output}**/*.ts`).forEach((file) => {
57-
const content = fs.readFileSync(file, 'utf8').toString();
58-
expect(content).toMatchFileSnapshot(toSnapshotPath(file));
59-
});
56+
await Promise.all(
57+
sync(`${output}**/*.ts`).map(async (file) => {
58+
const content = fs.readFileSync(file, 'utf8').toString();
59+
await expect(content).toMatchFileSnapshot(toSnapshotPath(file));
60+
}),
61+
);
6062
});
6163
});
6264

@@ -455,10 +457,12 @@ describe('OpenAPI v3', () => {
455457
path: output,
456458
},
457459
});
458-
sync(`${output}**/*.ts`).forEach((file) => {
459-
const content = fs.readFileSync(file, 'utf8').toString();
460-
expect(content).toMatchFileSnapshot(toSnapshotPath(file));
461-
});
460+
await Promise.all(
461+
sync(`${output}**/*.ts`).map(async (file) => {
462+
const content = fs.readFileSync(file, 'utf8').toString();
463+
await expect(content).toMatchFileSnapshot(toSnapshotPath(file));
464+
}),
465+
);
462466
},
463467
);
464468

@@ -499,10 +503,12 @@ describe('OpenAPI v3', () => {
499503
],
500504
});
501505

502-
sync(`${output}**/*.ts`).forEach((file) => {
503-
const content = fs.readFileSync(file, 'utf8').toString();
504-
expect(content).toMatchFileSnapshot(toSnapshotPath(file));
505-
});
506+
await Promise.all(
507+
sync(`${output}**/*.ts`).map(async (file) => {
508+
const content = fs.readFileSync(file, 'utf8').toString();
509+
await expect(content).toMatchFileSnapshot(toSnapshotPath(file));
510+
}),
511+
);
506512
},
507513
);
508514
});

packages/openapi-ts-tests/test/plugins.test.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -300,18 +300,20 @@ for (const version of versions) {
300300
const outputPath = typeof config.output === 'string' ? config.output : '';
301301
const filePaths = getFilePaths(outputPath);
302302

303-
filePaths.forEach((filePath) => {
304-
const fileContent = fs.readFileSync(filePath, 'utf-8');
305-
expect(fileContent).toMatchFileSnapshot(
306-
path.join(
307-
__dirname,
308-
'__snapshots__',
309-
version,
310-
namespace,
311-
filePath.slice(outputDir.length + 1),
312-
),
313-
);
314-
});
303+
await Promise.all(
304+
filePaths.map(async (filePath) => {
305+
const fileContent = fs.readFileSync(filePath, 'utf-8');
306+
await expect(fileContent).toMatchFileSnapshot(
307+
path.join(
308+
__dirname,
309+
'__snapshots__',
310+
version,
311+
namespace,
312+
filePath.slice(outputDir.length + 1),
313+
),
314+
);
315+
}),
316+
);
315317
});
316318
});
317319

packages/openapi-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@
9898
"prettier": "3.4.2",
9999
"ts-node": "10.9.2",
100100
"tslib": "2.8.1",
101-
"typescript": "5.5.3"
101+
"typescript": "5.8.3"
102102
}
103103
}

packages/vite-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"devDependencies": {
5959
"@hey-api/openapi-ts": "workspace:*",
60-
"typescript": "5.5.3",
60+
"typescript": "5.8.3",
6161
"vite": "6.0.13"
6262
}
6363
}

0 commit comments

Comments
 (0)