Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use get-tsconfig to handle tsconfig file resolution #247

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions example/basic/tsconfig.json
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"baseUrl": "hej"
}
}
10 changes: 10 additions & 0 deletions example/extend-multiple/dir1/dir2/tsconfig.json
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"foo": [
"bar2"
]
}
}
}
5 changes: 5 additions & 0 deletions example/extend-multiple/dir1/tsconfig.json
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"baseUrl": "."
}
}
10 changes: 10 additions & 0 deletions example/extend-multiple/tsconfig.base.json
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"foo": [
"bar"
]
}
}
}
7 changes: 7 additions & 0 deletions example/extend-multiple/tsconfig.json
@@ -0,0 +1,7 @@
{
"extends": [
"./tsconfig.base.json",
"./dir1/tsconfig.json",
"./dir1/dir2/tsconfig.json"
]
}
11 changes: 11 additions & 0 deletions example/extend-node-module/tsconfig.json
@@ -0,0 +1,11 @@
{
"extends": "shared-tsconfig",
"compilerOptions": {
"baseUrl": "kalle",
"paths": {
"foo": [
"bar2"
]
}
}
}
11 changes: 11 additions & 0 deletions example/extend-overwrite/nested/tsconfig.json
@@ -0,0 +1,11 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "kalle",
"paths": {
"foo": [
"bar2"
]
}
}
}
11 changes: 11 additions & 0 deletions example/extend-overwrite/tsconfig.base.json
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"baseUrl": "olle",
"paths": {
"foo": [
"bar1"
]
},
"strict": true
}
}
10 changes: 10 additions & 0 deletions example/extend-without-extension/tsconfig.base.json
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"foo": [
"bar"
]
}
}
}
5 changes: 5 additions & 0 deletions example/extend-without-extension/tsconfig.json
@@ -0,0 +1,5 @@
{
"extends": [
"./tsconfig.base"
]
}
7 changes: 7 additions & 0 deletions example/inherited/tsconfig.base.json
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
"@": []
}
}
}
3 changes: 3 additions & 0 deletions example/inherited/tsconfig.json
@@ -0,0 +1,3 @@
{
"extends": "./tsconfig.preset.json"
}
3 changes: 3 additions & 0 deletions example/inherited/tsconfig.preset.json
@@ -0,0 +1,3 @@
{
"extends": "./tsconfig.base.json"
}
8 changes: 8 additions & 0 deletions example/invalid/tsconfig.json
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"paths": {
"foo": [
"bar"
]
}
}
3 changes: 3 additions & 0 deletions example/resolve-closest/dir1/dir2/tsconfig.json
@@ -0,0 +1,3 @@
{
"extends": "../tsconfig.json"
}
3 changes: 3 additions & 0 deletions example/resolve-closest/dir1/tsconfig.json
@@ -0,0 +1,3 @@
{
"extends": "../tsconfig.json"
}
5 changes: 5 additions & 0 deletions example/resolve-closest/tsconfig.json
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"baseUrl": "."
}
}
6 changes: 6 additions & 0 deletions example/with-comments/tsconfig.json
@@ -0,0 +1,6 @@
{
// my comment
"compilerOptions": {
"baseUrl": "hej"
}
}
5 changes: 5 additions & 0 deletions example/with-trailing-commas/tsconfig.json
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"baseUrl": "hej",
},
}
16 changes: 9 additions & 7 deletions package.json
Expand Up @@ -20,7 +20,7 @@
"node": ">=6"
},
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/jest": "^29.5.0",
"@types/minimist": "^1.2.2",
"@types/node": "^6.0.54",
"@types/strip-bom": "^3.0.0",
Expand All @@ -32,18 +32,17 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.2.9",
"husky": "^4.2.5",
"jest": "^27.3.1",
"jest": "^29.5.0",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating jest for compatibility with ts-jest

"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"rimraf": "^2.6.2",
"ts-jest": "^27.0.7",
"ts-jest": "^29.1.0",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating ts-jest for compatibility with typescript

"ts-node": "^10.7.0",
"typescript": "^4.5.2"
"typescript": "^5.0.3"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update typescript because get-tsconfig uses the new .d.cts and .d.mts file extensions which were not supported by TypeScript v4.5.2

},
"dependencies": {
"json5": "^2.2.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
"get-tsconfig": "^4.5.0",
"minimist": "^1.2.6"
},
"scripts": {
"start": "cd src && ts-node index.ts",
Expand All @@ -70,5 +69,8 @@
"hooks": {
"pre-commit": "lint-staged"
}
},
"volta": {
"node": "16.20.2"
}
}