Skip to content

feat(cli): multi-team link#15400

Merged
brookemosby merged 8 commits intomainfrom
tomknickman/cli-194-search-across-teams-by-default-when-linking
Apr 1, 2026
Merged

feat(cli): multi-team link#15400
brookemosby merged 8 commits intomainfrom
tomknickman/cli-194-search-across-teams-by-default-when-linking

Conversation

@tknickman
Copy link
Copy Markdown
Member

@tknickman tknickman commented Mar 5, 2026

Support linking projects across teams by default.

Note

Low Risk Change

CLI feature adds cross-team project search functionality with new utility file and optional parameter; changes are limited to CLI tooling with no auth, schema, or billing impact.

  • New search-project-across-teams.ts utility for multi-team project lookup
  • Added skipAutoDetect parameter to inputProject function
  • Extensive test coverage for cross-team search scenarios

Risk assessment for commit 003eec2.

@tknickman tknickman requested review from a team as code owners March 5, 2026 23:14
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 436bc38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

🧪 Unit Test Strategy

Comparing: 9375048436bc38 (view diff)

Strategy: Affected packages only

✅ Only testing packages that have been modified or depend on modified packages.

Affected packages - 1 (3%)
  1. vercel
Unaffected packages - 39 (98%)
  1. @vercel-internals/get-package-json
  2. @vercel/backends
  3. @vercel/build-utils
  4. @vercel/cervel
  5. @vercel/cli-auth
  6. @vercel/client
  7. @vercel/config
  8. @vercel/detect-agent
  9. @vercel/edge
  10. @vercel/elysia
  11. @vercel/error-utils
  12. @vercel/express
  13. @vercel/fastify
  14. @vercel/firewall
  15. @vercel/frameworks
  16. @vercel/fs-detectors
  17. @vercel/functions
  18. @vercel/gatsby-plugin-vercel-builder
  19. @vercel/go
  20. @vercel/h3
  21. @vercel/hono
  22. @vercel/hydrogen
  23. @vercel/koa
  24. @vercel/nestjs
  25. @vercel/next
  26. @vercel/node
  27. @vercel/oidc
  28. @vercel/oidc-aws-credentials-provider
  29. @vercel/python
  30. @vercel/python-analysis
  31. @vercel/redwood
  32. @vercel/related-projects
  33. @vercel/remix-builder
  34. @vercel/routing-utils
  35. @vercel/ruby
  36. @vercel/rust
  37. @vercel/static-build
  38. @vercel/static-config
  39. examples

Results

  • Unit tests: Only affected packages will run unit tests
  • E2E tests: Running in parallel via E2E Tests workflow
  • Type checks: Only affected packages will run type checks

This comment is automatically generated based on the affected testing strategy

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

📦 CLI Tarball Ready

The Vercel CLI tarball for this PR is now available!

Quick Test

You can test this PR's CLI directly by running:

npx https://vercel-kpbm4shc4.vercel.sh/tarballs/vercel.tgz --help

Use in vercel.json

To use this CLI version in your project builds, add to your vercel.json:

{
  "build": {
    "env": {
      "VERCEL_CLI_VERSION": "vercel@https://vercel-kpbm4shc4.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

Python Runtime Wheel

A vercel-runtime wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_RUNTIME_PYTHON="vercel-runtime @ https://vercel-kpbm4shc4.vercel.sh/tarballs/vercel_runtime-0.13.0.dev1775070730+a5e8aaa-py3-none-any.whl"

Python Workers Wheel

A vercel-workers wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_WORKERS_PYTHON="vercel-workers @ https://vercel-kpbm4shc4.vercel.sh/tarballs/vercel_workers-0.1.0.dev1775070730+a5e8aaa-py3-none-any.whl"

…earch-across-teams-by-default-when-linking

Made-with: Cursor

# Conflicts:
#	packages/cli/src/util/link/setup-and-link.ts
Copy link
Copy Markdown
Contributor

@brookemosby brookemosby left a comment

Choose a reason for hiding this comment

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

LGTM

@brookemosby brookemosby enabled auto-merge (squash) March 31, 2026 19:56
Limit cross-team auto-search to the link command flow and make linked-project lookup degrade to not_linked when org/project records are unavailable, preventing unrelated command test regressions.

Made-with: Cursor
Repo-linked `vercel pull` writes project.json without projectId/orgId
(writeProjectSettings). getLinkFromDir validated the full link schema and
threw, blocking getProjectLink from resolving via .vercel/repo.json.

Return null when link IDs are absent so monorepo fixtures and real repos
keep working. Add unit tests for settings-only vs invalid link shapes.

Made-with: Cursor
Remove redundant expect(stderr).toOutput without await; it left a pending
promise that rejected after client.reset(), causing spurious timeouts in the
following test on CI.

Made-with: Cursor
@brookemosby brookemosby force-pushed the tomknickman/cli-194-search-across-teams-by-default-when-linking branch from a5e8aaa to 436bc38 Compare April 1, 2026 19:20
@brookemosby brookemosby merged commit b43797b into main Apr 1, 2026
223 of 225 checks passed
@brookemosby brookemosby deleted the tomknickman/cli-194-search-across-teams-by-default-when-linking branch April 1, 2026 20:26
ShayCichocki pushed a commit that referenced this pull request Apr 2, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/[email protected]

### Minor Changes

- Add experimental bundling to node bundler
([#15691](#15691))

## [email protected]

### Patch Changes

- Improve `vercel link` by searching matching project names across teams
by default, with clearer linking choices when multiple matches are
found. ([#15400](#15400))

- Updated dependencies
\[[`a50d9615ea546050b9f37dc7e5b4a81228987eef`](a50d961),
[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Updated dependencies
\[[`aa3ad226ef7b4ab98ef97e15f81c91f4f7c527e9`](aa3ad22)]:
    -   @vercel/[email protected]

## @vercel/[email protected]

### Patch Changes

- Update to latest Next.js adapter
([#15775](#15775))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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