refactor: modularize install.js into per-runtime modules#941
Open
amanape wants to merge 30 commits intogsd-build:mainfrom
Open
refactor: modularize install.js into per-runtime modules#941amanape wants to merge 30 commits intogsd-build:mainfrom
amanape wants to merge 30 commits intogsd-build:mainfrom
Conversation
…rter test coverage
…tenedCommands, cleanupOrphanedFiles
…kCommand, readSettings, writeSettings, processAttribution, parseJsonc, extractFrontmatterAndBody, cleanupOrphanedHooks, fileHash, generateManifest)
…e on tested install.js functions
…m bin/lib/core.js
…e bin/lib/ imports
…nstall.js into claude.js
…erage measurement
…all coverage confirmed
…and fix ROADMAP Phase 2 checkbox
…tructuring, inline-require in GSD_TEST_MODE block
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.
What
Breaks
bin/install.js(2464 lines) into focused, per-runtime modules underbin/lib/—core.js,codex.js,opencode.js,gemini.js,claude.js— reducing install.js to a thin orchestrator.Why
The monolithic installer handles 4 runtimes (Claude Code, OpenCode, Gemini, Codex) with distinct conversion, config, and install/uninstall logic all in one file. This makes it hard to test, maintain, and extend. The refactor enables per-module testing and clearer ownership of runtime-specific logic.
Changes
bin/lib/core.js(shared utilities/constants),bin/lib/codex.js,bin/lib/opencode.js,bin/lib/gemini.js,bin/lib/claude.js; migrated test imports fromGSD_TEST_MODEto per-module importsTesting
Checklist
Breaking Changes
None — all changes are internal. Existing CLI interface, flags, prompts, and output are unchanged.
tests/codex-config.test.cjsbackward compatibility preserved.