Skip to content

fix: bump @salesforce/agents to 2.5.4 (W-25031373) - #521

Merged
setu4993 merged 1 commit into
mainfrom
W-25031373-bump-agents
Nov 25, 2026
Merged

setu4993 merged 1 commit into
mainfrom
W-25031373-bump-agents

Conversation

@setu4993

@setu4993 setu4993 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

main doesn't build. #510 imports AgentExpressContext (and ExpressContextLibrarySummary) from @salesforce/agents. Those first shipped in 2.5.1, but yarn.lock still pins 2.5.0, so tsc and yarn lint fail on main.

  • Bump @salesforce/agents to ^2.5.4 (current latest).
  • With the types resolving, lint flags three issues in W-24129730: AgentExpressContext support. #510's tests: two unused no-unsafe-assignment entries in eslint-disable comments, and a no-base-to-string error from joining ux.warn args, which can be StructuredMessage objects. The test now maps them to their message text.

#510 came from a fork, so the tests workflow never ran on it. That's the gap #522 closes.

Testing: yarn build, yarn lint and yarn test pass locally (pre-commit and pre-push hooks).

What issues does this PR fix or reference?

@W-25031373@

#510 imports AgentExpressContext from @salesforce/agents, which first shipped in 2.5.1,
but yarn.lock still pinned 2.5.0, so main failed to build and lint.

With the types resolving, lint also flagged #510's tests: two unused eslint-disable
rules, and joining SfCommand warnings that can be StructuredMessage objects.
@setu4993
setu4993 marked this pull request as ready for review November 25, 2026 01:24
@setu4993
setu4993 requested a review from a team as a code owner November 25, 2026 01:24
@setu4993
setu4993 enabled auto-merge (squash) November 25, 2026 01:25
@setu4993
setu4993 merged commit 62eae9d into main Nov 25, 2026
28 checks passed
@setu4993
setu4993 deleted the W-25031373-bump-agents branch November 25, 2026 01:37
setu4993 added a commit that referenced this pull request Nov 25, 2026
### What does this PR do?

**Stacked on #521** (the `@salesforce/agents` bump that fixes `main`'s
build). The base is that branch, so the diff here shows only the CI
change. Once #521 merges, GitHub retargets this PR to `main`.

Fork PRs never get unit tests or NUTs here. `test.yml` only runs on
`push`, and pushing to a fork fires `push` in the fork, not in this
repo. #510 is an example: it came from a fork, merged with no tests run,
and broke `main` (fixed in #521).

- Run `test.yml` on `pull_request` instead of on branch pushes. Every
PR, fork or not, gets one run per commit, on the PR merged into its
base. Pushing a branch without a PR no longer runs tests; open a draft
PR or run the workflow by hand. A PR with merge conflicts doesn't run
until they're resolved.
- Skip NUTs on fork PRs. They need the org secrets, which GitHub doesn't
pass to fork PRs.
- Run every job, NUTs included, on `main` after each merge.
- Add a `merge_group` trigger so a merge queue can run every job, NUTs
included, on the PR merged into `main`. That run happens in this repo,
with secrets, only after a maintainer queues the PR.
- Run the Linux, Windows and macOS unit tests in parallel. macOS is new:
a `macos-unit-tests` job (the shared workflows have no macOS unit tests)
on the current Node LTS, and `macos-latest` in the NUT matrix. That adds
5 NUT jobs per run, so 5 more test orgs per run. The macOS job's two
shared actions are pinned to a commit SHA, since SAST flags `@main`.
Dependabot only updates npm here, so bump the SHA by hand.
- Add two checks for branch protection and the merge queue to require:
- `unit-tests` fails unless the lockfile check and every unit-test job
succeeded. The per-job unit-test checks include the Node version in
their names (e.g. `linux-unit-tests (26.13.0)`), so they can't be
required reliably.
- `nut-tests` fails unless every NUT job succeeded. It's skipped on fork
PRs, which GitHub counts as passing, so requiring it doesn't block them.
Once the merge queue is on, the queue runs their NUTs before merge.

**After merge (admin):** `main` has no required status checks today.
Requiring `unit-tests` and `nut-tests` would stop untested fork PRs like
#510 from merging. PRs from branches in this repo would also wait for
NUTs.

Before turning on the merge queue for `main`: the shared Dependabot
automerge merges through the REST API, which a required queue blocks, so
the bot needs a bypass or to queue PRs instead. Also set the queue's
status check timeout above the slowest NUT run.

**Testing:** actionlint passes, and so do the pre-commit and pre-push
hooks (`yarn build`, `yarn lint`, `yarn test`). This PR is from a branch
in this repo, so its run covers the in-repo PR path, NUTs included. The
fork, merge queue and `main` paths first run after merge.

Same change in forcedotcom/agents:
forcedotcom/agents#408

### What issues does this PR fix or reference?

@W-25031373@
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