feat(inspector): add exclude dev dependencies filter option#181
Merged
Conversation
commit: |
antfubot
added a commit
to antfubot/node-modules-inspector
that referenced
this pull request
Jul 21, 2026
Merge origin/main (antfu#181 exclude dev dependencies filter, antfu#182 e2e OTP fix, another own-repo module-type test fix) into this branch. - FiltersOptionExcludes.vue: the new "Exclude Dev Dependencies" OptionItem applies the same FormCheckbox treatment (`:div="true"` on OptionItem) as its siblings. - module-type.test.ts: main independently hit and fixed the same h3-became- ESM-only issue (swapping the "dual" fixture to `vue`) — take their fixture choice for consistency with upstream, keep this branch's more robust deterministic (file-relative, not hoist-order-dependent) resolution. `vue` resolves consistently regardless of which installed patch gets hoisted (same dual exports shape across 3.5.x), so no pinned devDependency needed; drop the now-unused tinyglobby one. Verified: vue-tsc --noEmit, eslint, vitest (87/87) and pnpm build all pass; live-checked the new Exclude Dev Dependencies checkbox renders and is positioned correctly. Created with the help of an agent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an "Exclude Dev Dependencies" toggle to the Excludes filter panel, alongside the existing exclude options (Types, Optional, Private, Workspace Roots).
When enabled, packages introduced only as dev dependencies are hidden — a package is excluded when its
flatClusterscontainsdep:devbut notdep:prod, and it is not a workspace root. Because exclusion propagates to the exclusive dependency subtree, this also hides any packages such dev deps exclusively introduced, while packages reachable through both prod and dev remain visible.Changes
shared/filters.ts— addexcludeDevtoFilterOptionsandFILTERS_SCHEMA(category: 'exclude', defaultfalse). This auto-wires it into URL query serialization, the Excludes reset button, and the activated-filter count.app/state/filters.ts— add theexcludeDevcheck tofiltersExcludePredicate; also removes a pre-existing duplicatedexcludeDtsline.app/components/panel/FiltersOptionExcludes.vue— add the checkbox to the Excludes panel.Typecheck (
vue-tsc --noEmit) and lint pass.This PR was created with the help of an agent.