Skip to content

Commit 8badaae

Browse files
authored
ci: add compile checking to subprojects (aws#5084)
Problem: Subprojects (not core/) are not compiled normally, and webpack uses `esbuild-loader`. This results in no typescript compilation checks during build and packaging. Note: by design `esbuild-loader` does not offer this, see https://github.com/privatenumber/esbuild-loader?tab=readme-ov-file#type-checking Solution: Add a type check to buildScripts. I did not notice any significant slow down, but if this is noticed later, we can instead use this recommended dependency https://github.com/TypeStrong/fork-ts-checker-webpack-plugin
1 parent 5a713ad commit 8badaae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"browser": "./dist/src/extensionWeb",
4747
"scripts": {
4848
"vscode:prepublish": "npm run clean && npm run buildScripts && webpack --mode production",
49-
"buildScripts": "npm run generateNonCodeFiles && npm run copyFiles && npm run syncPackageJson",
49+
"buildScripts": "npm run generateNonCodeFiles && npm run copyFiles && npm run syncPackageJson && tsc -p ./ --noEmit",
5050
"generateNonCodeFiles": "ts-node ../../scripts/generateNonCodeFiles.ts",
5151
"copyFiles": "ts-node ./scripts/build/copyFiles.ts",
5252
"syncPackageJson": "ts-node ./scripts/build/syncPackageJson.ts",

packages/toolkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"contributes": "This field will be autopopulated from the core module during debugging and packaging.",
5656
"scripts": {
5757
"vscode:prepublish": "npm run clean && npm run buildScripts && webpack --mode production",
58-
"buildScripts": "npm run generateNonCodeFiles && npm run copyFiles",
58+
"buildScripts": "npm run generateNonCodeFiles && npm run copyFiles && tsc -p ./ --noEmit",
5959
"generateNonCodeFiles": "ts-node ../../scripts/generateNonCodeFiles.ts",
6060
"copyFiles": "ts-node ./scripts/build/copyFiles.ts",
6161
"clean": "ts-node ../../scripts/clean.ts dist/ LICENSE NOTICE quickStart*",

0 commit comments

Comments
 (0)