Skip to content

fix: add knip config, pre-commit hook, fix Zod compatibility, and remove unused code#38

Merged
ichoosetoaccept merged 1 commit intomainfrom
12-30-chore_add_knip_config_pre-commit_hook_fix_zod_compatibility_and_remove_unused_code
Dec 30, 2025
Merged

fix: add knip config, pre-commit hook, fix Zod compatibility, and remove unused code#38
ichoosetoaccept merged 1 commit intomainfrom
12-30-chore_add_knip_config_pre-commit_hook_fix_zod_compatibility_and_remove_unused_code

Conversation

@ichoosetoaccept
Copy link
Copy Markdown
Member

@ichoosetoaccept ichoosetoaccept commented Dec 30, 2025

Summary

Adds knip configuration for dead code detection, adds knip as a pre-commit hook, fixes Zod v3/v4 compatibility, and removes all unused code identified by knip.

Changes

Added

  • knip.json - Configuration for knip dead code detector with proper entry point
  • Pre-commit hook - knip runs on every commit to catch unused code early

Fixed

  • Zod v3/v4 compatibility - Replaced import { ZodType } from 'zod' with a permissive type alias to support both Zod versions

Removed (unused code)

  • src/utils/index.ts - Unused barrel file
  • getRegistry(), resetRegistry() - Unused singleton pattern in tool-registry
  • getLogger(), setLogger() - Unused singleton pattern in logger
  • GitLabClientConfig interface - Never used
  • RegistryAdapter export - Made private (only used internally)
  • Unused type re-exports from src/registry/index.ts

Verification

  • Build passes ✅
  • All 122 tests pass ✅
  • bunx knip reports no issues ✅
  • bun run check (biome) passes ✅

Copy link
Copy Markdown
Member Author

ichoosetoaccept commented Dec 30, 2025

@ichoosetoaccept ichoosetoaccept force-pushed the 12-30-chore_add_knip_config_pre-commit_hook_fix_zod_compatibility_and_remove_unused_code branch from 82f240a to f1d7d76 Compare December 30, 2025 09:57
@ichoosetoaccept ichoosetoaccept changed the title chore: add knip config, pre-commit hook, fix Zod compatibility, and remove unused code fix: add knip config, pre-commit hook, fix Zod compatibility, and remove unused code Dec 30, 2025
@ichoosetoaccept ichoosetoaccept marked this pull request as ready for review December 30, 2025 09:59
Copy link
Copy Markdown
Member Author

ichoosetoaccept commented Dec 30, 2025

Merge activity

  • Dec 30, 10:00 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 30, 10:03 AM UTC: Graphite rebased this pull request as part of a merge.
  • Dec 30, 10:04 AM UTC: @ichoosetoaccept merged this pull request with Graphite.

@ichoosetoaccept ichoosetoaccept changed the base branch from 12-30-chore_remove_broken_oauth-tests.ts_and_fix_remote-auth-tests.ts to graphite-base/38 December 30, 2025 10:01
@ichoosetoaccept ichoosetoaccept changed the base branch from graphite-base/38 to main December 30, 2025 10:02
@ichoosetoaccept ichoosetoaccept force-pushed the 12-30-chore_add_knip_config_pre-commit_hook_fix_zod_compatibility_and_remove_unused_code branch from f1d7d76 to 5ceab6e Compare December 30, 2025 10:03
@ichoosetoaccept ichoosetoaccept merged commit a34d956 into main Dec 30, 2025
3 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 30, 2025
## [0.3.1](v0.3.0...v0.3.1) (2025-12-30)

### Bug Fixes

* add knip config, pre-commit hook, fix Zod compatibility, and remove unused code ([#38](#38)) ([a34d956](a34d956))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.3.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this pull request Apr 1, 2026
# [2.1.0](v2.0.19...v2.1.0) (2026-04-01)

### Bug Fixes

* add knip config, pre-commit hook, fix Zod compatibility, and remove unused code ([#38](#38)) ([a34d956](a34d956))
* change default HOST from 0.0.0.0 to 127.0.0.1 ([zereight#289](https://github.com/detailobsessed/efficient-gitlab-mcp/issues/289)) ([4225366](4225366))
* **ci:** add Node.js 22 setup for semantic-release ([#13](#13)) ([941a64b](941a64b))
* **ci:** add permissions and secrets inherit for reusable workflow ([#15](#15)) ([2a41bfc](2a41bfc))
* **ci:** checkout release tag in npm-publish workflow ([#21](#21)) ([8094cd1](8094cd1))
* **ci:** remove persist-credentials false for semantic-release ([#14](#14)) ([e9d9db1](e9d9db1))
* correct bin format in package.json ([#26](#26)) ([91a1e98](91a1e98))
* create_or_update_file now properly updates existing files ([#2](#2)) ([6f97958](6f97958))
* use Node.js 24 for npm OIDC trusted publishing ([#25](#25)) ([5bcb716](5bcb716))
* use ubuntu-latest for npm publish (OIDC requires GitHub-hosted runners) ([#24](#24)) ([28155bc](28155bc))
* use workflow_run trigger for npm-publish (GITHUB_TOKEN releases don't emit events) ([#39](#39)) ([b544db2](b544db2))

### Features

* add 405 response for GET /mcp endpoint when STREAMABLE_HTTP is enabled. https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#listening-for-messages-from-the-server ([zereight#295](https://github.com/detailobsessed/efficient-gitlab-mcp/issues/295)) ([6a03064](6a03064))
* add GitLab search tools (global, project, group) ([#6](#6)) ([3e2e279](3e2e279))
* add GitLab tool modules with 52 tools and comprehensive tests ([#1](#1)) ([14bc851](14bc851))
* add HTTP transport security features ([#9](#9)) ([0eed0d6](0eed0d6))
* add MCP protocol logging for agent observability ([#10](#10)) ([85c4c50](85c4c50))
* add MCP Registry support with mcpName and server.json ([#30](#30)) ([19dd31e](19dd31e))
* add npm version badge to README ([#23](#23)) ([1c2cc84](1c2cc84))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant