Skip to content

Commit bfbcf5d

Browse files
committedFeb 19, 2025
Simplify function name
1 parent 63929e2 commit bfbcf5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎packages/knip/src/ProjectPrincipal.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export class ProjectPrincipal {
227227
filePath: string,
228228
options: Omit<GetImportsAndExportsOptions, 'skipExports'>,
229229
isGitIgnored: (filePath: string) => boolean,
230-
isPackageNameInternalWorkspace: (packageName: string) => boolean,
230+
isInternalWorkspace: (packageName: string) => boolean,
231231
getPrincipalByFilePath: (filePath: string) => undefined | ProjectPrincipal
232232
) {
233233
const fd = this.cache.getFileDescriptor(filePath);
@@ -254,7 +254,7 @@ export class ProjectPrincipal {
254254

255255
for (const [specifier, specifierFilePath] of specifiers) {
256256
const packageName = getPackageNameFromModuleSpecifier(specifier);
257-
if (packageName && isPackageNameInternalWorkspace(packageName)) {
257+
if (packageName && isInternalWorkspace(packageName)) {
258258
external.add(packageName);
259259
const principal = getPrincipalByFilePath(specifierFilePath);
260260
if (principal && !isGitIgnored(specifierFilePath)) principal.addNonEntryPath(specifierFilePath);

‎packages/knip/src/graph/build.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export async function build({
261261
const unreferencedFiles = new Set<string>();
262262
const entryPaths = new Set<string>();
263263

264-
const isPackageNameInternalWorkspace = (packageName: string) => chief.availableWorkspacePkgNames.has(packageName);
264+
const isInternalWorkspace = (packageName: string) => chief.availableWorkspacePkgNames.has(packageName);
265265

266266
const getPrincipalByFilePath = (filePath: string) => {
267267
const workspace = chief.findWorkspaceByFilePath(filePath);
@@ -286,7 +286,7 @@ export async function build({
286286
tags,
287287
},
288288
isGitIgnored,
289-
isPackageNameInternalWorkspace,
289+
isInternalWorkspace,
290290
getPrincipalByFilePath
291291
);
292292

0 commit comments

Comments
 (0)
Please sign in to comment.