@ai-sdk/valibot 0.1.26 → 1.0.0-alpha.1

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,117 +1,195 @@
1
1
  # @ai-sdk/valibot
2
2
 
3
- ## 0.1.26
3
+ ## 1.0.0-alpha.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [a295521]
8
- - ai@4.3.14
7
+ - @ai-sdk/provider-utils@3.0.0-alpha.1
9
8
 
10
- ## 0.1.25
9
+ ## 1.0.0-canary.21
11
10
 
12
11
  ### Patch Changes
13
12
 
14
- - ai@4.3.13
13
+ - Updated dependencies [faf8446]
14
+ - @ai-sdk/provider-utils@3.0.0-canary.19
15
15
 
16
- ## 0.1.24
16
+ ## 1.0.0-canary.20
17
17
 
18
18
  ### Patch Changes
19
19
 
20
- - Updated dependencies [1ed3755]
21
- - Updated dependencies [46cb332]
22
- - ai@4.3.12
20
+ - Updated dependencies [40acf9b]
21
+ - @ai-sdk/provider-utils@3.0.0-canary.18
23
22
 
24
- ## 0.1.23
23
+ ## 1.0.0-canary.19
25
24
 
26
25
  ### Patch Changes
27
26
 
28
- - ai@4.3.11
27
+ - Updated dependencies [ea7a7c9]
28
+ - @ai-sdk/provider-utils@3.0.0-canary.17
29
29
 
30
- ## 0.1.22
30
+ ## 1.0.0-canary.18
31
31
 
32
32
  ### Patch Changes
33
33
 
34
- - Updated dependencies [0432959]
35
- - ai@4.3.10
34
+ - Updated dependencies [87b828f]
35
+ - @ai-sdk/provider-utils@3.0.0-canary.16
36
36
 
37
- ## 0.1.21
37
+ ## 1.0.0-canary.17
38
38
 
39
39
  ### Patch Changes
40
40
 
41
- - Updated dependencies [b69a253]
42
- - ai@4.3.9
41
+ - Updated dependencies [a571d6e]
42
+ - Updated dependencies [41fa418]
43
+ - @ai-sdk/provider-utils@3.0.0-canary.15
43
44
 
44
- ## 0.1.20
45
+ ## 1.0.0-canary.16
45
46
 
46
47
  ### Patch Changes
47
48
 
48
- - Updated dependencies [6e8a73b]
49
- - ai@4.3.8
49
+ - Updated dependencies [957b739]
50
+ - @ai-sdk/provider-utils@3.0.0-canary.14
50
51
 
51
- ## 0.1.19
52
+ ## 1.0.0-canary.15
52
53
 
53
54
  ### Patch Changes
54
55
 
55
- - Updated dependencies [f4f3945]
56
- - ai@4.3.7
56
+ - 0ff02bb: chore(provider-utils): move over jsonSchema
57
+ - Updated dependencies [0ff02bb]
58
+ - @ai-sdk/provider-utils@3.0.0-canary.13
57
59
 
58
- ## 0.1.18
60
+ ## 1.0.0-canary.14
59
61
 
60
62
  ### Patch Changes
61
63
 
62
- - Updated dependencies [beef951]
63
- - Updated dependencies [bd41167]
64
- - ai@4.3.6
64
+ - Updated dependencies [9bf7291]
65
+ - Updated dependencies [4617fab]
66
+ - Updated dependencies [a76a62b]
67
+ - ai@5.0.0-canary.14
65
68
 
66
- ## 0.1.17
69
+ ## 1.0.0-canary.13
67
70
 
68
71
  ### Patch Changes
69
72
 
70
- - Updated dependencies [452bf12]
71
- - ai@4.3.5
73
+ - Updated dependencies [14cb3be]
74
+ - Updated dependencies [66962ed]
75
+ - Updated dependencies [9301f86]
76
+ - ai@5.0.0-canary.13
72
77
 
73
- ## 0.1.16
78
+ ## 1.0.0-canary.12
74
79
 
75
80
  ### Patch Changes
76
81
 
77
- - Updated dependencies [013faa8]
78
- - ai@4.3.4
82
+ - ai@5.0.0-canary.12
79
83
 
