Skip to content

Commit 338dc87

Browse files
authored
refact: tsconfig extends @tsconfig/bases (#220)
1 parent b303603 commit 338dc87

File tree

6 files changed

+30
-32
lines changed

6 files changed

+30
-32
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"nx-transformer.js"
5454
],
5555
"devDependencies": {
56+
"@tsconfig/node18": "^18.2.4",
5657
"@types/minimatch": "^5.1.2",
5758
"@types/node": "^18.19.43",
5859
"@types/ts-expose-internals": "npm:[email protected]",

test/jest.config.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ const config: JestConfigWithTsJest = {
55
preset: "ts-jest",
66
testRegex: ".*(test|spec)\\.tsx?$",
77
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
8-
transform: {
9-
"^.+\\.tsx?$": [
10-
"ts-jest",
11-
{
12-
tsconfig: "<rootDir>/tsconfig.json",
13-
},
14-
],
15-
},
16-
modulePaths: ["<rootDir>"],
17-
roots: ["<rootDir>"],
188
};
199

2010
export default config;

test/yarn.lock

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,14 @@ __metadata:
187187
languageName: node
188188
linkType: hard
189189

190-
"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3":
190+
"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3":
191+
version: 7.22.5
192+
resolution: "@babel/helper-plugin-utils@npm:7.22.5"
193+
checksum: 10c0/d2c4bfe2fa91058bcdee4f4e57a3f4933aed7af843acfd169cd6179fab8d13c1d636474ecabb2af107dc77462c7e893199aa26632bac1c6d7e025a17cbb9d20d
194+
languageName: node
195+
linkType: hard
196+
197+
"@babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8":
191198
version: 7.24.8
192199
resolution: "@babel/helper-plugin-utils@npm:7.24.8"
193200
checksum: 10c0/0376037f94a3bfe6b820a39f81220ac04f243eaee7193774b983e956c1750883ff236b30785795abbcda43fac3ece74750566830c2daa4d6e3870bb0dff34c2d
@@ -2759,7 +2766,7 @@ __metadata:
27592766
languageName: node
27602767
linkType: hard
27612768

2762-
"acorn@npm:^8.11.0, acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2":
2769+
"acorn@npm:^8.11.0":
27632770
version: 8.12.1
27642771
resolution: "acorn@npm:8.12.1"
27652772
bin:
@@ -2768,6 +2775,15 @@ __metadata:
27682775
languageName: node
27692776
linkType: hard
27702777

2778+
"acorn@npm:^8.4.1, acorn@npm:^8.7.1, acorn@npm:^8.8.2":
2779+
version: 8.11.3
2780+
resolution: "acorn@npm:8.11.3"
2781+
bin:
2782+
acorn: bin/acorn
2783+
checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299
2784+
languageName: node
2785+
linkType: hard
2786+
27712787
"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1":
27722788
version: 7.1.1
27732789
resolution: "agent-base@npm:7.1.1"
@@ -9229,12 +9245,12 @@ __metadata:
92299245

92309246
"typescript-transform-paths@file:../package.tgz::locator=root-workspace-0b6124%40workspace%3A.":
92319247
version: 3.4.9
9232-
resolution: "typescript-transform-paths@file:../package.tgz#../package.tgz::hash=6f43f9&locator=root-workspace-0b6124%40workspace%3A."
9248+
resolution: "typescript-transform-paths@file:../package.tgz#../package.tgz::hash=396016&locator=root-workspace-0b6124%40workspace%3A."
92339249
dependencies:
92349250
minimatch: "npm:^3.1.2"
92359251
peerDependencies:
92369252
typescript: ">=3.6.5"
9237-
checksum: 10c0/c638a0517e627a5b63034135e9ca7cb563ad64ae023ce55a91043e7690d22b217843a1e2e1c8e9f8dee667536a52b46b002c0264ec6a6206ecfe5e16a9349a57
9253+
checksum: 10c0/14b7936f4491a916375e3aa18bc771d3b02c8267526ad04e5562414098b29e07be9fa2ca0b46207c412ba5c5d0a35ae9543d56634a6c8672d92ca8ff46e3610f
92389254
languageName: node
92399255
linkType: hard
92409256

tsconfig.base.json

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
11
{
2-
"compilerOptions": {
3-
"noErrorTruncation": false,
4-
"declaration": false,
5-
6-
"lib": ["esnext"],
7-
"target": "es2018",
8-
"module": "CommonJS",
9-
"moduleResolution": "node",
10-
11-
"strict": true,
12-
"preserveConstEnums": true,
13-
"skipLibCheck": true,
14-
"removeComments": false,
15-
"allowSyntheticDefaultImports": true,
16-
"esModuleInterop": true,
17-
"preserveSymlinks": true
18-
}
2+
"extends": "@tsconfig/node18/tsconfig.json"
193
}

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "./tsconfig.base",
33
"include": ["src"],
44
"exclude": ["src/declarations"],
5-
65
"compilerOptions": {
76
"rootDir": "src",
87
"outDir": "dist",

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ __metadata:
102102
languageName: node
103103
linkType: hard
104104

105+
"@tsconfig/node18@npm:^18.2.4":
106+
version: 18.2.4
107+
resolution: "@tsconfig/node18@npm:18.2.4"
108+
checksum: 10c0/cdfd17f212660374eb2765cd5907b2252e43cfa2623cd52307a49f004327ef49bbe7d53c78b0aca57f33e9a5cb0d7d2eb5ded9be1235e6212f65c9f0699322b6
109+
languageName: node
110+
linkType: hard
111+
105112
"@types/minimatch@npm:^5.1.2":
106113
version: 5.1.2
107114
resolution: "@types/minimatch@npm:5.1.2"
@@ -1823,6 +1830,7 @@ __metadata:
18231830
version: 0.0.0-use.local
18241831
resolution: "typescript-transform-paths@workspace:."
18251832
dependencies:
1833+
"@tsconfig/node18": "npm:^18.2.4"
18261834
"@types/minimatch": "npm:^5.1.2"
18271835
"@types/node": "npm:^18.19.43"
18281836
"@types/ts-expose-internals": "npm:[email protected]"

0 commit comments

Comments
 (0)