diff --git a/package.json b/package.json index bf438ce3..e56d33f7 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts": { "postinstall": "pnpm compile", "compile": "pnpm -r -w=false run compile", - "test": "pnpm -r run test", + "test": "NODE_OPTIONS=--experimental-vm-modules pnpm -r run test", "test:type": "tsd", "lint": "pnpm -r run lint", "lint:fix": "pnpm -r run lint:fix" @@ -26,6 +26,7 @@ "@sap-cloud-sdk/http-client": "^3.18.0", "@types/jest": "^29.5.12", "@types/node": "^20.14.14", + "@jest/globals": "^29.5.12", "eslint": "^9.8.0", "jest": "^30.0.0-alpha.3", "nock": "^13.5.4", diff --git a/packages/ai-core/package.json b/packages/ai-core/package.json index c634c1aa..c0d88c36 100644 --- a/packages/ai-core/package.json +++ b/packages/ai-core/package.json @@ -18,7 +18,7 @@ ], "scripts": { "compile": "tsc", - "test": "jest", + "test": "NODE_OPTIONS=--experimental-vm-modules jest", "lint": "eslint . && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c", "lint:fix": "eslint . --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error" }, diff --git a/packages/gen-ai-hub/jest.config.mjs b/packages/gen-ai-hub/jest.config.mjs index b924aa93..e5b85b14 100644 --- a/packages/gen-ai-hub/jest.config.mjs +++ b/packages/gen-ai-hub/jest.config.mjs @@ -1,7 +1,5 @@ import config from '../../jest.config.mjs'; -const aiCoreConfig = { +export default { ...config, displayName: 'gen-ai-hub', }; - -export default aiCoreConfig; diff --git a/packages/gen-ai-hub/package.json b/packages/gen-ai-hub/package.json index 876cc4bf..6596f5e6 100644 --- a/packages/gen-ai-hub/package.json +++ b/packages/gen-ai-hub/package.json @@ -20,7 +20,7 @@ ], "scripts": { "compile": "tsc", - "test": "jest", + "test": "NODE_OPTIONS=--experimental-vm-modules jest", "lint": "eslint . && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c", "lint:fix": "eslint . --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error", "generate": "openapi-generator -i ./src/orchestration/spec/ -o ./src/orchestration/client" diff --git a/packages/gen-ai-hub/src/client/openai/openai-client.test.ts b/packages/gen-ai-hub/src/client/openai/openai-client.test.ts index 9b0284cb..3d179dda 100644 --- a/packages/gen-ai-hub/src/client/openai/openai-client.test.ts +++ b/packages/gen-ai-hub/src/client/openai/openai-client.test.ts @@ -1,15 +1,12 @@ import nock from 'nock'; +import { jest } from '@jest/globals'; import { HttpDestination } from '@sap-cloud-sdk/connectivity'; -import { mockGetAiCoreDestination } from '../../../test-util/mock-context.js'; +import { mockGetAiCoreDestination } from '../../test-util/mock-context.js'; import { BaseLlmParametersWithDeploymentId, EndpointOptions } from '../../core/http-client.js'; -import { - mockInference, - parseMockResponse -} from '../../../test-util/mock-http.js'; -import { OpenAiClient } from './openai-client.js'; +import { mockInference, parseMockResponse } from '../../test-util/mock-http.js'; import { OpenAiChatCompletionOutput, OpenAiChatCompletionParameters, @@ -17,6 +14,12 @@ import { OpenAiEmbeddingOutput, OpenAiEmbeddingParameters } from './openai-types.js'; +jest.unstable_mockModule('../../core/context.js', () => ({ + getAiCoreDestination: jest.fn(() => + Promise.resolve(mockGetAiCoreDestination()) + ) +})); +const { OpenAiClient } = await import('./openai-client.js'); describe('openai client', () => { let destination: HttpDestination; @@ -44,6 +47,10 @@ describe('openai client', () => { nock.cleanAll(); }); + afterAll(() => { + jest.restoreAllMocks(); + }); + describe('chatCompletion', () => { it('parses a successful response', async () => { const prompt = { diff --git a/packages/gen-ai-hub/src/core/context.test.ts b/packages/gen-ai-hub/src/core/context.test.ts index 7839555d..6a5c7c9a 100644 --- a/packages/gen-ai-hub/src/core/context.test.ts +++ b/packages/gen-ai-hub/src/core/context.test.ts @@ -1,7 +1,7 @@ import { mockAiCoreEnvVariable, mockClientCredentialsGrantCall -} from '../../test-util/mock-context.js'; +} from '../test-util/mock-context.js'; import { getAiCoreDestination } from './context.js'; describe('context', () => { diff --git a/packages/gen-ai-hub/src/core/http-client.test.ts b/packages/gen-ai-hub/src/core/http-client.test.ts index 3ca477aa..5dd5cfb0 100644 --- a/packages/gen-ai-hub/src/core/http-client.test.ts +++ b/packages/gen-ai-hub/src/core/http-client.test.ts @@ -1,7 +1,14 @@ +import { jest } from '@jest/globals'; import { HttpDestination } from '@sap-cloud-sdk/connectivity'; -import { mockGetAiCoreDestination } from '../../test-util/mock-context.js'; -import { mockInference } from '../../test-util/mock-http.js'; -import { executeRequest } from './http-client.js'; +import { mockGetAiCoreDestination } from '../test-util/mock-context.js'; +import { mockInference } from '../test-util/mock-http.js'; + +jest.unstable_mockModule('./context.js', () => ({ + getAiCoreDestination: jest.fn(() => + Promise.resolve(mockGetAiCoreDestination()) + ) +})); +const { executeRequest } = await import('./http-client.js'); describe('http-client', () => { let destination: HttpDestination; @@ -10,6 +17,10 @@ describe('http-client', () => { destination = mockGetAiCoreDestination(); }); + afterAll(() => { + jest.restoreAllMocks(); + }); + it('should execute a request to the AI Core service', async () => { const mockPrompt = { prompt: 'some test prompt' }; const mockPromptResponse = { completion: 'some test completion' }; diff --git a/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts b/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts index 321857b4..17af17f6 100644 --- a/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts +++ b/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts @@ -1,31 +1,39 @@ import nock from 'nock'; +import { jest } from '@jest/globals'; import { HttpDestination } from '@sap-cloud-sdk/connectivity'; -import { mockGetAiCoreDestination } from '../../test-util/mock-context.js'; -import { mockInference, parseMockResponse } from '../../test-util/mock-http.js'; +import { mockGetAiCoreDestination } from '../test-util/mock-context.js'; +import { mockInference, parseMockResponse } from '../test-util/mock-http.js'; import { BaseLlmParametersWithDeploymentId } from '../core/index.js'; -import { - GenAiHubClient, - constructCompletionPostRequest -} from './orchestration-client.js'; import { CompletionPostResponse } from './api/index.js'; import { GenAiHubCompletionParameters } from './orchestration-types.js'; +jest.unstable_mockModule('../core/context.js', () => ({ + getAiCoreDestination: jest.fn(() => + Promise.resolve(mockGetAiCoreDestination()) + ) +})); +const { GenAiHubClient, constructCompletionPostRequest } = await import( + './orchestration-client.js' +); describe('GenAiHubClient', () => { let destination: HttpDestination; - let client: GenAiHubClient; + const client = new GenAiHubClient(); const deploymentConfiguration: BaseLlmParametersWithDeploymentId = { deploymentId: 'deployment-id' }; beforeAll(() => { destination = mockGetAiCoreDestination(); - client = new GenAiHubClient(); }); afterEach(() => { nock.cleanAll(); }); + afterAll(() => { + jest.restoreAllMocks(); + }); + it('calls chatCompletion with minimum configuration and parses response', async () => { const request: GenAiHubCompletionParameters = { deploymentConfiguration, diff --git a/packages/gen-ai-hub/test-util/mock-context.ts b/packages/gen-ai-hub/src/test-util/mock-context.ts similarity index 93% rename from packages/gen-ai-hub/test-util/mock-context.ts rename to packages/gen-ai-hub/src/test-util/mock-context.ts index 34111624..6148aebe 100644 --- a/packages/gen-ai-hub/test-util/mock-context.ts +++ b/packages/gen-ai-hub/src/test-util/mock-context.ts @@ -4,7 +4,6 @@ import { ServiceCredentials } from '@sap-cloud-sdk/connectivity'; import nock from 'nock'; -import * as context from '../src/core/context.js'; export const aiCoreServiceBinding = { label: 'aicore', @@ -54,11 +53,6 @@ export function mockGetAiCoreDestination( authentication: 'OAuth2ClientCredentials', ...createDestinationTokens() }; - - jest - .spyOn(context, 'getAiCoreDestination') - .mockResolvedValue(mockDestination); - return mockDestination; } diff --git a/packages/gen-ai-hub/test-util/mock-data/openai/openai-chat-completion-success-response.json b/packages/gen-ai-hub/src/test-util/mock-data/openai/openai-chat-completion-success-response.json similarity index 100% rename from packages/gen-ai-hub/test-util/mock-data/openai/openai-chat-completion-success-response.json rename to packages/gen-ai-hub/src/test-util/mock-data/openai/openai-chat-completion-success-response.json diff --git a/packages/gen-ai-hub/test-util/mock-data/openai/openai-embeddings-success-response.json b/packages/gen-ai-hub/src/test-util/mock-data/openai/openai-embeddings-success-response.json similarity index 100% rename from packages/gen-ai-hub/test-util/mock-data/openai/openai-embeddings-success-response.json rename to packages/gen-ai-hub/src/test-util/mock-data/openai/openai-embeddings-success-response.json diff --git a/packages/gen-ai-hub/test-util/mock-data/openai/openai-error-response.json b/packages/gen-ai-hub/src/test-util/mock-data/openai/openai-error-response.json similarity index 100% rename from packages/gen-ai-hub/test-util/mock-data/openai/openai-error-response.json rename to packages/gen-ai-hub/src/test-util/mock-data/openai/openai-error-response.json diff --git a/packages/gen-ai-hub/test-util/mock-data/orchestration/genaihub-chat-completion-message-history.json b/packages/gen-ai-hub/src/test-util/mock-data/orchestration/genaihub-chat-completion-message-history.json similarity index 100% rename from packages/gen-ai-hub/test-util/mock-data/orchestration/genaihub-chat-completion-message-history.json rename to packages/gen-ai-hub/src/test-util/mock-data/orchestration/genaihub-chat-completion-message-history.json diff --git a/packages/gen-ai-hub/test-util/mock-data/orchestration/genaihub-chat-completion-success-response.json b/packages/gen-ai-hub/src/test-util/mock-data/orchestration/genaihub-chat-completion-success-response.json similarity index 100% rename from packages/gen-ai-hub/test-util/mock-data/orchestration/genaihub-chat-completion-success-response.json rename to packages/gen-ai-hub/src/test-util/mock-data/orchestration/genaihub-chat-completion-success-response.json diff --git a/packages/gen-ai-hub/test-util/mock-http.ts b/packages/gen-ai-hub/src/test-util/mock-http.ts similarity index 92% rename from packages/gen-ai-hub/test-util/mock-http.ts rename to packages/gen-ai-hub/src/test-util/mock-http.ts index 917ac6c2..847f9618 100644 --- a/packages/gen-ai-hub/test-util/mock-http.ts +++ b/packages/gen-ai-hub/src/test-util/mock-http.ts @@ -6,7 +6,7 @@ import { BaseLlmParameters, CustomRequestConfig, EndpointOptions -} from '../src/core/http-client.js'; +} from '../core/http-client.js'; const mockEndpoint: EndpointOptions = { url: 'mock-endpoint', @@ -44,7 +44,7 @@ export function mockInference( export function parseMockResponse(client: string, fileName: string): T { const fileContent = fs.readFileSync( - path.join('test-util', 'mock-data', client, fileName), + path.join('src', 'test-util', 'mock-data', client, fileName), 'utf-8' ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0db75f7..816ed8d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@changesets/cli': specifier: ^2.27.7 version: 2.27.7 + '@jest/globals': + specifier: ^29.5.12 + version: 29.7.0 '@sap-cloud-sdk/connectivity': specifier: ^3.18.0 version: 3.18.0 @@ -40,7 +43,7 @@ importers: version: 3.3.3 ts-jest: specifier: ^29.2.4 - version: 29.2.4(@babel/core@7.24.7)(@jest/types@29.6.3)(jest@30.0.0-alpha.5(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)))(typescript@5.5.4) + version: 29.2.4(@babel/core@7.24.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(jest@30.0.0-alpha.5(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)))(typescript@5.5.4) ts-node: specifier: ^10.9.2 version: 10.9.2(@types/node@20.14.14)(typescript@5.5.4) @@ -448,6 +451,10 @@ packages: node-notifier: optional: true + '@jest/environment@29.7.0': + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/environment@30.0.0-alpha.5': resolution: {integrity: sha512-uWnbbtArBcrR6T2XKPlNp5eCxe/48U0imDJMr2t63FIqoIZJOvrVbRtKQEhjzt+c9YkzNoVBOvgu7aLdwVrZ8g==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -460,14 +467,26 @@ packages: resolution: {integrity: sha512-DwWb4vqgp+Wc/vyrPY3afa5J2PnrKpzW+ckrViWMhp5gu4hnktatBiad9/E8+buUEZWFZLamcqpqk6KtuPQBXw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + '@jest/expect@29.7.0': + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/expect@30.0.0-alpha.5': resolution: {integrity: sha512-Gp4hyR6UUPyplIO9ipcXSSM19xMoWro3+W8VbPrqw9IuOpOs/rVfh3Tn62WP8ZfYYK7CAtUI+Fhx/jiqwTGPtw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + '@jest/fake-timers@29.7.0': + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/fake-timers@30.0.0-alpha.5': resolution: {integrity: sha512-DuQpJP7zz/vBd6/BweFit7+MJVgIEb4gHfoEd9TKIuvoQ4wcIm05LtMDIJYlPe+g/w/Ew01uMYNJ7acvbwxY0g==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + '@jest/globals@29.7.0': + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/globals@30.0.0-alpha.5': resolution: {integrity: sha512-4J+6X5IUmrzN3MNLK8BEJxOiA1iDCi7E3gmaIiTxc2w+E+wApxM7XZW7gvJFwqBJLCeo6uSPQ3vr2kcIABxzNQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -509,6 +528,10 @@ packages: resolution: {integrity: sha512-h8ZCs9XTPLJCxbc2o0EHCFsogx6j2RFJQsWuEoD7drnGw9cGYoopgZUjf64WaptGxh+WUwuqadfceKDQ//usMg==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + '@jest/transform@29.7.0': + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + '@jest/transform@30.0.0-alpha.5': resolution: {integrity: sha512-ng0RZBbSVWzkcLscV/orutlgz6WnVA1yUNGruZ6p8QLow628Gndpmd4JrOGRm66v8DFhwtPUkxzucTJ+3VNpkA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -615,6 +638,9 @@ packages: '@sinonjs/commons@3.0.1': resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + '@sinonjs/fake-timers@10.3.0': + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@sinonjs/fake-timers@11.2.2': resolution: {integrity: sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==} @@ -667,6 +693,9 @@ packages: '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + '@types/graceful-fs@4.1.9': + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -2006,6 +2035,10 @@ packages: resolution: {integrity: sha512-ARPyHe90hG5fJH7nkxnmSCIUpeCIJcsGAUA2+a0MwptFfNJKBOYpkq/SnFaS7i994R50E4n9Beq8kUC2vVVVkw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-haste-map@30.0.0-alpha.5: resolution: {integrity: sha512-9wCSxvqItNAiXfzEf7zuYG0mcmDCFKnkrneH0M60aDfnsQ5B4dHjs4UHcjtUJiM1txWMCa2fjTvNUP4RhwaGnQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -2030,6 +2063,10 @@ packages: resolution: {integrity: sha512-adNjtJLdcE0r1AlaV/9sSwBm6cT6c8/CdHE6IMTEIItvn/6+eSACom0ZaYVUkz8mCdE87DVp4E9JaI7CyfybNw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-mock@30.0.0-alpha.5: resolution: {integrity: sha512-n+KPnCMJOs+W4mhIQzaO0wVJiAbGDH/HMqa/Hq8V/QLNKNzCF9jqN+DHVn3OKmizyjX7fQmp/fg0SVHQTh/SCw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -2043,6 +2080,10 @@ packages: jest-resolve: optional: true + jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-regex-util@30.0.0-alpha.5: resolution: {integrity: sha512-b8LtZJTG17X/1Hm+s2A+YOh3pJbBoOV/K91N2Pl29MjcwsKwwlOUjkeY2GJwid+Z8kFZ7cbLYadDI7YCV+YEOA==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -2063,6 +2104,10 @@ packages: resolution: {integrity: sha512-u49zkJUaWV11sFtIFCOpOPhT2WDEYBjWiQ2vkiIZ+CqkWjjAdojnEJKwU9lVabUNo4JlKOBhbYpXaJyFak0EaQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-snapshot@30.0.0-alpha.5: resolution: {integrity: sha512-XMAnYEAgehvxNu+Hb+fJFf725XKp7WjbaWaPFpUJaxBXx/dGYCvyZxT+zONU6WbeYAguhQ33HeTxH3uAPAfhUw==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -2083,6 +2128,10 @@ packages: resolution: {integrity: sha512-TFzV/GtI3tA4ab0IP2HZyaZ7skMS1yu2HmLfznAjhFixZpdkA3zsRevH5nX0YZo+2zAO/jgrJoXdWH8OexjMug==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} + jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jest-worker@30.0.0-alpha.5: resolution: {integrity: sha512-BNOP7TMpf4Fw+f7IiVxXS//NroCY/nAzR4yAr5ABkHZDTh3eWIBwGWNCBqK/IBZcaStQYqvgTwjVWgfPAUalPQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} @@ -3220,6 +3269,10 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + write-file-atomic@4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + write-file-atomic@5.0.1: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -3304,10 +3357,10 @@ snapshots: '@babel/helper-compilation-targets': 7.24.7 '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) '@babel/helpers': 7.24.7 - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.3 '@babel/template': 7.25.0 '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 convert-source-map: 2.0.0 debug: 4.3.6 gensync: 1.0.0-beta.2 @@ -3333,21 +3386,21 @@ snapshots: '@babel/helper-environment-visitor@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/helper-function-name@7.24.7': dependencies: '@babel/template': 7.25.0 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/helper-hoist-variables@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/helper-module-imports@7.24.7': dependencies: '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color @@ -3367,13 +3420,13 @@ snapshots: '@babel/helper-simple-access@7.24.7': dependencies: '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 transitivePeerDependencies: - supports-color '@babel/helper-split-export-declaration@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/helper-string-parser@7.24.7': {} @@ -3386,7 +3439,7 @@ snapshots: '@babel/helpers@7.24.7': dependencies: '@babel/template': 7.25.0 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/highlight@7.24.7': dependencies: @@ -3397,7 +3450,7 @@ snapshots: '@babel/parser@7.24.7': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@babel/parser@7.25.3': dependencies: @@ -3491,8 +3544,8 @@ snapshots: '@babel/helper-function-name': 7.24.7 '@babel/helper-hoist-variables': 7.24.7 '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: @@ -3789,6 +3842,13 @@ snapshots: - supports-color - ts-node + '@jest/environment@29.7.0': + dependencies: + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.14.14 + jest-mock: 29.7.0 + '@jest/environment@30.0.0-alpha.5': dependencies: '@jest/fake-timers': 30.0.0-alpha.5 @@ -3804,6 +3864,13 @@ snapshots: dependencies: jest-get-type: 30.0.0-alpha.5 + '@jest/expect@29.7.0': + dependencies: + expect: 29.7.0 + jest-snapshot: 29.7.0 + transitivePeerDependencies: + - supports-color + '@jest/expect@30.0.0-alpha.5': dependencies: expect: 30.0.0-alpha.5 @@ -3811,6 +3878,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@jest/fake-timers@29.7.0': + dependencies: + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 20.14.14 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 + '@jest/fake-timers@30.0.0-alpha.5': dependencies: '@jest/types': 30.0.0-alpha.5 @@ -3820,6 +3896,15 @@ snapshots: jest-mock: 30.0.0-alpha.5 jest-util: 30.0.0-alpha.5 + '@jest/globals@29.7.0': + dependencies: + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 + transitivePeerDependencies: + - supports-color + '@jest/globals@30.0.0-alpha.5': dependencies: '@jest/environment': 30.0.0-alpha.5 @@ -3898,6 +3983,26 @@ snapshots: jest-haste-map: 30.0.0-alpha.5 slash: 3.0.0 + '@jest/transform@29.7.0': + dependencies: + '@babel/core': 7.24.7 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.25 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + micromatch: 4.0.7 + pirates: 4.0.6 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color + '@jest/transform@30.0.0-alpha.5': dependencies: '@babel/core': 7.24.7 @@ -4124,6 +4229,10 @@ snapshots: dependencies: type-detect: 4.0.8 + '@sinonjs/fake-timers@10.3.0': + dependencies: + '@sinonjs/commons': 3.0.1 + '@sinonjs/fake-timers@11.2.2': dependencies: '@sinonjs/commons': 3.0.1 @@ -4141,23 +4250,23 @@ snapshots: '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@types/body-parser@1.19.5': dependencies: @@ -4195,6 +4304,10 @@ snapshots: '@types/qs': 6.9.15 '@types/serve-static': 1.15.7 + '@types/graceful-fs@4.1.9': + dependencies: + '@types/node': 20.14.14 + '@types/http-errors@2.0.4': {} '@types/istanbul-lib-coverage@2.0.6': {} @@ -4508,7 +4621,7 @@ snapshots: babel-plugin-jest-hoist@30.0.0-alpha.5: dependencies: '@babel/template': 7.25.0 - '@babel/types': 7.24.7 + '@babel/types': 7.25.2 '@types/babel__core': 7.20.5 '@types/babel__traverse': 7.20.6 @@ -5730,6 +5843,22 @@ snapshots: jest-get-type@30.0.0-alpha.5: {} + jest-haste-map@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/graceful-fs': 4.1.9 + '@types/node': 20.14.14 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.11 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + jest-worker: 29.7.0 + micromatch: 4.0.7 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.3 + jest-haste-map@30.0.0-alpha.5: dependencies: '@jest/types': 30.0.0-alpha.5 @@ -5788,6 +5917,12 @@ snapshots: slash: 3.0.0 stack-utils: 2.0.6 + jest-mock@29.7.0: + dependencies: + '@jest/types': 29.6.3 + '@types/node': 20.14.14 + jest-util: 29.7.0 + jest-mock@30.0.0-alpha.5: dependencies: '@jest/types': 30.0.0-alpha.5 @@ -5798,6 +5933,8 @@ snapshots: optionalDependencies: jest-resolve: 30.0.0-alpha.5 + jest-regex-util@29.6.3: {} + jest-regex-util@30.0.0-alpha.5: {} jest-resolve-dependencies@30.0.0-alpha.5: @@ -5872,6 +6009,31 @@ snapshots: transitivePeerDependencies: - supports-color + jest-snapshot@29.7.0: + dependencies: + '@babel/core': 7.24.7 + '@babel/generator': 7.24.7 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.7) + '@babel/plugin-syntax-typescript': 7.24.7(@babel/core@7.24.7) + '@babel/types': 7.25.2 + '@jest/expect-utils': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.24.7) + chalk: 4.1.2 + expect: 29.7.0 + graceful-fs: 4.2.11 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + natural-compare: 1.4.0 + pretty-format: 29.7.0 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + jest-snapshot@30.0.0-alpha.5: dependencies: '@babel/core': 7.24.7 @@ -5936,6 +6098,13 @@ snapshots: jest-util: 30.0.0-alpha.5 string-length: 4.0.2 + jest-worker@29.7.0: + dependencies: + '@types/node': 20.14.14 + jest-util: 29.7.0 + merge-stream: 2.0.0 + supports-color: 8.1.1 + jest-worker@30.0.0-alpha.5: dependencies: '@types/node': 20.14.14 @@ -6857,7 +7026,7 @@ snapshots: dependencies: typescript: 5.5.4 - ts-jest@29.2.4(@babel/core@7.24.7)(@jest/types@29.6.3)(jest@30.0.0-alpha.5(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)))(typescript@5.5.4): + ts-jest@29.2.4(@babel/core@7.24.7)(@jest/transform@29.7.0)(@jest/types@29.6.3)(jest@30.0.0-alpha.5(@types/node@20.14.14)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)))(typescript@5.5.4): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -6872,6 +7041,7 @@ snapshots: yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.24.7 + '@jest/transform': 29.7.0 '@jest/types': 29.6.3 ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4): @@ -7105,6 +7275,11 @@ snapshots: wrappy@1.0.2: {} + write-file-atomic@4.0.2: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 3.0.7 + write-file-atomic@5.0.1: dependencies: imurmurhash: 0.1.4 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 26e0ec3a..4787eced 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,6 +7,4 @@ packages: # e2e tests - 'tests/e2e-tests' # exclude packages that are inside test directories - - '!poc/' - - '!test-util' - '!tests/type-tests'