From cf6eb8c74ddb5465bc03cabcf1698aa7fbaa66fb Mon Sep 17 00:00:00 2001 From: Patrick McLaughlin Date: Thu, 16 Jan 2025 11:44:29 -0500 Subject: [PATCH] feat: Prioritize 'source' property in package.json Ticket: VL-2669 --- packages/openapi-generator/src/project.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/openapi-generator/src/project.ts b/packages/openapi-generator/src/project.ts index 1064051c..edca4dba 100644 --- a/packages/openapi-generator/src/project.ts +++ b/packages/openapi-generator/src/project.ts @@ -123,12 +123,12 @@ export class Project { let typesEntryPoint = ''; - if (packageInfo['types']) { - typesEntryPoint = packageInfo['types']; - } - - if (packageInfo['typings']) { + if (packageInfo['source']) { + typesEntryPoint = packageInfo['source']; + } else if (packageInfo['typings']) { typesEntryPoint = packageInfo['typings']; + } else if (packageInfo['types']) { + typesEntryPoint = packageInfo['types']; } if (!typesEntryPoint) {