@ai-sdk/valibot 3.0.0-beta.4 → 3.0.0-beta.49

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,341 @@
1
1
  # @ai-sdk/valibot
2
2
 
3
+ ## 3.0.0-beta.49
4
+
5
+ ### Patch Changes
6
+
7
+ - b8396f0: trigger initial beta release
8
+ - Updated dependencies [b8396f0]
9
+ - @ai-sdk/provider-utils@5.0.0-beta.49
10
+
11
+ ## 3.0.0-canary.48
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [aeda373]
16
+ - Updated dependencies [375fdd7]
17
+ - Updated dependencies [b4507d5]
18
+ - @ai-sdk/provider-utils@5.0.0-canary.48
19
+
20
+ ## 3.0.0-canary.47
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [bae5e2b]
25
+ - @ai-sdk/provider-utils@5.0.0-canary.47
26
+
27
+ ## 3.0.0-canary.46
28
+
29
+ ### Patch Changes
30
+
31
+ - @ai-sdk/provider-utils@5.0.0-canary.46
32
+
33
+ ## 3.0.0-canary.45
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [ee798eb]
38
+ - Updated dependencies [daf6637]
39
+ - @ai-sdk/provider-utils@5.0.0-canary.45
40
+
41
+ ## 3.0.0-canary.44
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [6c93e36]
46
+ - Updated dependencies [f617ac2]
47
+ - @ai-sdk/provider-utils@5.0.0-canary.44
48
+
49
+ ## 3.0.0-canary.43
50
+
51
+ ### Patch Changes
52
+
53
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
54
+ - Updated dependencies [7fc6bd6]
55
+ - @ai-sdk/provider-utils@5.0.0-canary.43
56
+
57
+ ## 3.0.0-canary.42
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [a6617c5]
62
+ - @ai-sdk/provider-utils@5.0.0-canary.42
63
+
64
+ ## 3.0.0-canary.41
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies [28dfa06]
69
+ - Updated dependencies [e93fa91]
70
+ - @ai-sdk/provider-utils@5.0.0-canary.41
71
+
72
+ ## 3.0.0-canary.40
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [a7de9c9]
77
+ - @ai-sdk/provider-utils@5.0.0-canary.40
78
+
79
+ ## 3.0.0-canary.39
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [105f95b]
84
+ - @ai-sdk/provider-utils@5.0.0-canary.39
85
+
86
+ ## 3.0.0-canary.38
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [ca446f8]
91
+ - @ai-sdk/provider-utils@5.0.0-canary.38
92
+
93
+ ## 3.0.0-canary.37
94
+
95
+ ### Patch Changes
96
+
97
+ - Updated dependencies [d848405]
98
+ - @ai-sdk/provider-utils@5.0.0-canary.37
99
+
100
+ ## 3.0.0-canary.36
101
+
102
+ ### Patch Changes
103
+
104
+ - Updated dependencies [ca39020]
105
+ - @ai-sdk/provider-utils@5.0.0-canary.36
106
+
107
+ ## 3.0.0-canary.35
108
+
109
+ ### Patch Changes
110
+
111
+ - Updated dependencies [f634bac]
112
+ - @ai-sdk/provider-utils@5.0.0-canary.35
113
+
114
+ ## 3.0.0-canary.34
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [69254e0]
119
+ - Updated dependencies [3015fc3]
120
+ - @ai-sdk/provider-utils@5.0.0-canary.34
121
+
122
+ ## 3.0.0-canary.33
123
+
124
+ ### Patch Changes
125
+
126
+ - Updated dependencies [2427d88]
127
+ - @ai-sdk/provider-utils@5.0.0-canary.33
128
+
129
+ ## 3.0.0-canary.32
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies [5463d0d]
134
+ - @ai-sdk/provider-utils@5.0.0-canary.32
135
+
136
+ ## 3.0.0-canary.31
137
+
138
+ ### Patch Changes
139
+
140
+ - 0c4c275: trigger initial canary release
141
+ - Updated dependencies [0c4c275]
142
+ - @ai-sdk/provider-utils@5.0.0-canary.31
143
+
144
+ ## 3.0.0-beta.30
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [08d2129]
149
+ - @ai-sdk/provider-utils@5.0.0-beta.30
150
+
151
+ ## 3.0.0-beta.29
152
+
153
+ ### Patch Changes
154
+
155
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
156
+ - Updated dependencies [9bd6512]
157
+ - Updated dependencies [258c093]
158
+ - Updated dependencies [b6783da]
159
+ - @ai-sdk/provider-utils@5.0.0-beta.29
160
+
161
+ ## 3.0.0-beta.28
162
+
163
+ ### Patch Changes
164
+
165
+ - 9f0e36c: trigger release for all packages after provenance setup
166
+ - Updated dependencies [9f0e36c]
167
+ - @ai-sdk/provider-utils@5.0.0-beta.28
168
+
169
+ ## 3.0.0-beta.27
170
+
171
+ ### Patch Changes
172
+
173
+ - Updated dependencies [785fe16]
174
+ - Updated dependencies [67df0a0]
175
+ - Updated dependencies [befb78c]
176
+ - Updated dependencies [0458559]
177
+ - Updated dependencies [5852c0a]
178
+ - Updated dependencies [fc92055]
179
+ - @ai-sdk/provider-utils@5.0.0-beta.27
180
+
181
+ ## 3.0.0-beta.26
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies [2e98477]
186
+ - @ai-sdk/provider-utils@5.0.0-beta.26
187
+
188
+ ## 3.0.0-beta.25
189
+
190
+ ### Patch Changes
191
+
192
+ - Updated dependencies [eea8d98]
193
+ - @ai-sdk/provider-utils@5.0.0-beta.25
194
+
195
+ ## 3.0.0-beta.24
196
+
197
+ ### Patch Changes
198
+
199
+ - Updated dependencies [f807e45]
200
+ - @ai-sdk/provider-utils@5.0.0-beta.24
201
+
202
+ ## 3.0.0-beta.23
203
+
204
+ ### Patch Changes
205
+
206
+ - Updated dependencies [350ea38]
207
+ - @ai-sdk/provider-utils@5.0.0-beta.23
208
+
209
+ ## 3.0.0-beta.22
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies [083947b]
214
+ - @ai-sdk/provider-utils@5.0.0-beta.22
215
+
216
+ ## 3.0.0-beta.21
217
+
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [add1126]
221
+ - @ai-sdk/provider-utils@5.0.0-beta.21
222
+
223
+ ## 3.0.0-beta.20
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [b3976a2]
228
+ - Updated dependencies [ff5eba1]
229
+ - @ai-sdk/provider-utils@5.0.0-beta.20
230
+
231
+ ## 3.0.0-beta.19
232
+
233
+ ### Major Changes
234
+
235
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
236
+
237
+ ### Patch Changes
238
+
239
+ - Updated dependencies [ef992f8]
240
+ - @ai-sdk/provider-utils@5.0.0-beta.19
241
+
242
+ ## 3.0.0-beta.18
243
+
244
+ ### Patch Changes
245
+
246
+ - Updated dependencies [90e2d8a]
247
+ - @ai-sdk/provider-utils@5.0.0-beta.18
248
+
249
+ ## 3.0.0-beta.17
250
+
251
+ ### Patch Changes
252
+
253
+ - Updated dependencies [3ae1786]
254
+ - @ai-sdk/provider-utils@5.0.0-beta.17
255
+
256
+ ## 3.0.0-beta.16
257
+
258
+ ### Patch Changes
259
+
260
+ - @ai-sdk/provider-utils@5.0.0-beta.16
261
+
262
+ ## 3.0.0-beta.15
263
+
264
+ ### Patch Changes
265
+
266
+ - @ai-sdk/provider-utils@5.0.0-beta.15
267
+
268
+ ## 3.0.0-beta.14
269
+
270
+ ### Patch Changes
271
+
272
+ - @ai-sdk/provider-utils@5.0.0-beta.14
273
+
274
+ ## 3.0.0-beta.13
275
+
276
+ ### Patch Changes
277
+
278
+ - Updated dependencies [b0c2869]
279
+ - Updated dependencies [7e26e81]
280
+ - @ai-sdk/provider-utils@5.0.0-beta.13
281
+
282
+ ## 3.0.0-beta.12
283
+
284
+ ### Patch Changes
285
+
286
+ - Updated dependencies [46d1149]
287
+ - @ai-sdk/provider-utils@5.0.0-beta.12
288
+
289
+ ## 3.0.0-beta.11
290
+
291
+ ### Patch Changes
292
+
293
+ - Updated dependencies [6fd51c0]
294
+ - @ai-sdk/provider-utils@5.0.0-beta.11
295
+
296
+ ## 3.0.0-beta.10
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies [c29a26f]
301
+ - @ai-sdk/provider-utils@5.0.0-beta.10
302
+
303
+ ## 3.0.0-beta.9
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies [2e17091]
308
+ - @ai-sdk/provider-utils@5.0.0-beta.9
309
+
310
+ ## 3.0.0-beta.8
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies [986c6fd]
315
+ - Updated dependencies [493295c]
316
+ - @ai-sdk/provider-utils@5.0.0-beta.8
317
+
318
+ ## 3.0.0-beta.7
319
+
320
+ ### Patch Changes
321
+
322
+ - Updated dependencies [1f509d4]
323
+ - @ai-sdk/provider-utils@5.0.0-beta.7
324
+
325
+ ## 3.0.0-beta.6
326
+
327
+ ### Patch Changes
328
+
329
+ - Updated dependencies [3887c70]
330
+ - @ai-sdk/provider-utils@5.0.0-beta.6
331
+
332
+ ## 3.0.0-beta.5
333
+
334
+ ### Patch Changes
335
+
336
+ - Updated dependencies [776b617]
337
+ - @ai-sdk/provider-utils@5.0.0-beta.5
338
+
3
339
  ## 3.0.0-beta.4
4
340
 
5
341
  ### 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.4",
3
+ "version": "3.0.0-beta.49",
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.4"
28
+ "@ai-sdk/provider-utils": "5.0.0-beta.49"
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"]}