80
- ## 0.1.15
84
+ ## 1.0.0-canary.11
81
85
 
82
86
  ### Patch Changes
83
87
 
84
- - Updated dependencies [3e88f4d]
85
- - Updated dependencies [c21fa6d]
86
- - ai@4.3.3
88
+ - Updated dependencies [8e64e9c]
89
+ - ai@5.0.0-canary.11
87
90
 
88
- ## 0.1.14
91
+ ## 1.0.0-canary.10
89
92
 
90
93
  ### Patch Changes
91
94
 
92
- - Updated dependencies [665a567]
93
- - ai@4.3.2
95
+ - Updated dependencies [d8aeaef]
96
+ - Updated dependencies [3e10408]
97
+ - ai@5.0.0-canary.10
94
98
 
95
- ## 0.1.13
99
+ ## 1.0.0-canary.9
96
100
 
97
101
  ### Patch Changes
98
102
 
99
- - Updated dependencies [3d1bd38]
100
- - ai@4.3.1
103
+ - Updated dependencies [a847c3e]
104
+ - Updated dependencies [cb9c9e4]
105
+ - Updated dependencies [8aa9e20]
106
+ - Updated dependencies [b32e192]
107
+ - ai@5.0.0-canary.9
101
108
 
102
- ## 0.1.12
109
+ ## 1.0.0-canary.8
103
110
 
104
111
  ### Patch Changes
105
112
 
106
- - Updated dependencies [772a2d7]
107
- - ai@4.3.0
113
+ - Updated dependencies [5d1e3ba]
114
+ - Updated dependencies [26735b5]
115
+ - Updated dependencies [14c9410]
116
+ - Updated dependencies [7827a49]
117
+ - Updated dependencies [bd8a36c]
118
+ - Updated dependencies [b6f9f3c]
119
+ - Updated dependencies [92c8e66]
120
+ - Updated dependencies [fd65bc6]
121
+ - Updated dependencies [5bdff05]
122
+ - ai@5.0.0-canary.8
108
123
 
109
- ## 0.1.11
124
+ ## 1.0.0-canary.7
110
125
 
111
126
  ### Patch Changes
112
127
 
113
- - Updated dependencies [c45d100]
114
- - ai@4.2.11
128
+ - Updated dependencies [0b78e17]
129
+ - Updated dependencies [6fba4c7]
130
+ - Updated dependencies [3e3b9df]
131
+ - Updated dependencies [1766ede]
132
+ - Updated dependencies [f10304b]
133
+ - ai@5.0.0-canary.7
134
+
135
+ ## 1.0.0-canary.6
136
+
137
+ ### Patch Changes
138
+
139
+ - ai@5.0.0-canary.6
140
+
141
+ ## 1.0.0-canary.5
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [b71fe8d]
146
+ - Updated dependencies [d91b50d]
147
+ - ai@5.0.0-canary.5
148
+
149
+ ## 1.0.0-canary.4
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [e1cbf8a]
154
+ - Updated dependencies [225f087]
155
+ - Updated dependencies [a166433]
156
+ - Updated dependencies [0a87932]
157
+ - ai@5.0.0-canary.4
158
+
159
+ ## 1.0.0-canary.3
160
+
161
+ ### Patch Changes
162
+
163
+ - ai@5.0.0-canary.3
164
+
165
+ ## 1.0.0-canary.2
166
+
167
+ ### Patch Changes
168
+
169
+ - Updated dependencies [bd398e4]
170
+ - ai@5.0.0-canary.2
171
+
172
+ ## 1.0.0-canary.1
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies [c22ad54]
177
+ - Updated dependencies [b7eae2d]
178
+ - Updated dependencies [a4f3007]
179
+ - ai@5.0.0-canary.1
180
+
181
+ ## 1.0.0-canary.0
182
+
183
+ ### Major Changes
184
+
185
+ - d5f588f: AI SDK 5
186
+
187
+ ### Patch Changes
188
+
189
+ - Updated dependencies [d5f588f]
190
+ - Updated dependencies [9477ebb]
191
+ - Updated dependencies [8026705]
192
+ - ai@5.0.0-canary.0
115
193
 
116
194
  ## 0.1.10
