Skip to content

Commit 95896ab

Browse files
aegilopsCopilot
andauthored
Update src/componentSubmission.ts
Co-authored-by: Copilot <[email protected]>
1 parent 8b51d9a commit 95896ab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/componentSubmission.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ function buildSparsePatterns(langs: string[]): string[] {
127127
add('**/*.sln');
128128
}
129129
}
130-
// Always include root lockfiles just in case
131-
add('package.json'); add('package-lock.json'); add('yarn.lock'); add('pnpm-lock.yaml');
130+
// Include root lockfiles only if JavaScript/TypeScript is among selected languages
131+
if (langs.some(l => ['javascript', 'typescript', 'node', 'js', 'ts'].includes(l.toLowerCase()))) {
132+
add('package.json'); add('package-lock.json'); add('yarn.lock'); add('pnpm-lock.yaml');
133+
}
132134
return Array.from(set);
133135
}
134136

0 commit comments

Comments
 (0)