diff --git a/packages/aipex-react/package.json b/packages/aipex-react/package.json index 884cc0a3..d144983c 100644 --- a/packages/aipex-react/package.json +++ b/packages/aipex-react/package.json @@ -129,7 +129,7 @@ "@ai-sdk/anthropic": "^2.0.51", "@ai-sdk/google": "^2.0.44", "@ai-sdk/openai": "^2.0.75", - "@ai-sdk/openai-compatible": "^1.0.28", + "@ai-sdk/openai-compatible": "^2.0.4", "@aipexstudio/aipex-core": "workspace:*", "@radix-ui/react-avatar": "^1.1.11", "@radix-ui/react-collapsible": "^1.1.12", diff --git a/packages/aipex-react/src/components/fake-mouse/fake-mouse.test.tsx b/packages/aipex-react/src/components/fake-mouse/fake-mouse.test.tsx index 417ed918..722aaf37 100644 --- a/packages/aipex-react/src/components/fake-mouse/fake-mouse.test.tsx +++ b/packages/aipex-react/src/components/fake-mouse/fake-mouse.test.tsx @@ -2,7 +2,7 @@ * Tests for FakeMouse component */ -import { render, waitFor } from "@testing-library/react"; +import { act, render, waitFor } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import { FakeMouse } from "./fake-mouse"; import type { FakeMouseController } from "./types"; @@ -41,7 +41,9 @@ describe("FakeMouse", () => { expect(controller).not.toBeNull(); }); - controller!.show(); + await act(async () => { + controller!.show(); + }); await waitFor(() => { const svg = document.querySelector("svg"); @@ -64,8 +66,10 @@ describe("FakeMouse", () => { expect(controller).not.toBeNull(); }); - controller!.show(); - controller!.showTooltip("Test tooltip"); + await act(async () => { + controller!.show(); + controller!.showTooltip("Test tooltip"); + }); await waitFor(() => { const tooltipText = document.body.textContent; @@ -94,7 +98,9 @@ describe("FakeMouse", () => { expect(controller).not.toBeNull(); }); - controller!.show(); + await act(async () => { + controller!.show(); + }); await waitFor(() => { const cursor = document.querySelector('[style*="width"]'); @@ -117,14 +123,18 @@ describe("FakeMouse", () => { expect(controller).not.toBeNull(); }); - controller!.show(); + await act(async () => { + controller!.show(); + }); await waitFor(() => { const svg = document.querySelector("svg"); expect(svg).not.toBeNull(); }); - unmount(); + await act(async () => { + unmount(); + }); await waitFor(() => { const svg = document.querySelector("svg"); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2073da05..e0cc5337 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,8 +48,8 @@ importers: specifier: ^2.0.75 version: 2.0.75(zod@4.1.13) '@ai-sdk/openai-compatible': - specifier: ^1.0.28 - version: 1.0.28(zod@4.1.13) + specifier: ^2.0.4 + version: 2.0.4(zod@4.1.13) '@aipexstudio/aipex-core': specifier: workspace:* version: link:../core @@ -441,8 +441,8 @@ packages: peerDependencies: zod: ^3.25.76 || ^4.1.8 - '@ai-sdk/openai-compatible@1.0.28': - resolution: {integrity: sha512-yKubDxLYtXyGUzkr9lNStf/lE/I+Okc8tmotvyABhsQHHieLKk6oV5fJeRJxhr67Ejhg+FRnwUOxAmjRoFM4dA==} + '@ai-sdk/openai-compatible@2.0.4': + resolution: {integrity: sha512-kzsXyybJKM3wtUtGZkNbvmpDwqpsvg/hTjlPZe3s/bCx3enVdAlRtXD853nnj6mZjteNCDLoR2OgVLuDpyRN5Q==} engines: {node: '>=18'} peerDependencies: zod: ^3.25.76 || ^4.1.8 @@ -468,6 +468,12 @@ packages: peerDependencies: zod: ^3.25.76 || ^4.1.8 + '@ai-sdk/provider-utils@4.0.4': + resolution: {integrity: sha512-VxhX0B/dWGbpNHxrKCWUAJKXIXV015J4e7qYjdIU9lLWeptk0KMLGcqkB4wFxff5Njqur8dt8wRi1MN9lZtDqg==} + engines: {node: '>=18'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + '@ai-sdk/provider@1.0.9': resolution: {integrity: sha512-jie6ZJT2ZR0uVOVCDc9R2xCX5I/Dum/wEK28lx21PJx6ZnFAN9EzD2WsPhcDWfCgGx3OAZZ0GyM3CEobXpa9LA==} engines: {node: '>=18'} @@ -480,6 +486,10 @@ packages: resolution: {integrity: sha512-KCUwswvsC5VsW2PWFqF8eJgSCu5Ysj7m1TxiHTVA6g7k360bk0RNQENT8KTMAYEs+8fWPD3Uu4dEmzGHc+jGng==} engines: {node: '>=18'} + '@ai-sdk/provider@3.0.2': + resolution: {integrity: sha512-HrEmNt/BH/hkQ7zpi2o6N3k1ZR1QTb7z85WYhYygiTxOQuaml4CMtHCWRbric5WPU+RNsYI7r1EpyVQMKO1pYw==} + engines: {node: '>=18'} + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -2227,6 +2237,9 @@ packages: '@standard-schema/spec@1.0.0': resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==} + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@tailwindcss/node@4.1.18': resolution: {integrity: sha512-DoR7U1P7iYhw16qJ49fgXUlry1t4CpXeErJHnQ44JgTSKMaZUdf17cfn5mHchfJ4KRBZRFA/Coo+MUF5+gOaCQ==} @@ -5518,10 +5531,10 @@ snapshots: '@ai-sdk/provider-utils': 3.0.18(zod@4.1.13) zod: 4.1.13 - '@ai-sdk/openai-compatible@1.0.28(zod@4.1.13)': + '@ai-sdk/openai-compatible@2.0.4(zod@4.1.13)': dependencies: - '@ai-sdk/provider': 2.0.0 - '@ai-sdk/provider-utils': 3.0.18(zod@4.1.13) + '@ai-sdk/provider': 3.0.2 + '@ai-sdk/provider-utils': 4.0.4(zod@4.1.13) zod: 4.1.13 '@ai-sdk/openai@2.0.75(zod@4.1.13)': @@ -5546,6 +5559,13 @@ snapshots: eventsource-parser: 3.0.6 zod: 4.1.13 + '@ai-sdk/provider-utils@4.0.4(zod@4.1.13)': + dependencies: + '@ai-sdk/provider': 3.0.2 + '@standard-schema/spec': 1.1.0 + eventsource-parser: 3.0.6 + zod: 4.1.13 + '@ai-sdk/provider@1.0.9': dependencies: json-schema: 0.4.0 @@ -5558,6 +5578,10 @@ snapshots: dependencies: json-schema: 0.4.0 + '@ai-sdk/provider@3.0.2': + dependencies: + json-schema: 0.4.0 + '@alloc/quick-lru@5.2.0': {} '@antfu/install-pkg@1.1.0': @@ -7072,6 +7096,8 @@ snapshots: '@standard-schema/spec@1.0.0': {} + '@standard-schema/spec@1.1.0': {} + '@tailwindcss/node@4.1.18': dependencies: '@jridgewell/remapping': 2.3.5 diff --git a/tsconfig.json b/tsconfig.json index 565feeb6..cac8b4e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,13 @@ { "extends": "./tsconfig.base.json", - "include": ["./*.ts", "./*.tsx", "./*.js", "./*.cjs", "./*.mjs"], + "include": [ + "./*.ts", + "./*.tsx", + "./*.js", + "./*.cjs", + "./*.mjs", + "./types/**/*.d.ts" + ], "references": [ { "path": "./packages/core" }, { "path": "./packages/browser-runtime" }, diff --git a/types/modules.d.ts b/types/modules.d.ts new file mode 100644 index 00000000..eb55d7f2 --- /dev/null +++ b/types/modules.d.ts @@ -0,0 +1,25 @@ +declare module "bumpp" { + export type DefineConfigInput = Record & { + files?: string[]; + }; + + export function defineConfig(config: DefineConfigInput): DefineConfigInput; +} + +declare module "tinyglobby" { + export interface GlobOptions { + cwd?: string; + absolute?: boolean; + expandDirectories?: + | boolean + | { + files?: string[]; + extensions?: string[]; + }; + } + + export function globSync( + patterns: string | string[], + options?: GlobOptions, + ): string[]; +}