Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import { filters } from '../../state/filters'
<OptionItem title="Exclude Types Packages" description="Exclude TypeScript declaration packages">
<OptionCheckbox v-model="filters.state.excludeDts" />
</OptionItem>
<OptionItem title="Exclude Dev Dependencies" description="Exclude packages introduced only as dev dependencies">
<OptionCheckbox v-model="filters.state.excludeDev" />
</OptionItem>
<OptionItem title="Exclude Optional Packages" description="Exclude optional packages">
<OptionCheckbox v-model="filters.state.excludeOptional" />
</OptionItem>
Expand Down
2 changes: 1 addition & 1 deletion packages/node-modules-inspector/src/app/state/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const filtersWhy = computed(() => state.why?.length ? constructPackageFilters(st
export function filtersExcludePredicate(pkg: PackageNode) {
if (state.excludeDts && pkg.resolved.module === 'dts')
return true
if (state.excludeDts && pkg.resolved.module === 'dts')
if (state.excludeDev && !pkg.workspace && pkg.flatClusters.has(CLUSTER_DEP_DEV) && !pkg.flatClusters.has(CLUSTER_DEP_PROD))
return true
if (state.excludeOptional && !pkg.filepath)
return true
Expand Down
2 changes: 2 additions & 0 deletions packages/node-modules-inspector/src/shared/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface FilterOptions {

excludes: null | string[]
excludeDts: boolean
excludeDev: boolean
excludeOptional: boolean
excludePrivate: boolean
excludeWorkspace: boolean
Expand Down Expand Up @@ -46,6 +47,7 @@ export const FILTERS_SCHEMA: {
// Excludes
excludes: { type: Array, default: null, category: 'exclude' },
excludeDts: { type: Boolean, default: true, category: 'exclude' },
excludeDev: { type: Boolean, default: false, category: 'exclude' },
excludeOptional: { type: Boolean, default: true, category: 'exclude' },
excludePrivate: { type: Boolean, default: false, category: 'exclude' },
excludeWorkspace: { type: Boolean, default: import.meta.env.BACKEND === 'webcontainer', category: 'exclude' },
Expand Down
Loading