Skip to content

Commit 65ea1a1

Browse files
authored
remove "transpile-only" in tsconfig, use tsx (#369)
1. Remove nodemon/ts-node deps in favor of [tsx](https://tsx.is). Tsx is much faster than ts-node, but it doesn't do typechecking by default. (We were actually not doing typechecking either because tsconfig was set to transpile-only (which this PR also fixes)). 2. Switches tsconfig to not be transpile only because users and agents should know when types are wrong, so they can fix those errors proactively. Now, `npm run build` will actually throw if the typescript has errors. Tested it by creating new apps, and running them. Making sure they pick up the .env files automatically.
1 parent 9e9bd81 commit 65ea1a1

File tree

31 files changed

+411
-1668
lines changed

31 files changed

+411
-1668
lines changed

package-lock.json

Lines changed: 365 additions & 1574 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/templates/typescript/ai/package.json.hbs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "npx rimraf ./dist",
1414
"build": "npx tsup",
1515
"start": "node .",
16-
"dev": "npx nodemon -w \"./src/**\" -e ts --exec \"node -r ts-node/register -r dotenv/config ./src/index.ts\""
16+
"dev": "tsx watch -r dotenv/config src/index.ts"
1717
},
1818
"dependencies": {
1919
"@microsoft/teams.ai": "latest",
@@ -28,10 +28,9 @@
2828
"devDependencies": {
2929
"@types/node": "^22.5.4",
3030
"dotenv": "^16.4.5",
31-
"nodemon": "^3.1.4",
3231
"rimraf": "^6.0.1",
33-
"ts-node": "^10.9.2",
32+
"tsx": "^4.20.6",
3433
"tsup": "^8.4.0",
3534
"typescript": "^5.4.5"
3635
}
37-
}
36+
}

packages/cli/templates/typescript/ai/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
"outDir": "dist",
2020
"rootDir": "src",
2121
"types": ["node"]
22-
},
23-
"ts-node": {
24-
"transpileOnly": true
2522
}
2623
}

packages/cli/templates/typescript/echo/package.json.hbs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "npx rimraf ./dist",
1414
"build": "npx tsup",
1515
"start": "node .",
16-
"dev": "npx nodemon -w \"./src/**\" -e ts --exec \"node -r ts-node/register -r dotenv/config ./src/index.ts\""
16+
"dev": "tsx watch -r dotenv/config src/index.ts"
1717
},
1818
"dependencies": {
1919
"@microsoft/teams.api": "latest",
@@ -26,10 +26,9 @@
2626
"devDependencies": {
2727
"@types/node": "^22.5.4",
2828
"dotenv": "^16.4.5",
29-
"nodemon": "^3.1.4",
3029
"rimraf": "^6.0.1",
31-
"ts-node": "^10.9.2",
30+
"tsx": "^4.20.6",
3231
"tsup": "^8.4.0",
3332
"typescript": "^5.4.5"
3433
}
35-
}
34+
}

packages/cli/templates/typescript/echo/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
"outDir": "dist",
2020
"rootDir": "src",
2121
"types": ["node"]
22-
},
23-
"ts-node": {
24-
"transpileOnly": true
2522
}
2623
}

packages/cli/templates/typescript/graph/package.json.hbs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "npx rimraf ./dist",
1414
"build": "npx tsup",
1515
"start": "node .",
16-
"dev": "npx nodemon -w \"./src/**\" -e ts --exec \"node -r ts-node/register -r dotenv/config ./src/index.ts\""
16+
"dev": "tsx watch -r dotenv/config src/index.ts"
1717
},
1818
"dependencies": {
1919
"@microsoft/teams.api": "latest",
@@ -27,10 +27,9 @@
2727
"devDependencies": {
2828
"@types/node": "^22.5.4",
2929
"dotenv": "^16.4.5",
30-
"nodemon": "^3.1.4",
3130
"rimraf": "^6.0.1",
32-
"ts-node": "^10.9.2",
31+
"tsx": "^4.20.6",
3332
"tsup": "^8.4.0",
3433
"typescript": "^5.4.5"
3534
}
36-
}
35+
}

packages/cli/templates/typescript/graph/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
"outDir": "dist",
2020
"rootDir": "src",
2121
"types": ["node"]
22-
},
23-
"ts-node": {
24-
"transpileOnly": true
2522
}
2623
}

packages/cli/templates/typescript/mcp/package.json.hbs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "npx rimraf ./dist",
1414
"build": "npx tsc",
1515
"start": "node .",
16-
"dev": "npx nodemon -w \"./src/**\" -e ts --exec \"node -r ts-node/register -r dotenv/config ./src/index.ts\"",
16+
"dev": "tsx watch -r dotenv/config src/index.ts",
1717
"inspect": "npx cross-env SERVER_PORT=9000 npx @modelcontextprotocol/inspector -e NODE_NO_WARNINGS=1 -e PORT=3978 node
1818
-r dotenv/config ."
1919
},
@@ -33,9 +33,8 @@
3333
"@types/node": "^22.5.4",
3434
"cross-env": "^7.0.3",
3535
"dotenv": "^16.4.5",
36-
"nodemon": "^3.1.4",
3736
"rimraf": "^6.0.1",
38-
"ts-node": "^10.9.2",
37+
"tsx": "^4.20.6",
3938
"typescript": "^5.4.5"
4039
}
41-
}
40+
}

packages/cli/templates/typescript/mcp/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@
1919
"outDir": "dist",
2020
"rootDir": "src",
2121
"types": ["node"]
22-
},
23-
"ts-node": {
24-
"transpileOnly": true
2522
}
2623
}

packages/cli/templates/typescript/mcpclient/package.json.hbs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "npx rimraf ./dist",
1414
"build": "npx tsc",
1515
"start": "node .",
16-
"dev": "npx nodemon -w \"./src/**\" -e ts --exec \"node -r ts-node/register -r dotenv/config ./src/index.ts\""
16+
"dev": "tsx watch -r dotenv/config src/index.ts"
1717
},
1818
"dependencies": {
1919
"@microsoft/teams.api": "latest",
@@ -30,9 +30,8 @@
3030
"@types/node": "^22.5.4",
3131
"cross-env": "^7.0.3",
3232
"dotenv": "^16.4.5",
33-
"nodemon": "^3.1.4",
3433
"rimraf": "^6.0.1",
35-
"ts-node": "^10.9.2",
34+
"tsx": "^4.20.6",
3635
"typescript": "^5.4.5"
3736
}
38-
}
37+
}

0 commit comments

Comments
 (0)