117
195
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Schema } from 'ai';
1
+ import { Schema } from '@ai-sdk/provider-utils';
2
2
  import * as v from 'valibot';
3
3
 
4
4
  declare function valibotSchema<OBJECT>(valibotSchema: v.GenericSchema<unknown, OBJECT>): Schema<OBJECT>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Schema } from 'ai';
1
+ import { Schema } from '@ai-sdk/provider-utils';
2
2
  import * as v from 'valibot';
3
3
 
4
4
  declare function valibotSchema<OBJECT>(valibotSchema: v.GenericSchema<unknown, OBJECT>): Schema<OBJECT>;
package/dist/index.js CHANGED
@@ -36,10 +36,10 @@ module.exports = __toCommonJS(src_exports);
36
36
 
37
37
  // src/valibot-schema.ts
38
38
  var import_to_json_schema = require("@valibot/to-json-schema");
39
- var import_ai = require("ai");
39
+ var import_provider_utils = require("@ai-sdk/provider-utils");
40
40
  var v = __toESM(require("valibot"));
41
41
  function valibotSchema(valibotSchema2) {
42
- return (0, import_ai.jsonSchema)((0, import_to_json_schema.toJsonSchema)(valibotSchema2), {
42
+ return (0, import_provider_utils.jsonSchema)((0, import_to_json_schema.toJsonSchema)(valibotSchema2), {
43
43
  validate: (value) => {
44
44
  const result = v.safeParse(valibotSchema2, value);
45
45
  return result.success ? { success: true, value: result.output } : { success: false, error: new v.ValiError(result.issues) };
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';\nimport * as v from 'valibot';\n\nexport function valibotSchema<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\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,gBAAmC;AACnC,QAAmB;AAEZ,SAAS,cACdA,gBACgB;AAChB,aAAO,0BAAW,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/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<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\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,cACdA,gBACgB;AAChB,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"]}
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/valibot-schema.ts
2
2
  import { toJsonSchema as valibotToJsonSchema } from "@valibot/to-json-schema";
3
- import { jsonSchema } from "ai";
3
+ import { jsonSchema } from "@ai-sdk/provider-utils";
4
4
  import * as v from "valibot";
5
5
  function valibotSchema(valibotSchema2) {
6
6
  return jsonSchema(valibotToJsonSchema(valibotSchema2), {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/valibot-schema.ts"],"sourcesContent":["import { toJsonSchema as valibotToJsonSchema } from '@valibot/to-json-schema';\nimport { jsonSchema, Schema } from 'ai';\nimport * as v from 'valibot';\n\nexport function valibotSchema<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\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,cACdA,gBACgB;AAChB,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"]}
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<OBJECT>(\n valibotSchema: v.GenericSchema<unknown, OBJECT>,\n): Schema<OBJECT> {\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,cACdA,gBACgB;AAChB,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/valibot",
3
- "version": "0.1.26",
3
+ "version": "1.0.0-alpha.1",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -19,12 +19,12 @@
19
19
  }
20
20
  },
21
21
  "dependencies": {
22
- "ai": "4.3.14"
22
+ "@ai-sdk/provider-utils": "3.0.0-alpha.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "20.17.24",
26
26
  "tsup": "^8",
27
- "typescript": "5.6.3",
27
+ "typescript": "5.8.3",
28
28
  "valibot": "^1.0.0-rc.0 || ^1.0.0",
29
29
  "@vercel/ai-tsconfig": "0.0.0"
30
30
  },
@@ -50,11 +50,11 @@
50
50
  "ai"
51
51
  ],
52
52
  "scripts": {
53
- "build": "tsup",
54
- "build:watch": "tsup --watch",
55
- "clean": "rm -rf dist",
53
+ "build": "pnpm clean && tsup --tsconfig tsconfig.build.json",
54
+ "build:watch": "pnpm clean && tsup --watch",
55
+ "clean": "rm -rf dist *.tsbuildinfo",
56
56
  "lint": "eslint \"./**/*.ts*\"",
57
- "type-check": "tsc --noEmit",
57
+ "type-check": "tsc --build",
58
58
  "prettier-check": "prettier --check \"./**/*.ts*\""
59
59
  }
60
60
  }