Skip to content

Commit

Permalink
fix: set default values for cacheSizeTasks and options in plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Oct 12, 2024
1 parent a3f4694 commit b782914
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tooling/measures/nx-performance/audit/cache-size.audit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function cacheSizeAudits(
options?: CacheSizeAuditOptions
): Promise<AuditOutput[]> {
const {
cacheSizeTasks,
cacheSizeTasks = [],
maxCacheSize = DEFAULT_MAX_PROJECT_TARGET_CACHE_SIZE,
} = options ?? {};

Expand Down
6 changes: 5 additions & 1 deletion tooling/measures/nx-performance/nx-performance.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export type NxPerfPluginConfig = {
TaskGraphAuditOptions;

export function nxPerformancePlugin(
options?: NxPerfPluginConfig
options: NxPerfPluginConfig = {
taskTimeTasks: [],
cacheSizeTasks: [],
taskGraphTasks: [],
}
): PluginConfig {
const allAudits = nxPerformanceAudits(options);
return {
Expand Down

0 comments on commit b782914

Please sign in to comment.