From c64dbcdedcb115fdb6e4e8462381fc84233ed06d Mon Sep 17 00:00:00 2001 From: Setu Shah Date: Tue, 24 Nov 2026 16:42:50 -0800 Subject: [PATCH] fix: bump @salesforce/agents to 2.5.4 (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. --- package.json | 2 +- test/commands/agent/express-context/create.test.ts | 2 +- test/commands/agent/express-context/readCommands.test.ts | 9 ++++++++- test/commands/agent/express-context/upload.test.ts | 2 +- yarn.lock | 8 ++++---- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6bb8493b..9f9663e3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@inquirer/prompts": "^7.10.1", "@oclif/core": "^5.0.0", "@oclif/multi-stage-output": "^1.0.0", - "@salesforce/agents": "^2.5.0", + "@salesforce/agents": "^2.5.4", "@salesforce/core": "^9.1.9", "@salesforce/kit": "^4.0.0", "@salesforce/sf-plugins-core": "^13.0.0", diff --git a/test/commands/agent/express-context/create.test.ts b/test/commands/agent/express-context/create.test.ts index 81c987f3..0820883e 100644 --- a/test/commands/agent/express-context/create.test.ts +++ b/test/commands/agent/express-context/create.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */ import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; diff --git a/test/commands/agent/express-context/readCommands.test.ts b/test/commands/agent/express-context/readCommands.test.ts index c9ee23b6..663cfa9a 100644 --- a/test/commands/agent/express-context/readCommands.test.ts +++ b/test/commands/agent/express-context/readCommands.test.ts @@ -172,7 +172,14 @@ describe('agent express-context read/delete commands', () => { destroy.rejects(new Error('in use')); const result = await AgentExpressContextDelete.run(['--target-org', testOrg.username, '-i', LIB, '--no-prompt']); expect(result).to.deep.equal({ libraryId: LIB, deleted: true }); - expect(ux.warn.args.flat().join('\n')).to.include('FAQ_RetrieverAction').and.include('in use'); + expect( + ux.warn.args + .flat() + .map((w) => (typeof w === 'string' ? w : w.message)) + .join('\n') + ) + .to.include('FAQ_RetrieverAction') + .and.include('in use'); }); it('still deletes the library when the lookup fails', async () => { diff --git a/test/commands/agent/express-context/upload.test.ts b/test/commands/agent/express-context/upload.test.ts index 1d51e9dd..459d4fc5 100644 --- a/test/commands/agent/express-context/upload.test.ts +++ b/test/commands/agent/express-context/upload.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */ import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; import { tmpdir } from 'node:os'; diff --git a/yarn.lock b/yarn.lock index ea784782..bfe7351c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1431,10 +1431,10 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@salesforce/agents@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-2.5.0.tgz#46315617feab965ac19c70c2da8b1da3e19ac755" - integrity sha512-s4fBQwavMx59qnKdN6SOMAJkwinDWq8TyQisxQFeW3jVfh4rXC8Uqt6f65+fjtOjuepmO/6YwkRacufd3jHq+w== +"@salesforce/agents@^2.5.4": + version "2.5.4" + resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-2.5.4.tgz#a9e41880cdefa0821e58fb929afe1f4ae56f3ba7" + integrity sha512-zwSmTEXDc6prxvImJ1aycXCnyrJgxuLgp23/hyELzqLI3eyTMblyZNc0+kl8ZaChBYv5xdK47afqboFbmMulFg== dependencies: "@salesforce/core" "^9.0.0" "@salesforce/kit" "^4.0.0"