Skip to content

Commit bb62e0d

Browse files
committed
fix(api): include web fetch libs in package build
1 parent 8c5661c commit bb62e0d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fs from 'node:fs';
2+
import path from 'node:path';
3+
import { describe, expect, it } from 'vitest';
4+
5+
describe('packages/api tsconfig', () => {
6+
it('includes explicit web platform libs for fetch transport types', () => {
7+
const tsconfigPath = path.resolve(process.cwd(), 'tsconfig.json');
8+
const raw = fs.readFileSync(tsconfigPath, 'utf8');
9+
const parsed = JSON.parse(raw) as {
10+
compilerOptions?: {
11+
lib?: string[];
12+
};
13+
};
14+
15+
expect(parsed.compilerOptions?.lib).toEqual(
16+
expect.arrayContaining(['ES2022', 'DOM', 'DOM.Iterable'])
17+
);
18+
});
19+
});

packages/api/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "../../tsconfig.agents.json",
33
"compilerOptions": {
4+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
45
"outDir": "./dist",
56
"rootDir": "./src",
67
"declaration": true,

0 commit comments

Comments
 (0)