Skip to content

Commit 9132a5f

Browse files
mtorpjdalton
authored andcommitted
ensure --exclude and --include are not hidden
1 parent 45b30c6 commit 9132a5f

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

src/commands/fix/cmd-fix.mts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import path from 'node:path'
2-
32
import terminalLink from 'terminal-link'
43

54
import { arrayUnique, joinOr } from '@socketsecurity/registry/lib/arrays'
65
import { logger } from '@socketsecurity/registry/lib/logger'
76

8-
import { handleFix } from './handle-fix.mts'
97
import constants, {
108
ERROR_UNABLE_RESOLVE_ORG,
119
FLAG_ID,
@@ -21,6 +19,7 @@ import {
2119
} from '../../utils/output-formatting.mts'
2220
import { RangeStyles } from '../../utils/semver.mts'
2321
import { getDefaultOrgSlug } from '../ci/fetch-default-org-slug.mts'
22+
import { handleFix } from './handle-fix.mts'
2423

2524
import type { MeowFlag, MeowFlags } from '../../flags.mts'
2625
import type {
@@ -61,6 +60,22 @@ const generalFlags: MeowFlags = {
6160
// Hidden to allow custom documenting of the negated `--no-apply-fixes` variant.
6261
hidden: true,
6362
},
63+
exclude: {
64+
type: 'string',
65+
default: [],
66+
description:
67+
'Exclude workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags',
68+
isMultiple: true,
69+
hidden: false,
70+
},
71+
include: {
72+
type: 'string',
73+
default: [],
74+
description:
75+
'Include workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags',
76+
isMultiple: true,
77+
hidden: false,
78+
},
6479
majorUpdates: {
6580
type: 'boolean',
6681
default: true,
@@ -131,22 +146,7 @@ const hiddenFlags: MeowFlags = {
131146
...generalFlags['id'],
132147
hidden: true,
133148
} as MeowFlag,
134-
exclude: {
135-
type: 'string',
136-
default: [],
137-
description:
138-
'Exclude workspaces matching these patterns. Can be provided as comma separated values or as multiple flags',
139-
isMultiple: true,
140-
hidden: true,
141-
},
142-
include: {
143-
type: 'string',
144-
default: [],
145-
description:
146-
'Include workspaces matching these patterns. Can be provided as comma separated values or as multiple flags',
147-
isMultiple: true,
148-
hidden: true,
149-
},
149+
150150
maxSatisfying: {
151151
type: 'boolean',
152152
default: true,

src/commands/fix/cmd-fix.test.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'node:path'
2-
32
import { afterAll, afterEach, beforeAll, describe, expect } from 'vitest'
43

54
import { logger } from '@socketsecurity/registry/lib/logger'
@@ -172,11 +171,13 @@ describe('socket fix', async () => {
172171
Options
173172
--autopilot Enable auto-merge for pull requests that Socket opens.
174173
See GitHub documentation (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) for managing auto-merge for pull requests in your repository.
174+
--exclude Exclude workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags
175175
--id Provide a list of vulnerability identifiers to compute fixes for:
176176
- GHSA IDs (https://docs.github.com/en/code-security/security-advisories/working-with-global-security-advisories-from-the-github-advisory-database/about-the-github-advisory-database#about-ghsa-ids) (e.g., GHSA-xxxx-xxxx-xxxx)
177177
- CVE IDs (https://cve.mitre.org/cve/identifiers/) (e.g., CVE-2025-1234) - automatically converted to GHSA
178178
- PURLs (https://github.com/package-url/purl-spec) (e.g., pkg:npm/package@1.0.0) - automatically converted to GHSA
179179
Can be provided as comma separated values or as multiple flags
180+
--include Include workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags
180181
--json Output as JSON
181182
--limit The number of fixes to attempt at a time (default 10)
182183
--markdown Output as Markdown

0 commit comments

Comments
 (0)