From 5e844a614a4036800b255efc8a5db9df610e8d87 Mon Sep 17 00:00:00 2001 From: Dustin Healy <54083382+dustinhealy@users.noreply.github.com> Date: Tue, 23 Jun 2026 15:46:38 -0700 Subject: [PATCH] fix(ci): add @modelcontextprotocol/ext-apps to jest transformIgnorePatterns and fix import sort The package ships ESM-only; adding it to the babel-jest transform allow list lets all three jest configs (api, packages/api, and config which inherits api) process it correctly. Also sort imports in ToolCallInfo.tsx and MCPUIResourceCarousel.test.tsx which the CI sort-imports check flagged. --- api/jest.config.js | 1 + .../src/components/Chat/Messages/Content/ToolCallInfo.tsx | 2 +- .../MCPUIResource/__tests__/MCPUIResourceCarousel.test.tsx | 6 +++--- packages/api/jest.config.mjs | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/api/jest.config.js b/api/jest.config.js index daa12004d6..223a4b565e 100644 --- a/api/jest.config.js +++ b/api/jest.config.js @@ -6,6 +6,7 @@ const esModules = [ '@langchain/langgraph-checkpoint', '@langchain/langgraph-sdk', '@mistralai/mistralai', + '@modelcontextprotocol/ext-apps', 'uuid', ].join('|'); diff --git a/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx b/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx index 138bc41fc3..2df6792267 100644 --- a/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx +++ b/client/src/components/Chat/Messages/Content/ToolCallInfo.tsx @@ -1,8 +1,8 @@ import { useState, useMemo } from 'react'; import { ChevronDown } from 'lucide-react'; import { useLocalize, useExpandCollapse } from '~/hooks'; -import { cn } from '~/utils'; import { OutputRenderer } from './ToolOutput'; +import { cn } from '~/utils'; function isSimpleObject(obj: unknown): obj is Record { if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) { diff --git a/client/src/components/MCPUIResource/__tests__/MCPUIResourceCarousel.test.tsx b/client/src/components/MCPUIResource/__tests__/MCPUIResourceCarousel.test.tsx index 9f6f950c76..336ddffd5d 100644 --- a/client/src/components/MCPUIResource/__tests__/MCPUIResourceCarousel.test.tsx +++ b/client/src/components/MCPUIResource/__tests__/MCPUIResourceCarousel.test.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { render, screen } from '@testing-library/react'; import { RecoilRoot } from 'recoil'; +import { render, screen } from '@testing-library/react'; +import type { UIResource } from 'librechat-data-provider'; +import { useConversationUIResources } from '~/hooks/Messages/useConversationUIResources'; import { MCPUIResourceCarousel } from '../MCPUIResourceCarousel'; import { useOptionalMessagesConversation } from '~/Providers'; -import { useConversationUIResources } from '~/hooks/Messages/useConversationUIResources'; -import type { UIResource } from 'librechat-data-provider'; jest.mock('~/Providers', () => ({ useOptionalMessagesConversation: jest.fn(), diff --git a/packages/api/jest.config.mjs b/packages/api/jest.config.mjs index c6dfe06d92..402fb80434 100644 --- a/packages/api/jest.config.mjs +++ b/packages/api/jest.config.mjs @@ -3,6 +3,7 @@ const esModules = [ '@langchain/langgraph-checkpoint', '@langchain/langgraph-sdk', '@mistralai/mistralai', + '@modelcontextprotocol/ext-apps', 'uuid', ].join('|');