Skip to content

Commit

Permalink
fix(analyze): respect directory option in analyze command
Browse files Browse the repository at this point in the history
  • Loading branch information
duniul committed Oct 1, 2024
1 parent f2582ba commit 529502e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/slow-spies-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'clean-modules': patch
---

Respect `directory` option in `analyze` command.
1 change: 1 addition & 0 deletions src/cli/commands/analyze.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class AnalyzeCommand extends BaseCommand {

async execute(): Promise<void> {
const analyzeResults = await analyze({
directory: this.directory,
globs: this.globs,
noDefaults: this.noDefaults,
globFile: this.globFile,
Expand Down
8 changes: 4 additions & 4 deletions src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export const DEFAULT_GLOBS_FILE_PATH = path.resolve(
);

export interface SharedOptions {
// The directory to clean, usually node_modules.
/** The directory to clean, usually node_modules. */
directory?: string;
// Path to a custom glob file. Uses `.cleanmodules` by default.
/** Path to a custom glob file. Uses `.cleanmodules` by default. */
globFile?: string;
// Whether or not to include clean-modules' default globs.
/** Whether or not to include clean-modules' default globs. */
noDefaults?: boolean;
// List of custom globs to include or exclude.
/** List of custom globs to include or exclude. */
globs?: string[] | undefined;
}

Expand Down

0 comments on commit 529502e

Please sign in to comment.