From e5c20dde01b253787e16ae33f855da06670d0cb3 Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Sat, 31 Aug 2024 10:34:06 +0200 Subject: [PATCH] Fix helper name --- packages/knip/src/index.ts | 4 ++-- packages/knip/src/util/modules.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/knip/src/index.ts b/packages/knip/src/index.ts index 166bd3a11..c154cc533 100644 --- a/packages/knip/src/index.ts +++ b/packages/knip/src/index.ts @@ -19,7 +19,7 @@ import { getGitIgnoredHandler } from './util/globby.js'; import { getReferencedDependencyHandler } from './util/handle-dependency.js'; import { getHasStrictlyNsReferences, getType } from './util/has-strictly-ns-references.js'; import { getIsIdentifierReferencedHandler } from './util/is-identifier-referenced.js'; -import { getEntryPathFromManifest, getPackageNameFromModuleSpecifier } from './util/modules.js'; +import { getEntryPathsFromManifest, getPackageNameFromModuleSpecifier } from './util/modules.js'; import { dirname, join } from './util/path.js'; import { findMatch } from './util/regex.js'; import { getShouldIgnoreHandler, getShouldIgnoreTagHandler } from './util/tag.js'; @@ -176,7 +176,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => { principal.addReferencedDependencies(name, new Set(dependenciesFromManifest.map(id => [manifestPath, id]))); // Add entry paths from package.json#main, #bin, #exports - const entryPathsFromManifest = await getEntryPathFromManifest(manifest, { ...sharedGlobOptions, ignore }); + const entryPathsFromManifest = await getEntryPathsFromManifest(manifest, { ...sharedGlobOptions, ignore }); debugLogArray(name, 'Entry paths in package.json', entryPathsFromManifest); principal.addEntryPaths(entryPathsFromManifest); diff --git a/packages/knip/src/util/modules.ts b/packages/knip/src/util/modules.ts index 3f4607c51..1512ba1a9 100644 --- a/packages/knip/src/util/modules.ts +++ b/packages/knip/src/util/modules.ts @@ -36,7 +36,7 @@ export const getPackageFromDefinitelyTyped = (typedDependency: string) => { return typedDependency; }; -export const getEntryPathFromManifest = ( +export const getEntryPathsFromManifest = ( manifest: PackageJson, sharedGlobOptions: { cwd: string; workingDir: string; gitignore: boolean; ignore: string[] } ) => {