Skip to content

Commit feb36c4

Browse files
committed
refactor(zod): use zod/v4 subpath import for version compatibility
Switch all zod imports from 'zod' and 'zod/mini' to 'zod/v4' subpath. This enables compatibility with both zod 3.25+ and zod 4.x, as the subpath import always resolves to the v4 API regardless of the installed zod version. - src/feedback.ts: 'zod' → 'zod/v4' - src/headers.ts: 'zod/mini' → 'zod/v4' - src/schema.ts: 'zod/mini' → 'zod/v4' - examples: 'zod' → 'zod/v4'
1 parent d32fe37 commit feb36c4

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

examples/claude-agent-sdk-integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
import { tool, createSdkMcpServer } from '@anthropic-ai/claude-agent-sdk';
13-
import { z } from 'zod';
13+
import { z } from 'zod/v4';
1414
import { StackOneToolSet } from '../src';
1515

1616
describe('claude-agent-sdk-integration example e2e', () => {

examples/claude-agent-sdk-integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import assert from 'node:assert';
99
import process from 'node:process';
1010
import { query, tool, createSdkMcpServer } from '@anthropic-ai/claude-agent-sdk';
11-
import { z } from 'zod';
11+
import { z } from 'zod/v4';
1212
import { StackOneToolSet } from '@stackone/ai';
1313

1414
const apiKey = process.env.STACKONE_API_KEY;

examples/tanstack-ai-integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import assert from 'node:assert';
1010
import process from 'node:process';
1111
import { chat } from '@tanstack/ai';
1212
import { openai } from '@tanstack/ai-openai';
13-
import { z } from 'zod';
13+
import { z } from 'zod/v4';
1414
import { StackOneToolSet } from '@stackone/ai';
1515

1616
const apiKey = process.env.STACKONE_API_KEY;

src/feedback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from 'zod';
1+
import { z } from 'zod/v4';
22
import { DEFAULT_BASE_URL } from './consts';
33
import { BaseTool } from './tool';
44
import type { ExecuteConfig, ExecuteOptions, JsonObject, JsonValue, ToolParameters } from './types';

src/headers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from 'zod/mini';
1+
import { z } from 'zod/v4';
22
import type { JsonObject } from './types';
33

44
/**

src/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from 'zod/mini';
1+
import { z } from 'zod/v4';
22
import { stackOneHeadersSchema } from './headers';
33

44
/**

0 commit comments

Comments
 (0)