@ai-sdk/valibot 3.0.0-beta.9 → 3.0.0-canary.32

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