You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: drop leading underscores from module-private identifiers
Per the fleet's socket/no-underscore-identifier rule, leading
underscores on identifiers don't enforce privacy in TypeScript —
module boundaries (not exporting) and `_internal/` directories
do. The convention was carried over from other languages and added
noise without enforcement.
Renamed 48 identifiers across 31 files: memo-cache variables
in packages/cli/src/util/* (yarn/pnpm/npm/git/sea path caches),
config caches in src/util/config.mts, src/util/socket/sdk.mts,
src/util/git/github.mts; test-fixture and mock locals across
test/unit/, test/integration/, test/e2e/. All renames are
`_foo` → `foo`. One conflict (`_isYarnBerry` collided with the
exported `isYarnBerry` function in the same module scope)
resolved as `_isYarnBerry` → `cachedIsYarnBerry`.
Other fleet-rule fixes pulled in by re-cascading + verifying:
- execSync → @socketsecurity/lib-stable/spawn.spawnSync in
scripts/environment-variables.mts and two dlx-spawn tests
(prefer-spawn-over-execsync).
- McpHandleRequest type widened to `auth?: AuthInfo` (drop
`| undefined`) with a per-line bypass for
optional-explicit-undefined — the SDK target's
exactOptionalPropertyTypes-strict shape rejects bare-undefined
here while the lint rule wants it for pairing.
- Misc cascade-applied content drift from upstream wheelhouse
rule + script fixes.
Verified: pnpm run check --all passes; pnpm test passes.
'Incomplete OAuth configuration for HTTP mode. Set SOCKET_OAUTH_ISSUER, SOCKET_OAUTH_INTROSPECTION_CLIENT_ID, and SOCKET_OAUTH_INTROSPECTION_CLIENT_SECRET together.',
'No SOCKET_API_TOKEN configured and OAuth is not enabled. Run `socket login` or set OAuth env vars (SOCKET_OAUTH_ISSUER, SOCKET_OAUTH_INTROSPECTION_CLIENT_ID, SOCKET_OAUTH_INTROSPECTION_CLIENT_SECRET) before starting HTTP mode.',
// exactOptionalPropertyTypes. Cast our internal type to this at the
44
44
// call boundary when handing off; that's the narrow constraint, not
45
45
// our internal shape.
46
+
// oxlint-disable-next-line socket/optional-explicit-undefined -- SDK target type uses `auth?: AuthInfo` (no `| undefined`); under exactOptionalPropertyTypes the bare-undefined form rejects this assignment. Pair to the SDK shape, not the local AuthenticatedRequest.
0 commit comments