Skip to content

Commit f7f4402

Browse files
authored
chore: refactor tsconfigs in packages to reuse "include", "exclude" and "outDir" (#582)
* Renamed ./lib to ./dist in download-url * Removed unneeded special case in build-info * Removed unused exclude in native-machine-id * Moved include, exclude and outDir to base tsconfig. * Removed unneeded overrides of defaults * Extend react instead of setting "jsx" * Updated the create-workspace script * Remove unused "allowJs": true * Remove empty compilerOptions objects
1 parent 464020e commit f7f4402

File tree

36 files changed

+46
-220
lines changed

36 files changed

+46
-220
lines changed

configs/tsconfig-devtools/tsconfig.common.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"outDir": "${configDir}/dist",
34
"allowJs": false,
45
"esModuleInterop": true,
56
"downlevelIteration": true,
@@ -14,5 +15,7 @@
1415
"sourceMap": true,
1516
"strict": true,
1617
"target": "ES2021"
17-
}
18+
},
19+
"include": ["${configDir}/src/**/*"],
20+
"exclude": ["${configDir}/src/**/*.spec.*"]
1821
}

packages/device-id/tsconfig.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json",
3-
"compilerOptions": {
4-
"outDir": "dist"
5-
},
6-
"include": ["src/**/*"],
7-
"exclude": ["./src/**/*.spec.*"]
2+
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json"
83
}

packages/devtools-connect/tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
"target": "es2020",
55
"lib": ["es2020", "DOM"],
66
"module": "commonjs",
7-
"moduleResolution": "node",
8-
"outDir": "./dist",
9-
"allowJs": true,
10-
"strict": true,
11-
"jsx": "react"
12-
},
13-
"include": ["src/**/*"],
14-
"exclude": ["./src/**/*.spec.*"]
7+
"moduleResolution": "node"
8+
}
159
}
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
{
2-
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json",
3-
"compilerOptions": {
4-
"outDir": "dist",
5-
"allowJs": true,
6-
"strict": true
7-
},
8-
"include": ["src/**/*"],
9-
"exclude": ["./src/**/*.spec.*"]
2+
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json"
103
}

packages/dl-center/tsconfig.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
{
2-
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json",
3-
"compilerOptions": {
4-
"outDir": "dist",
5-
"allowJs": true,
6-
"strict": true
7-
},
8-
"include": ["src/**/*"],
9-
"exclude": ["./src/**/*.spec.*"]
2+
"extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json"
103
}

packages/download-url/.depcheckrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ ignores:
55
- '@types/sinon-chai'
66
- 'sinon'
77
ignore-patterns:
8-
- 'lib'
8+
- 'dist'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.nyc-output
2-
lib
2+
dist

packages/download-url/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ npm-debug.log
66
coverage/
77

88
package-lock.json
9-
.esm-wrapper.mjs
10-
lib/
9+
dist/
1110
.nyc_output
1211
tmp-*/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.nyc_output
2-
lib
2+
dist
33
coverage
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require('../lib/bin.js');
2+
require('../dist/bin.js');

0 commit comments

Comments
 (0)