Skip to content

feat: config file support, internalize deps (23KB → 11KB), Windows fixes#47

Merged
nrjdalal merged 24 commits intomainfrom
feat/config-file-support
Mar 21, 2026
Merged

feat: config file support, internalize deps (23KB → 11KB), Windows fixes#47
nrjdalal merged 24 commits intomainfrom
feat/config-file-support

Conversation

@nrjdalal
Copy link
Owner

@nrjdalal nrjdalal commented Mar 21, 2026

Summary

  • Config file support: .gitpick.json / .gitpick.jsonc — run gitpick with no args to pick multiple files/folders in one command. Each entry follows the same <url> [target] CLI syntax
  • Internalize all external dependencies (23KB → 11KB, 53% reduction):
    • Replace terminal-link + 6 sub-deps with 1-line OSC 8 escape
    • Internalize trimmed yoctocolors (5 colors), yocto-spinner (start/success), nano-spawn (3 patterns), strip-json-comments (with trailing commas)
    • Remove external/ dir, scripts/external.sh, sync:external workflow
  • Symlink support: copyDir preserves symlinks instead of failing
  • Windows fixes: path.dirname for blob targets, split on both / and \
  • Cross-platform CI: test workflow on ubuntu, macos, windows (CLI + config + PowerShell path tests)
  • Tooling migration: prettier → oxfmt, simple-git-hooks → lefthook, added oxlint
  • Test restructure: tests/cli.sh, tests/config.sh, tests/windows.ps1, cross-platform tests/tree.mjs
  • Update README with config docs and package size

Closes #43

Test results (98 total)

Platform CLI Config Windows Paths
Ubuntu 14/14 14/14
macOS 14/14 14/14
Windows 14/14 14/14 14/14

🤖 Generated with Claude Code

- Run `gitpick` with no args to pick multiple files/folders from a
  `.gitpick.json` or `.gitpick.jsonc` config in cwd
- Each entry follows the same `<url> [target]` CLI syntax
- Externalize strip-json-comments for JSONC parsing
- Move tests to tests/ dir, output to .test-artifacts/
- Update external.sh to use oxfmt and alphabetical ordering
- Update README with config file docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nrjdalal nrjdalal force-pushed the feat/config-file-support branch from 0348267 to 9210b7a Compare March 21, 2026 11:51
nrjdalal and others added 22 commits March 21, 2026 17:24
oxfmt converts single quotes to double quotes, so the sed import
rewrites were silently not matching in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update all external dependencies to latest commit hashes
- Fix sed patterns for oxfmt double quotes
- Fix trailing comma handling in JSONC parsing
- Config test now verifies all 14 entries individually

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace terminal-link + 6 sub-deps with 1-line OSC 8 escape
- Internalize yoctocolors (trimmed to 5 used colors)
- Internalize yocto-spinner (trimmed to start/success)
- Internalize nano-spawn (trimmed to 3 usage patterns)
- Internalize strip-json-comments (with trailing commas built-in)
- Remove external/ dir, scripts/external.sh, sync:external
- Move .gitpick.jsonc to tests/fixtures.jsonc
- Unify test script: build → cli → config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- nano-spawn.ts, strip-json-comments.ts, yocto-spinner.ts, yoctocolors.ts
- bin/utils/ now only contains gitpick's own code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15-line node script replaces system tree command dependency.
Works on all platforms with no external deps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The blob target path logic split only on / which failed when
Windows backslash paths contained a dot (e.g. .test-artifacts\1).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nrjdalal nrjdalal changed the title feat: add .gitpick.json/.jsonc config file support feat: config file support, internalize deps (23KB → 11KB), Windows fixes Mar 21, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nrjdalal nrjdalal merged commit 4b08899 into main Mar 21, 2026
5 checks passed
@nrjdalal nrjdalal deleted the feat/config-file-support branch March 21, 2026 14:03
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.

Support for copying multiple files/folders to arbitrary destinations in a single command

1 participant