@ai-sdk/valibot 3.0.0-beta.3 → 3.0.0-beta.30

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,207 @@
1
1
  # @ai-sdk/valibot
2
2
 
3
+ ## 3.0.0-beta.30
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [08d2129]
8
+ - @ai-sdk/provider-utils@5.0.0-beta.30
9
+
10
+ ## 3.0.0-beta.29
11
+
12
+ ### Patch Changes
13
+
14
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
15
+ - Updated dependencies [9bd6512]
16
+ - Updated dependencies [258c093]
17
+ - Updated dependencies [b6783da]
18
+ - @ai-sdk/provider-utils@5.0.0-beta.29
19
+
20
+ ## 3.0.0-beta.28
21
+
22
+ ### Patch Changes
23
+
24
+ - 9f0e36c: trigger release for all packages after provenance setup
25
+ - Updated dependencies [9f0e36c]
26
+ - @ai-sdk/provider-utils@5.0.0-beta.28
27
+
28
+ ## 3.0.0-beta.27
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [785fe16]
33
+ - Updated dependencies [67df0a0]
34
+ - Updated dependencies [befb78c]
35
+ - Updated dependencies [0458559]
36
+ - Updated dependencies [5852c0a]
37
+ - Updated dependencies [fc92055]
38
+ - @ai-sdk/provider-utils@5.0.0-beta.27
39
+
40
+ ## 3.0.0-beta.26
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies [2e98477]
45
+ - @ai-sdk/provider-utils@5.0.0-beta.26
46
+
47
+ ## 3.0.0-beta.25
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [eea8d98]
52
+ - @ai-sdk/provider-utils@5.0.0-beta.25
53
+
54
+ ## 3.0.0-beta.24
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [f807e45]
59
+ - @ai-sdk/provider-utils@5.0.0-beta.24
60
+
61
+ ## 3.0.0-beta.23
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [350ea38]
66
+ - @ai-sdk/provider-utils@5.0.0-beta.23
67
+
68
+ ## 3.0.0-beta.22
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [083947b]
73
+ - @ai-sdk/provider-utils@5.0.0-beta.22
74
+
75
+ ## 3.0.0-beta.21
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [add1126]
80
+ - @ai-sdk/provider-utils@5.0.0-beta.21
81
+
82
+ ## 3.0.0-beta.20
83
+
84
+ ### Patch Changes
85
+
86
+ - Updated dependencies [b3976a2]
87
+ - Updated dependencies [ff5eba1]
88
+ - @ai-sdk/provider-utils@5.0.0-beta.20
89
+
90
+ ## 3.0.0-beta.19
91
+
92
+ ### Major Changes
93
+
94
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [ef992f8]
99
+ - @ai-sdk/provider-utils@5.0.0-beta.19
100
+
101
+ ## 3.0.0-beta.18
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies [90e2d8a]
106
+ - @ai-sdk/provider-utils@5.0.0-beta.18
107
+
108
+ ## 3.0.0-beta.17
109
+
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies [3ae1786]
113
+ - @ai-sdk/provider-utils@5.0.0-beta.17
114
+
115
+ ## 3.0.0-beta.16
116
+
117
+ ### Patch Changes
118
+
119
+ - @ai-sdk/provider-utils@5.0.0-beta.16
120
+
121
+ ## 3.0.0-beta.15
122
+
123
+ ### Patch Changes
124
+
125
+ - @ai-sdk/provider-utils@5.0.0-beta.15
126
+
127
+ ## 3.0.0-beta.14
128
+
129
+ ### Patch Changes
130
+
131
+ - @ai-sdk/provider-utils@5.0.0-beta.14
132
+
133
+ ## 3.0.0-beta.13
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [b0c2869]
138
+ - Updated dependencies [7e26e81]
139
+ - @ai-sdk/provider-utils@5.0.0-beta.13
140
+
141
+ ## 3.0.0-beta.12
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [46d1149]
146
+ - @ai-sdk/provider-utils@5.0.0-beta.12
147
+
148
+ ## 3.0.0-beta.11
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [6fd51c0]
153
+ - @ai-sdk/provider-utils@5.0.0-beta.11
154
+
155
+ ## 3.0.0-beta.10
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies [c29a26f]
160
+ - @ai-sdk/provider-utils@5.0.0-beta.10
161
+
162
+ ## 3.0.0-beta.9
163
+
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [2e17091]
167
+ - @ai-sdk/provider-utils@5.0.0-beta.9
168
+
169
+ ## 3.0.0-beta.8
170
+
171
+ ### Patch Changes
172
+
173
+ - Updated dependencies [986c6fd]
174
+ - Updated dependencies [493295c]
175
+ - @ai-sdk/provider-utils@5.0.0-beta.8
176
+
177
+ ## 3.0.0-beta.7
178
+
179
+ ### Patch Changes
180
+
181
+ - Updated dependencies [1f509d4]
182
+ - @ai-sdk/provider-utils@5.0.0-beta.7
183
+
184
+ ## 3.0.0-beta.6
185
+
186
+ ### Patch Changes
187
+
188
+ - Updated dependencies [3887c70]
189
+ - @ai-sdk/provider-utils@5.0.0-beta.6
190
+
191
+ ## 3.0.0-beta.5
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies [776b617]
196
+ - @ai-sdk/provider-utils@5.0.0-beta.5
197
+
198
+ ## 3.0.0-beta.4
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies [61753c3]
203
+ - @ai-sdk/provider-utils@5.0.0-beta.4
204
+
3
205
  ## 3.0.0-beta.3
4
206
 
5
207
  ### 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.3",
3
+ "version": "3.0.0-beta.30",
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,12 +20,12 @@
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.3"
28
+ "@ai-sdk/provider-utils": "5.0.0-beta.30"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "20.17.24",
@@ -43,12 +43,14 @@
43
43
  "node": ">=18"
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"]}