Skip to content

Commit ee0491e

Browse files
committed
fix(apps,napi): explicitly specify libs in tsconfigs (#20071)
Replaces #20064 The `dom` lib was implicitly being injected, this means stuff like `Token` and `Comment` were in the global scope, which was incorrect. cc @overlookmotel
1 parent e6b604f commit ee0491e

File tree

8 files changed

+40
-9
lines changed

8 files changed

+40
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ target/
1818
/tasks/e2e/tests/nestjs/node_modules/
1919
/npm/*/node_modules
2020
/napi/*/npm-dir
21+
/napi/parser/tsconfig.browser.tsbuildinfo
2122

2223
# Cloned conformance repos
2324
tasks/coverage/babel/

apps/oxfmt/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"lib": ["ESNext"],
34
"module": "Preserve",
45
"moduleResolution": "Bundler",
56
"noEmit": true,

apps/oxlint/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"lib": ["ESNext"],
34
"module": "Preserve",
45
"moduleResolution": "Bundler",
56
"noEmit": true,

napi/minify/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"lib": ["ESNext"],
34
"module": "Preserve",
45
"moduleResolution": "Bundler",
56
"noEmit": true,

napi/parser/tsconfig.browser.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.node.json",
3+
"compilerOptions": {
4+
"composite": true,
5+
"declaration": true,
6+
"emitDeclarationOnly": true,
7+
"declarationDir": "./.tsbuild/browser",
8+
"lib": [
9+
"ESNext",
10+
"DOM",
11+
"DOM.Iterable",
12+
"DOM.AsyncIterable",
13+
"WebWorker.ImportScripts",
14+
"ScriptHost"
15+
]
16+
},
17+
"include": ["test-browser/**/*.ts", "vitest.config.browser.ts"],
18+
"exclude": []
19+
}

napi/parser/tsconfig.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
2-
"compilerOptions": {
3-
"module": "Preserve",
4-
"moduleResolution": "Bundler",
5-
"noEmit": true,
6-
"target": "ESNext",
7-
"allowImportingTsExtensions": true,
8-
"noUnusedLocals": true,
9-
"strict": false
10-
}
2+
"files": [],
3+
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.browser.json" }]
114
}

napi/parser/tsconfig.node.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["ESNext"],
4+
"module": "Preserve",
5+
"moduleResolution": "Bundler",
6+
"noEmit": true,
7+
"target": "ESNext",
8+
"allowImportingTsExtensions": true,
9+
"noUnusedLocals": true,
10+
"skipLibCheck": true,
11+
"strict": false
12+
},
13+
"exclude": ["test-browser", "vitest.config.browser.ts"]
14+
}

napi/transform/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"lib": ["ESNext"],
34
"module": "Preserve",
45
"moduleResolution": "Bundler",
56
"noEmit": true,

0 commit comments

Comments
 (0)