@ai-sdk/valibot 0.1.27 → 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,123 +1,195 @@
1
1
  # @ai-sdk/valibot
2
2
 
3
- ## 0.1.27
3
+ ## 1.0.0-alpha.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - ai@4.3.15
7
+ - @ai-sdk/provider-utils@3.0.0-alpha.1
8
8
 
9
- ## 0.1.26
9
+ ## 1.0.0-canary.21
10
10
 
11
11
  ### Patch Changes
12
12
 
13
- - Updated dependencies [a295521]
14
- - ai@4.3.14
13
+ - Updated dependencies [faf8446]
14
+ - @ai-sdk/provider-utils@3.0.0-canary.19
15
15
 
16
- ## 0.1.25
16
+ ## 1.0.0-canary.20
17
17
 
18
18
  ### Patch Changes
19
19
 
20
- - ai@4.3.13
20
+ - Updated dependencies [40acf9b]
21
+ - @ai-sdk/provider-utils@3.0.0-canary.18
21
22
 
22
- ## 0.1.24
23
+ ## 1.0.0-canary.19
23
24
 
24
25
  ### Patch Changes
25
26
 
26
- - Updated dependencies [1ed3755]
27
- - Updated dependencies [46cb332]
28
- - ai@4.3.12
27
+ - Updated dependencies [ea7a7c9]
28
+ - @ai-sdk/provider-utils@3.0.0-canary.17
29
29
 
30
- ## 0.1.23
30
+ ## 1.0.0-canary.18
31
31
 
32
32
  ### Patch Changes
33
33
 
34
- - ai@4.3.11
34
+ - Updated dependencies [87b828f]
35
+ - @ai-sdk/provider-utils@3.0.0-canary.16
35
36
 
36
- ## 0.1.22
37
+ ## 1.0.0-canary.17
37
38
 
38
39
  ### Patch Changes
39
40
 
40
- - Updated dependencies [0432959]
41
- - ai@4.3.10
41
+ - Updated dependencies [a571d6e]
42
+ - Updated dependencies [41fa418]
43
+ - @ai-sdk/provider-utils@3.0.0-canary.15
42
44
 
43
- ## 0.1.21
45
+ ## 1.0.0-canary.16
44
46
 
45
47
  ### Patch Changes
46
48
 
47
- - Updated dependencies [b69a253]
48
- - ai@4.3.9
49
+ - Updated dependencies [957b739]
50
+ - @ai-sdk/provider-utils@3.0.0-canary.14
49
51
 
50
- ## 0.1.20
52
+ ## 1.0.0-canary.15
51
53
 
52
54
  ### Patch Changes
53
55
 
54
- - Updated dependencies [6e8a73b]
55
- - ai@4.3.8
56
+ - 0ff02bb: chore(provider-utils): move over jsonSchema
57
+ - Updated dependencies [0ff02bb]
58
+ - @ai-sdk/provider-utils@3.0.0-canary.13
56
59
 
57
- ## 0.1.19
60
+ ## 1.0.0-canary.14
58
61
 
59
62
  ### Patch Changes
60
63
 
61
- - Updated dependencies [f4f3945]
62
- - ai@4.3.7
64
+ - Updated dependencies [9bf7291]
65
+ - Updated dependencies [4617fab]
66
+ - Updated dependencies [a76a62b]
67
+ - ai@5.0.0-canary.14
63
68
 
64
- ## 0.1.18
69
+ ## 1.0.0-canary.13
65
70
 
66
71
  ### Patch Changes
67
72
 
68
- - Updated dependencies [beef951]
69
- - Updated dependencies [bd41167]
70
- - ai@4.3.6
73
+ - Updated dependencies [14cb3be]
74
+ - Updated dependencies [66962ed]
75
+ - Updated dependencies [9301f86]
76
+ - ai@5.0.0-canary.13
71
77
 
72
- ## 0.1.17
78
+ ## 1.0.0-canary.12
73
79
 
74
80
  ### Patch Changes
75
81
 
76
- - Updated dependencies [452bf12]
77
- - ai@4.3.5
82
+ - ai@5.0.0-canary.12
78
83
 
79
- ## 0.1.16
84
+ ## 1.0.0-canary.11
80
85
 
81
86
  ### Patch Changes
82
87
 
83
- - Updated dependencies [013faa8]
84
- - ai@4.3.4
88
+ - Updated dependencies [8e64e9c]
89
+ - ai@5.0.0-canary.11
85
90
 
86
- ## 0.1.15
91
+ ## 1.0.0-canary.10
87
92
 
88
93
  ### Patch Changes
89
94
 
90
- - Updated dependencies [3e88f4d]
91
- - Updated dependencies [c21fa6d]
92
- - ai@4.3.3
95
+ - Updated dependencies [d8aeaef]
96
+ - Updated dependencies [3e10408]
97
+ - ai@5.0.0-canary.10
93
98
 
94
- ## 0.1.14
99
+ ## 1.0.0-canary.9
95
100
 
96
101
  ### Patch Changes
97
102
 
98
- - Updated dependencies [665a567]
99
- - ai@4.3.2
103
+ - Updated dependencies [a847c3e]
104
+ - Updated dependencies [cb9c9e4]
105
+ - Updated dependencies [8aa9e20]
106
+ - Updated dependencies [b32e192]
107
+ - ai@5.0.0-canary.9
100
108
 
101
- ## 0.1.13
109
+ ## 1.0.0-canary.8
102
110
 
103
111
  ### Patch Changes
104
112
 
105
- - Updated dependencies [3d1bd38]
106
- - ai@4.3.1
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
107
123
 
108
- ## 0.1.12
124
+ ## 1.0.0-canary.7
109
125
 
110
126
  ### Patch Changes
111
127
 
112
- - Updated dependencies [772a2d7]
113
- - ai@4.3.0
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
114
134
 
115
- ## 0.1.11
135
+ ## 1.0.0-canary.6
116
136
 
117
137
  ### Patch Changes
118
138
 
119
- - Updated dependencies [c45d100]
120
- - ai@4.2.11
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
121
193
 
122
194
  ## 0.1.10
123
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.27",
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.15"
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
  }