@aku11i/phantom 4.0.0-0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/phantom.js +13 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aku11i/phantom",
3
- "version": "4.0.0-0",
3
+ "version": "5.0.0",
4
4
  "description": "A powerful CLI tool for managing Git worktrees for parallel development",
5
5
  "keywords": [
6
6
  "git",
package/phantom.js CHANGED
@@ -23229,7 +23229,8 @@ var githubCheckoutHelp = {
23229
23229
  }
23230
23230
  ],
23231
23231
  notes: [
23232
- "For PRs: Creates worktree named 'pulls/{number}' with the PR's branch",
23232
+ "For same-repo PRs: Worktree name matches the PR branch (e.g., 'feature/add-logging')",
23233
+ "For fork PRs: Worktree name is '{owner}/{branch}' (e.g., 'aku11i/feature/add-logging')",
23233
23234
  "For Issues: Creates worktree named 'issues/{number}' with a new branch",
23234
23235
  "",
23235
23236
  "Requirements:",
@@ -27094,11 +27095,17 @@ async function checkoutIssue(issue2, base) {
27094
27095
  }
27095
27096
 
27096
27097
  // ../github/src/checkout/pr.ts
27097
- async function checkoutPullRequest(pullRequest) {
27098
+ function getForkWorktreeName(pullRequest) {
27099
+ const [owner] = pullRequest.head.repo.full_name.split("/");
27100
+ if (!owner) {
27101
+ return pullRequest.head.ref;
27102
+ }
27103
+ return `${owner}/${pullRequest.head.ref}`;
27104
+ }
27105
+ async function checkoutPullRequest(pullRequest, worktreeName = pullRequest.isFromFork ? getForkWorktreeName(pullRequest) : pullRequest.head.ref) {
27098
27106
  const gitRoot = await getGitRoot();
27099
27107
  const context = await createContext(gitRoot);
27100
- const worktreeName = pullRequest.head.ref;
27101
- const localBranch = pullRequest.head.ref;
27108
+ const localBranch = worktreeName;
27102
27109
  const existsResult = await validateWorktreeExists(
27103
27110
  context.gitRoot,
27104
27111
  context.worktreesDirectory,
@@ -36695,7 +36702,7 @@ var StdioServerTransport = class {
36695
36702
  // ../mcp/package.json
36696
36703
  var package_default = {
36697
36704
  name: "@aku11i/phantom-mcp",
36698
- version: "4.0.0-0",
36705
+ version: "5.0.0",
36699
36706
  private: true,
36700
36707
  type: "module",
36701
36708
  main: "./src/index.ts",
@@ -37334,7 +37341,7 @@ import { parseArgs as parseArgs13 } from "node:util";
37334
37341
  // package.json
37335
37342
  var package_default2 = {
37336
37343
  name: "@aku11i/phantom-cli",
37337
- version: "4.0.0-0",
37344
+ version: "5.0.0",
37338
37345
  private: true,
37339
37346
  type: "module",
37340
37347
  scripts: {