diff --git a/lang/uniast/ast.go b/lang/uniast/ast.go index 50490ee..15ee92f 100644 --- a/lang/uniast/ast.go +++ b/lang/uniast/ast.go @@ -34,6 +34,7 @@ const ( TypeScript Language = "typescript" Java Language = "java" Unknown Language = "" + Kotlin Language = "kotlin" ) func (l Language) String() string { @@ -72,6 +73,8 @@ func NewLanguage(lang string) (l Language) { return TypeScript case "java": return Java + case "kotlin": + return Kotlin default: return Unknown } diff --git a/ts-parser/src/parser/ModuleParser.ts b/ts-parser/src/parser/ModuleParser.ts index d35acdf..547b52b 100644 --- a/ts-parser/src/parser/ModuleParser.ts +++ b/ts-parser/src/parser/ModuleParser.ts @@ -91,7 +91,7 @@ export class ModuleParser { } return { - Language: '', // TypeScript + Language: 'typescript', // TypeScript Version: moduleVersion, Name: moduleName, Dir: isExternal ? '' : relativeDir, diff --git a/ts-parser/src/types/uniast.ts b/ts-parser/src/types/uniast.ts index 2d28fb9..972e0cd 100644 --- a/ts-parser/src/types/uniast.ts +++ b/ts-parser/src/types/uniast.ts @@ -29,7 +29,7 @@ export interface Repository { * A compilation unit, e.g., a Go module or an npm package. */ export interface Module { - Language: 'go' | 'rust' | 'cxx' | 'python' | ''; + Language: 'go' | 'rust' | 'cxx' | 'python' | 'typescript' | ''; Version: string; Name: string; /** Path relative to the repository root. Empty string "" denotes an external dependency module. */ diff --git a/ts-parser/src/utils/monorepo.ts b/ts-parser/src/utils/monorepo.ts index 93617cd..ae38164 100644 --- a/ts-parser/src/utils/monorepo.ts +++ b/ts-parser/src/utils/monorepo.ts @@ -177,5 +177,4 @@ export class MonorepoUtils { console.warn(`Error discovering packages in ${currentDir}:`, error); } } - } \ No newline at end of file