@ai-sdk/valibot 3.0.0-beta.5 → 3.0.0-beta.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,340 @@
1
1
  # @ai-sdk/valibot
2
2
 
3
+ ## 3.0.0-beta.50
4
+
5
+ ### Patch Changes
6
+
7
+ - @ai-sdk/provider-utils@5.0.0-beta.50
8
+
9
+ ## 3.0.0-beta.49
10
+
11
+ ### Patch Changes
12
+
13
+ - b8396f0: trigger initial beta release
14
+ - Updated dependencies [b8396f0]
15
+ - @ai-sdk/provider-utils@5.0.0-beta.49
16
+
17
+ ## 3.0.0-canary.48
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [aeda373]
22
+ - Updated dependencies [375fdd7]
23
+ - Updated dependencies [b4507d5]
24
+ - @ai-sdk/provider-utils@5.0.0-canary.48
25
+
26
+ ## 3.0.0-canary.47
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [bae5e2b]
31
+ - @ai-sdk/provider-utils@5.0.0-canary.47
32
+
33
+ ## 3.0.0-canary.46
34
+
35
+ ### Patch Changes
36
+
37
+ - @ai-sdk/provider-utils@5.0.0-canary.46
38
+
39
+ ## 3.0.0-canary.45
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [ee798eb]
44
+ - Updated dependencies [daf6637]
45
+ - @ai-sdk/provider-utils@5.0.0-canary.45
46
+
47
+ ## 3.0.0-canary.44
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [6c93e36]
52
+ - Updated dependencies [f617ac2]
53
+ - @ai-sdk/provider-utils@5.0.0-canary.44
54
+
55
+ ## 3.0.0-canary.43
56
+
57
+ ### Patch Changes
58
+
59
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
60
+ - Updated dependencies [7fc6bd6]
61
+ - @ai-sdk/provider-utils@5.0.0-canary.43
62
+
63
+ ## 3.0.0-canary.42
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [a6617c5]
68
+ - @ai-sdk/provider-utils@5.0.0-canary.42
69
+
70
+ ## 3.0.0-canary.41
71
+
72
+ ### Patch Changes
73
+
74
+ - Updated dependencies [28dfa06]
75
+ - Updated dependencies [e93fa91]
76
+ - @ai-sdk/provider-utils@5.0.0-canary.41
77
+
78
+ ## 3.0.0-canary.40
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [a7de9c9]
83
+ - @ai-sdk/provider-utils@5.0.0-canary.40
84
+
85
+ ## 3.0.0-canary.39
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies [105f95b]
90
+ - @ai-sdk/provider-utils@5.0.0-canary.39
91
+
92
+ ## 3.0.0-canary.38
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [ca446f8]
97
+ - @ai-sdk/provider-utils@5.0.0-canary.38
98
+
99
+ ## 3.0.0-canary.37
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies [d848405]
104
+ - @ai-sdk/provider-utils@5.0.0-canary.37
105
+
106
+ ## 3.0.0-canary.36
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [ca39020]
111
+ - @ai-sdk/provider-utils@5.0.0-canary.36
112
+
113
+ ## 3.0.0-canary.35
114
+
115
+ ### Patch Changes
116
+
117
+ - Updated dependencies [f634bac]
118
+ - @ai-sdk/provider-utils@5.0.0-canary.35
119
+
120
+ ## 3.0.0-canary.34
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies [69254e0]
125
+ - Updated dependencies [3015fc3]
126
+ - @ai-sdk/provider-utils@5.0.0-canary.34
127
+
128
+ ## 3.0.0-canary.33
129
+
130
+ ### Patch Changes
131
+
132
+ - Updated dependencies [2427d88]
133
+ - @ai-sdk/provider-utils@5.0.0-canary.33
134
+
135
+ ## 3.0.0-canary.32
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies [5463d0d]
140
+ - @ai-sdk/provider-utils@5.0.0-canary.32
141
+
142
+ ## 3.0.0-canary.31
143
+
144
+ ### Patch Changes
145
+
146
+ - 0c4c275: trigger initial canary release
147
+ - Updated dependencies [0c4c275]
148
+ - @ai-sdk/provider-utils@5.0.0-canary.31
149
+
150
+ ## 3.0.0-beta.30
151
+
152
+ ### Patch Changes
153
+
154
+ - Updated dependencies [08d2129]
155
+ - @ai-sdk/provider-utils@5.0.0-beta.30
156
+
157
+ ## 3.0.0-beta.29
158
+
159
+ ### Patch Changes
160
+
161
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
162
+ - Updated dependencies [9bd6512]
163
+ - Updated dependencies [258c093]
164
+ - Updated dependencies [b6783da]
165
+ - @ai-sdk/provider-utils@5.0.0-beta.29
166
+
167
+ ## 3.0.0-beta.28
168
+
169
+ ### Patch Changes
170
+
171
+ - 9f0e36c: trigger release for all packages after provenance setup
172
+ - Updated dependencies [9f0e36c]
173
+ - @ai-sdk/provider-utils@5.0.0-beta.28
174
+
175
+ ## 3.0.0-beta.27
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies [785fe16]
180
+ - Updated dependencies [67df0a0]
181
+ - Updated dependencies [befb78c]
182
+ - Updated dependencies [0458559]
183
+ - Updated dependencies [5852c0a]
184
+ - Updated dependencies [fc92055]
185
+ - @ai-sdk/provider-utils@5.0.0-beta.27
186
+
187
+ ## 3.0.0-beta.26
188
+
189
+ ### Patch Changes
190
+
191
+ - Updated dependencies [2e98477]
192
+ - @ai-sdk/provider-utils@5.0.0-beta.26
193
+
194
+ ## 3.0.0-beta.25
195
+
196
+ ### Patch Changes
197
+
198
+ - Updated dependencies [eea8d98]
199
+ - @ai-sdk/provider-utils@5.0.0-beta.25
200
+
201
+ ## 3.0.0-beta.24
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies [f807e45]
206
+ - @ai-sdk/provider-utils@5.0.0-beta.24
207
+
208
+ ## 3.0.0-beta.23
209
+
210
+ ### Patch Changes
211
+
212
+ - Updated dependencies [350ea38]
213
+ - @ai-sdk/provider-utils@5.0.0-beta.23
214
+
215
+ ## 3.0.0-beta.22
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies [083947b]
220
+ - @ai-sdk/provider-utils@5.0.0-beta.22
221
+
222
+ ## 3.0.0-beta.21
223
+
224
+ ### Patch Changes
225
+
226
+ - Updated dependencies [add1126]
227
+ - @ai-sdk/provider-utils@5.0.0-beta.21
228
+
229
+ ## 3.0.0-beta.20
230
+
231
+ ### Patch Changes
232
+
233
+ - Updated dependencies [b3976a2]
234
+ - Updated dependencies [ff5eba1]
235
+ - @ai-sdk/provider-utils@5.0.0-beta.20
236
+
237
+ ## 3.0.0-beta.19
238
+
239
+ ### Major Changes
240
+
241
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
242
+
243
+ ### Patch Changes
244
+
245
+ - Updated dependencies [ef992f8]
246
+ - @ai-sdk/provider-utils@5.0.0-beta.19
247
+
248
+ ## 3.0.0-beta.18
249
+
250
+ ### Patch Changes
251
+
252
+ - Updated dependencies [90e2d8a]
253
+ - @ai-sdk/provider-utils@5.0.0-beta.18
254
+
255
+ ## 3.0.0-beta.17
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [3ae1786]
260
+ - @ai-sdk/provider-utils@5.0.0-beta.17
261
+
262
+ ## 3.0.0-beta.16
263
+
264
+ ### Patch Changes
265
+
266
+ - @ai-sdk/provider-utils@5.0.0-beta.16
267
+
268
+ ## 3.0.0-beta.15
269
+
270
+ ### Patch Changes
271
+
272
+ - @ai-sdk/provider-utils@5.0.0-beta.15
273
+
274
+ ## 3.0.0-beta.14
275
+
276
+ ### Patch Changes
277
+
278
+ - @ai-sdk/provider-utils@5.0.0-beta.14
279
+
280
+ ## 3.0.0-beta.13
281
+
282
+ ### Patch Changes
283
+
284
+ - Updated dependencies [b0c2869]
285
+ - Updated dependencies [7e26e81]
286
+ - @ai-sdk/provider-utils@5.0.0-beta.13
287
+
288
+ ## 3.0.0-beta.12
289
+
290
+ ### Patch Changes
291
+
292
+ - Updated dependencies [46d1149]
293
+ - @ai-sdk/provider-utils@5.0.0-beta.12
294
+
295
+ ## 3.0.0-beta.11
296
+
297
+ ### Patch Changes
298
+
299
+ - Updated dependencies [6fd51c0]
300
+ - @ai-sdk/provider-utils@5.0.0-beta.11
301
+
302
+ ## 3.0.0-beta.10
303
+
304
+ ### Patch Changes
305
+
306
+ - Updated dependencies [c29a26f]
307
+ - @ai-sdk/provider-utils@5.0.0-beta.10
308
+
309
+ ## 3.0.0-beta.9
310
+
311
+ ### Patch Changes
312
+
313
+ - Updated dependencies [2e17091]
314
+ - @ai-sdk/provider-utils@5.0.0-beta.9
315
+
316
+ ## 3.0.0-beta.8
317
+
318
+ ### Patch Changes
319
+
320
+ - Updated dependencies [986c6fd]
321
+ - Updated dependencies [493295c]
322
+ - @ai-sdk/provider-utils@5.0.0-beta.8
323
+
324
+ ## 3.0.0-beta.7
325
+
326
+ ### Patch Changes
327
+
328
+ - Updated dependencies [1f509d4]
329
+ - @ai-sdk/provider-utils@5.0.0-beta.7
330
+
331
+ ## 3.0.0-beta.6
332
+
333
+ ### Patch Changes
334
+
335
+ - Updated dependencies [3887c70]
336
+ - @ai-sdk/provider-utils@5.0.0-beta.6
337
+
3
338
  ## 3.0.0-beta.5
