Conversation
- loadConfig: use readFileSync+JSON.parse for package.json instead of fs-extra-only readJsonSync, so the injectable fs contract holds - migrateLegacy: tighten param type to Record<string, unknown> - add .tagyrc.json load test case
Aligns with the brief's Interfaces block (promptsLib?) and prevents a compile error if index.ts calls runWizard without injecting prompts.
…onfig); clarify branch:null
…monize bump fs; restore lib tests
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
Rewrites
tagyas a general-purpose, git-first release tool that is no longer coupled topackage.json, and ports the codebase to TypeScript. Implemented from the approved design spec + plan indocs/superpowers/via task-by-task TDD with per-task review and a final whole-branch review.Defining shifts from v1
package.json. Config moves to a standalone.tagyrc(JSON, zero-dep parse). Resolution order:.tagyrc→.tagyrc.json→ legacypackage.json.tagy(offers one-time migration) → interactive wizard.bump/replaceare configured..tagyrc.Architecture
TypeScript under
src/, compiled with plaintsctodist/(published artifact). Modular, DI-friendly, one responsibility per file:lib.ts— pure helpers (color, semver, substitute, replace) ·git.ts— command builders + injectable shelljs wrappers ·bump.ts— structural JSON bumpers (package.json,composer.json) + replace rules +.tagyrcwriter ·config.ts— load/normalize/migrate ·wizard.ts— interactive prompts ·index.ts— thin orchestration ·cli.ts— shim.index.tsorchestration verified manually (build +--info+ soft e2e)..tagyrcschema{ "branch": null, // null = silent on master/main, confirm otherwise; string = require this branch "tagPrefix": "", // e.g. "v" -> tag "v1.2.3"; file versions stay unprefixed "bump": [], // structural bumps: ["package.json", "composer.json"] "replace": [], // regex rules: { files, from, to, flags } (__VERSION__ / __CURRENT_TAG__) "autoRelease": false // gh release without prompting }Other manifests (Cargo.toml, etc.) are handled via
replacerules. Thetagy.jshook still runs before push.CI / packaging
npm run buildbeforenpm publish; PR CI addsnpx tsc --noEmit(Node 20 + 22 matrix).files: ["dist"]— only compiled output ships.Breaking changes (v1 → v2)
package.json.tagy— moved to.tagyrc(one-time migrator offered on first run; preserves the implicitpackage.jsonbump).package.jsonbump is no longer automatic — it must be listed inbump(migrator adds it for upgraders).tagy.soft/method:"soft"config keys removed;--softflag remains.dist/.CLI flags are unchanged from v1.
Review notes
branch: null(documented default, not pinned);--softskips the branch-confirm prompt;--info/--reverseshort-circuit before any config/wizard (read-only--infonever launches the wizard);--customkeeps the previous tag for__CURRENT_TAG__.Not included
shelljs/prompts/semver/fs-extra/yargs) toward true zero-deps is a separate follow-up (eased by these module boundaries).🤖 Generated with Claude Code