@ai-sdk/provider-utils 5.0.0-beta.17 → 5.0.0-beta.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider-utils",
3
- "version": "5.0.0-beta.17",
3
+ "version": "5.0.0-beta.18",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -64,7 +64,7 @@ export const createJsonErrorResponseHandler =
64
64
  isRetryable: isRetryable?.(response, parsedError),
65
65
  }),
66
66
  };
67
- } catch (parseError) {
67
+ } catch {
68
68
  return {
69
69
  responseHeaders,
70
70
  value: new APICallError({
@@ -83,7 +83,7 @@ export function secureJsonParse(text: string) {
83
83
  try {
84
84
  // Performance optimization, see https://github.com/fastify/secure-json-parse/pull/90
85
85
  Error.stackTraceLimit = 0;
86
- } catch (e) {
86
+ } catch {
87
87
  // Fallback in case Error is immutable (v8 readonly)
88
88
  return _parse(text);
89
89
  }
@@ -22,7 +22,7 @@ export function parseDateDef(
22
22
 
23
23
  if (Array.isArray(strategy)) {
24
24
  return {
25
- anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)),
25
+ anyOf: strategy.map(item => parseDateDef(def, refs, item)),
26
26
  };
27
27
  }
28
28
 
@@ -42,7 +42,7 @@ export function parseIntersectionDef(
42
42
  'additionalProperties' in schema &&
43
43
  schema.additionalProperties === false
44
44
  ) {
45
- const { additionalProperties, ...rest } = schema;
45
+ const { additionalProperties: _additionalProperties, ...rest } = schema;
46
46
  nestedSchema = rest;
47
47
  }
48
48
  mergedAllOf.push(nestedSchema);
@@ -38,7 +38,7 @@ export function parseRecordDef(
38
38
  def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString &&
39
39
  def.keyType._def.checks?.length
40
40
  ) {
41
- const { type, ...keyType } = parseStringDef(def.keyType._def, refs);
41
+ const { type: _type, ...keyType } = parseStringDef(def.keyType._def, refs);
42
42
 
43
43
  return {
44
44
  ...schema,
@@ -56,7 +56,7 @@ export function parseRecordDef(
56
56
  def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString &&
57
57
  def.keyType._def.type._def.checks?.length
58
58
  ) {
59
- const { type, ...keyType } = parseBrandedDef(
59
+ const { type: _type, ...keyType } = parseBrandedDef(
60
60
  def.keyType._def,
61
61
  refs,
62
62
  ) as JsonSchema7StringType;