Skip to content

Modernization - #16

Merged
patik merged 11 commits into
mainfrom
modernization
Jul 11, 2026
Merged

Modernization#16
patik merged 11 commits into
mainfrom
modernization

Conversation

@patik

@patik patik commented Jul 11, 2026

Copy link
Copy Markdown
Owner
  • Node 22 minimum version
  • Upgraded all dependencies
  • Migrated from ESLint to oxlint and from Prettier to oxfmt
  • TypeScript 7
  • Tech debt audit by Open AI's Sol 5.6

@patik
patik marked this pull request as ready for review July 11, 2026 18:36
Copilot AI review requested due to automatic review settings July 11, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/program/store/BranchStore.ts
Comment thread src/program/side-effects/check-for-git-repo.ts
Comment thread package.json Outdated
@patik
patik merged commit ec7fe2d into main Jul 11, 2026
3 checks passed
@patik
patik deleted the modernization branch July 11, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants