Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23f8d27

Browse files
committed
TS: Simplify debugging
1 parent 8205a59 commit 23f8d27

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

javascript/extractor/lib/typescript/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build": "tsc --project tsconfig.json",
99
"check": "tsc --noEmit --project . && tslint --project .",
1010
"lint": "tslint --project .",
11-
"lint-fix": "tslint --project . --fix"
11+
"lint-fix": "tslint --project . --fix",
12+
"watch": "tsc -p . -w --sourceMap"
1213
},
1314
"devDependencies": {
1415
"@types/node": "12.7.11",

javascript/extractor/src/com/semmle/js/parser/TypeScriptParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ private File getParserWrapper() {
291291
LogbackUtils.getLogger(AbstractProcessBuilder.class).setLevel(Level.INFO);
292292
String explicitPath = Env.systemEnv().get(PARSER_WRAPPER_PATH_ENV_VAR);
293293
String semmleDistVar = Env.systemEnv().get(Env.Var.SEMMLE_DIST.name());
294-
if (semmleDistVar != null && !semmleDistVar.isEmpty()) {
295-
parserWrapper = new File(semmleDistVar, "tools/typescript-parser-wrapper/main.js");
296-
} else if (explicitPath != null) {
294+
if (explicitPath != null) {
297295
parserWrapper = new File(explicitPath);
296+
} else if (semmleDistVar != null && !semmleDistVar.isEmpty()) {
297+
parserWrapper = new File(semmleDistVar, "tools/typescript-parser-wrapper/main.js");
298298
} else {
299299
throw new CatastrophicError(
300300
"Could not find TypeScript parser: " + Env.Var.SEMMLE_DIST.name() + " is not set.");

0 commit comments

Comments
 (0)