Skip to content

Commit

Permalink
Merge pull request #4661 from relative-ci/navigate-duplicate-modules
Browse files Browse the repository at this point in the history
feat(utils): Module links - show duplicateSize when viewing duplicate modules
  • Loading branch information
vio authored Aug 25, 2024
2 parents 02c5763 + 85f9278 commit d510dcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/utils/src/config/component-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const MODULE_FILTERS = {
DUPLICATED: 'md',
FIRST_PARTY: 'fp',
THIRD_PARTY: 'tp',
METRIC: 'metric',
};

export const PACKAGE_FILTERS = {
Expand Down
4 changes: 3 additions & 1 deletion packages/utils/src/utils/component-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
} from '../config/component-links';
import I18N from '../i18n';

export type ComponentLinkFilters = Record<string, boolean>;
export type ComponentLinkFilters = Record<string, boolean | string>;

export interface ComponentLinkParams {
search?: string;
Expand Down Expand Up @@ -224,6 +224,7 @@ export const BUNDLE_MODULES: ComponentLink = {
// Keep a filter to allow the merge and skip default
[MODULE_FILTERS.CHANGED]: false,
},
[MODULE_FILTERS.METRIC]: 'totalSize',
},
},
};
Expand All @@ -237,6 +238,7 @@ export const BUNDLE_MODULES_DUPLICATE: ComponentLink = {
[MODULE_FILTERS.CHANGED]: false,
[MODULE_FILTERS.DUPLICATED]: true,
},
[MODULE_FILTERS.METRIC]: 'duplicateSize',
},
},
};
Expand Down

0 comments on commit d510dcc

Please sign in to comment.