4
339
 
5
340
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,53 +1,16 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- valibotSchema: () => valibotSchema
34
- });
35
- module.exports = __toCommonJS(index_exports);
36
-
37
1
  // src/valibot-schema.ts
38
- var import_to_json_schema = require("@valibot/to-json-schema");
39
- var import_provider_utils = require("@ai-sdk/provider-utils");
40
- var v = __toESM(require("valibot"));
2
+ import { toJsonSchema as valibotToJsonSchema } from "@valibot/to-json-schema";
3
+ import { jsonSchema } from "@ai-sdk/provider-utils";
4
+ import * as v from "valibot";
41
5
  function valibotSchema(valibotSchema2) {
42
- return (0, import_provider_utils.jsonSchema)((0, import_to_json_schema.toJsonSchema)(valibotSchema2), {
6
+ return jsonSchema(valibotToJsonSchema(valibotSchema2), {
43
7
  validate: (value) => {
44
8
  const result = v.safeParse(valibotSchema2, value);
45
9
  return result.success ? { success: true, value: result.output } : { success: false, error: new v.ValiError(result.issues) };
46
10
  }
47
11
  });
48
12
  }
49
- // Annotate the CommonJS export names for ESM import in node:
50
- 0 && (module.exports = {
13
+ export {
51
14
  valibotSchema
52
- });
15
+ };
53
16
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/valibot-schema.ts"],"sourcesContent":["export { valibotSchema } from './valibot-schema';\n","import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from '@ai-sdk/provider-utils';\nimport * as v from 'valibot';\n\nexport function valibotSchema<\n SCHEMA extends v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>>,\n>(valibotSchema: SCHEMA): Schema<v.InferOutput<SCHEMA>> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,4BAAoD;AACpD,4BAAmC;AACnC,QAAmB;AAEZ,SAAS,cAEdA,gBAAsD;AACtD,aAAO,sCAAW,sBAAAC,cAAoBD,cAAa,GAAG;AAAA,IACpD,UAAU,WAAS;AACjB,YAAM,SAAW,YAAUA,gBAAe,KAAK;AAC/C,aAAO,OAAO,UACV,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,IACtC,EAAE,SAAS,OAAO,OAAO,IAAM,YAAU,OAAO,MAAM,EAAE;AAAA,IAC9D;AAAA,EACF,CAAC;AACH;","names":["valibotSchema","valibotToJsonSchema"]}
1
+ {"version":3,"sources":["../src/valibot-schema.ts"],"sourcesContent":["import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, type Schema } from '@ai-sdk/provider-utils';\nimport * as v from 'valibot';\n\nexport function valibotSchema<\n SCHEMA extends v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>>,\n>(valibotSchema: SCHEMA): Schema<v.InferOutput<SCHEMA>> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";AAAA,SAAS,gBAAgB,2BAA2B;AACpD,SAAS,kBAA+B;AACxC,YAAY,OAAO;AAEZ,SAAS,cAEdA,gBAAsD;AACtD,SAAO,WAAW,oBAAoBA,cAAa,GAAG;AAAA,IACpD,UAAU,WAAS;AACjB,YAAM,SAAW,YAAUA,gBAAe,KAAK;AAC/C,aAAO,OAAO,UACV,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,IACtC,EAAE,SAAS,OAAO,OAAO,IAAM,YAAU,OAAO,MAAM,EAAE;AAAA,IAC9D;AAAA,EACF,CAAC;AACH;","names":["valibotSchema"]}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ai-sdk/valibot",
3
- "version": "3.0.0-beta.5",
3
+ "version": "3.0.0-beta.50",
4
+ "type": "module",
4
5
  "license": "Apache-2.0",
5
6
  "sideEffects": false,
6
7
  "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.ts",
9
9
  "files": [
10
10
  "dist/**/*",
@@ -20,19 +20,19 @@
20
20
  "./package.json": "./package.json",
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",
23
- "import": "./dist/index.mjs",
24
- "require": "./dist/index.js"
23
+ "import": "./dist/index.js",
24
+ "default": "./dist/index.js"
25
25
  }
26
26
  },
27
27
  "dependencies": {
28
- "@ai-sdk/provider-utils": "5.0.0-beta.5"
28
+ "@ai-sdk/provider-utils": "5.0.0-beta.50"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "20.17.24",
32
- "@valibot/to-json-schema": "^1.3.0",
33
- "tsup": "^8",
31
+ "@types/node": "22.19.19",
32
+ "@valibot/to-json-schema": "^1.7.0",
33
+ "tsup": "^8.5.1",
34
34
  "typescript": "5.8.3",
35
- "valibot": "^1.1.0",
35
+ "valibot": "^1.4.0",
36
36
  "@vercel/ai-tsconfig": "0.0.0"
37
37
  },
38
38
  "peerDependencies": {
@@ -40,15 +40,17 @@
40
40
  "valibot": "^1.1.0"
41
41
  },
42
42
  "engines": {
43
- "node": ">=18"
43
+ "node": ">=22"
44
44
  },
45
45
  "publishConfig": {
46
- "access": "public"
46
+ "access": "public",
47
+ "provenance": true
47
48
  },
48
49
  "homepage": "https://ai-sdk.dev/docs",
49
50
  "repository": {
50
51
  "type": "git",
51
- "url": "git+https://github.com/vercel/ai.git"
52
+ "url": "https://github.com/vercel/ai",
53
+ "directory": "packages/valibot"
52
54
  },
53
55
  "bugs": {
54
56
  "url": "https://github.com/vercel/ai/issues"
@@ -60,8 +62,6 @@
60
62
  "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
61
63
  "build:watch": "pnpm clean && tsup --watch",
62
64
  "clean": "del-cli dist *.tsbuildinfo",
63
- "lint": "eslint \"./**/*.ts*\"",
64
- "type-check": "tsc --build",
65
- "prettier-check": "prettier --check \"./**/*.ts*\""
65
+ "type-check": "tsc --build"
66
66
  }
67
67
  }
@@ -1,5 +1,5 @@
1
1
  import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';
2
- import { jsonSchema, Schema } from '@ai-sdk/provider-utils';
2
+ import { jsonSchema, type Schema } from '@ai-sdk/provider-utils';
3
3
  import * as v from 'valibot';
4
4
 
5
5
  export function valibotSchema<
package/dist/index.d.mts DELETED
@@ -1,6 +0,0 @@
1
- import { Schema } from '@ai-sdk/provider-utils';
2
- import * as v from 'valibot';
3
-
4
- declare function valibotSchema<SCHEMA extends v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>>>(valibotSchema: SCHEMA): Schema<v.InferOutput<SCHEMA>>;
5
-
6
- export { valibotSchema };
package/dist/index.mjs DELETED
@@ -1,16 +0,0 @@
1
- // src/valibot-schema.ts
2
- import { toJsonSchema as valibotToJsonSchema } from "@valibot/to-json-schema";
3
- import { jsonSchema } from "@ai-sdk/provider-utils";
4
- import * as v from "valibot";
5
- function valibotSchema(valibotSchema2) {
6
- return jsonSchema(valibotToJsonSchema(valibotSchema2), {
7
- validate: (value) => {
8
- const result = v.safeParse(valibotSchema2, value);
9
- return result.success ? { success: true, value: result.output } : { success: false, error: new v.ValiError(result.issues) };
10
- }
11
- });
12
- }
13
- export {
14
- valibotSchema
15
- };
16
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/valibot-schema.ts"],"sourcesContent":["import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from '@ai-sdk/provider-utils';\nimport * as v from 'valibot';\n\nexport function valibotSchema<\n SCHEMA extends v.GenericSchema<unknown, unknown, v.BaseIssue<unknown>>,\n>(valibotSchema: SCHEMA): Schema<v.InferOutput<SCHEMA>> {\n return jsonSchema(valibotToJsonSchema(valibotSchema), {\n validate: value => {\n const result = v.safeParse(valibotSchema, value);\n return result.success\n ? { success: true, value: result.output }\n : { success: false, error: new v.ValiError(result.issues) };\n },\n });\n}\n"],"mappings":";AAAA,SAAS,gBAAgB,2BAA2B;AACpD,SAAS,kBAA0B;AACnC,YAAY,OAAO;AAEZ,SAAS,cAEdA,gBAAsD;AACtD,SAAO,WAAW,oBAAoBA,cAAa,GAAG;AAAA,IACpD,UAAU,WAAS;AACjB,YAAM,SAAW,YAAUA,gBAAe,KAAK;AAC/C,aAAO,OAAO,UACV,EAAE,SAAS,MAAM,OAAO,OAAO,OAAO,IACtC,EAAE,SAAS,OAAO,OAAO,IAAM,YAAU,OAAO,MAAM,EAAE;AAAA,IAC9D;AAAA,EACF,CAAC;AACH;","names":["valibotSchema"]}