Repository navigation
chore(deps): remove hosted-git-info, meow, try-resolve - #25
Merged
Merged
Conversation
- Parse "owner/repo" from GitHub remote URL with a small regexp instead of hosted-git-info - Use require.resolve instead of deprecated try-resolve - Use node:util parseArgs instead of meow - Keep existing options (--dry-run/-d, --labels/-l, --token, --allow-added-labels/-A, --addReleaseYml, --addReleaseYmlOutputPath) - Also accept camelCase --dryRun/--allowAddedLabels as meow did Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgKh95YqMvG1Q3AQ2aaqjN
- Use URL API for URL-style remotes so ports, www.github.com, query and fragment are handled - Keep a separate branch for SCP-like remotes (git@github.com:owner/repo.git) - Enable parseArgs allowNegative to accept --no-dry-run / --no-allow-added-labels Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgKh95YqMvG1Q3AQ2aaqjN
Rewrite --dryRun / --allowAddedLabels (and --no-* forms) to dashed names before parseArgs, instead of defining them as separate options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgKh95YqMvG1Q3AQ2aaqjN
Draft
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
Remove three runtime dependencies and replace them with small built-in alternatives. Runtime dependencies are now only
git-remote-origin-urlandgithub-label-sync.parseGitHubRepositoryinsrc/github-label-setup.tsthat extractsowner/repofrom a GitHub remote URL (SSH, HTTPS,ssh://,git+https://, URLs with credentials, repo names containing dots). Non-GitHub URLs returnundefined(this tool targets GitHub only).@types/hosted-git-infois removed too.require.resolvewrapped in try/catch, using the existingcreateRequire.node:utilparseArgsinbin/cmd.mjs.parseArgsis stable since Node.js v20.0.0, and CI covers Node.js 20 / 22 / 24.--dry-run/-d,--labels/-l,--token,--allow-added-labels/-A,--addReleaseYml,--addReleaseYmlOutputPath,--help/-h,--version.--dryRun/--allowAddedLabelsthat meow accepted still work.Behavior change
Unknown options now print an error plus the help text and exit with code 2. Before, meow silently ignored them.
Test
pnpm run buildpassesparseGitHubRepositorychecked against SSH / HTTPS /ssh:///git+https:/// token-in-URL / GitLab / dotted repo name--help,--version, an unknown option,-d -l labels.json(the labels file and the repo resolve, then it stops at the missing token),-l nope.json(label-file-not-found error),--addReleaseYml --addReleaseYmlOutputPath <path>Note
github-label-sync(both 2.3.1 and 3.0.0) is marked deprecated on npm, and allpnpm auditfindings come from its dependency tree (octonode→request, …). That is out of scope for this PR.Generated by Claude Code