Skip to content

Commit

Permalink
chore: Use tspc instead of mutating TypeScript's compiler
Browse files Browse the repository at this point in the history
With --swc, we no longer typecheck while running, so performance in checking is less important than having less magic
  • Loading branch information
PartMan7 committed Oct 28, 2024
1 parent 75279f4 commit d8224b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"prepare": "sh ./scripts/setup.sh",
"start": "ts-node --swc src/index.ts",
"test": "npm run lint && npm run tsc",
"tsc": "tsc"
"tsc": "tspc"
},
"keywords": [],
"author": "PartMan7",
Expand Down
1 change: 0 additions & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ set -x

husky install

ts-patch install -s
if ! [ -d node_modules/partbot-language-service-plugin ]
then
cp -r src/typescript/language-service-plugin node_modules/partbot-language-service-plugin
Expand Down
2 changes: 1 addition & 1 deletion src/typescript/language-service-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function init() {
// Remove UMD global suggestions
proxy.getSuggestionDiagnostics = fileName => {
const prior = info.languageService.getSuggestionDiagnostics(fileName);
return prior.filter(err => err.messageText.endsWith(UMD_SUGGESTION_MESSAGE));
return prior.filter(err => err.messageText.includes(UMD_SUGGESTION_MESSAGE));
};
return proxy;
}
Expand Down

0 comments on commit d8224b8

Please sign in to comment.