@hey-api/codegen-core
Advanced tools
+8
-4
@@ -632,3 +632,3 @@ import { loadConfig } from "c12"; | ||
| //#region src/project/namespace.ts | ||
| const kindRank = { | ||
| const typescriptMergeKindRank = { | ||
| class: 3, | ||
@@ -646,4 +646,4 @@ enum: 4, | ||
| */ | ||
| function canShareName(a, b) { | ||
| if (kindRank[a] > kindRank[b]) [a, b] = [b, a]; | ||
| function canTypeScriptDeclarationsShareIdentifier(a, b) { | ||
| if (typescriptMergeKindRank[a] > typescriptMergeKindRank[b]) [a, b] = [b, a]; | ||
| switch (a) { | ||
@@ -656,2 +656,6 @@ case "interface": return b === "class" || b === "interface"; | ||
| } | ||
| function canDeclarationsShareIdentifier(language, a, b) { | ||
| if (language === "typescript") return canTypeScriptDeclarationsShareIdentifier(a, b); | ||
| return false; | ||
| } | ||
@@ -1103,4 +1107,4 @@ //#endregion | ||
| while (true) { | ||
| if ([...localNames.get(finalName) ?? []].every((kind) => canShareName(symbol.kind, kind))) break; | ||
| const language = node?.language || symbol.node?.language || file.language; | ||
| if ([...localNames.get(finalName) ?? []].every((kind) => canDeclarationsShareIdentifier(language, symbol.kind, kind))) break; | ||
| const resolvedName = ((language ? this.project.nameConflictResolvers[language] : void 0) ?? this.project.defaultNameConflictResolver)({ | ||
@@ -1107,0 +1111,0 @@ attempt, |
+2
-2
| { | ||
| "name": "@hey-api/codegen-core", | ||
| "version": "0.0.0-next-20260316072320", | ||
| "version": "0.0.0-next-20260317020150", | ||
| "description": "đź§± TypeScript framework for generating files.", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
| "color-support": "1.1.3", | ||
| "@hey-api/types": "0.0.0-next-20260316072320" | ||
| "@hey-api/types": "0.1.4" | ||
| }, | ||
@@ -49,0 +49,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
195022
0.4%1734
0.23%+ Added
- Removed
Updated