Modernization - #16
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes git-prune-branches by raising the minimum Node.js version, upgrading dependencies/tooling (TypeScript, lint/format), and tightening CLI + Git-branch handling with improved tests and CI coverage.
Changes:
- Raise runtime/tooling baseline (Node.js >= 22, ES2024 target, updated deps, TS 7) and refresh CI/publish workflows.
- Migrate from ESLint/Prettier to oxlint/oxfmt and add Vitest coverage thresholds + coverage in CI.
- Refactor CLI initialization to parse/validate args up front, configure the singleton store explicitly, and harden branch-name handling (
--+ shell quoting).
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Disables file parallelism and adds coverage provider + thresholds. |
| tsconfig.json | Bumps TS target/lib to ES2024. |
| tsconfig.build.json | Adds build-only TS config excluding tests/snapshots. |
| src/utils/establish-args.ts | Adds --help, rejects positional args, and centralizes usage output. |
| src/tests/grouped-checkbox.test.ts | Updates expectations for safer command previews and adds quoting test. |
| src/tests/fixed-terminal-size.cjs | Forces deterministic terminal width for snapshot stability. |
| src/tests/demo/setup.ts | Improves integration repo setup with reusable seeded repo state. |
| src/program/store/store.ts | Switches to singleton store + explicit configureStore. |
| src/program/store/store.test.ts | Adds tests for configureStore behavior and cache invalidation. |
| src/program/store/BranchStore.ts | Hardens remote parsing, delimiter handling, and branch deletion execution (--). |
| src/program/store/BranchStore.test.ts | Adds regression tests for remote-prefix confusion and delimiter preservation. |
| src/program/side-effects/handle-control-c.ts | Removes global uncaughtException side-effect handler. |
| src/program/side-effects/check-for-git-repo.ts | Replaces async side-effect with explicit work-tree check + typed error. |
| src/program/index.ts | Moves to explicit init flow (args → configure store → repo check) and improves error routing. |
| src/program/constants.ts | Renames constants to DEFAULT_*. |
| src/program/confirm-deletion.ts | Safer command preview formatting and consistent -- separator. |
| src/index.ts | Updates shebang to node for built CLI entrypoint. |
| src/index.test.ts | Adds CLI help/invalid-args tests and stabilizes snapshots via fixed terminal size require. |
| README.md | Documents Node 22 requirement, --help, and updates dev run instructions. |
| pnpm-workspace.yaml | Adjusts pnpm build settings for dependencies like esbuild. |
| pnpm-lock.yaml | Locks upgraded dependency graph and new tooling deps. |
| package.json | Bumps version to 3.0.0, updates engines/tooling, adds clean/build pipeline and coverage script. |
| eslint.config.mjs | Removes ESLint config (migration off ESLint). |
| .prettierrc | Removes Prettier config (migration off Prettier). |
| .prettierignore | Removes Prettier ignore file (migration off Prettier). |
| .oxlintrc.json | Adds oxlint configuration mirroring prior lint rules. |
| .oxfmtrc.json | Adds oxfmt formatting configuration. |
| .github/workflows/publish-to-npm.yml | Pins pnpm via action-setup and aligns publish workflow tooling. |
| .github/workflows/lint-and-tests.yml | Updates Node matrix and runs coverage in CI. |
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.
Uh oh!
There was an error while loading. Please reload this page.