pinecone-io / pinecone-ts-client

The official TypeScript/Node client for the Pinecone vector database
https://www.pinecone.io
Apache License 2.0
165 stars 36 forks source link

[Bug] issue with deps `@sinclair+typebox` #212

Open nicolasburtey opened 2 months ago

nicolasburtey commented 2 months ago

Is this a new bug?

Current Behavior

can you update @sinclair+typebox

current version has issue I'm running into

../../node_modules/.pnpm/@sinclair+typebox@0.29.6/node_modules/@sinclair/typebox/typebox.d.ts:179:306 - error TS2589: Type instantiation is excessively deep and possibly infinite.

179 export type TIndex<T extends TSchema, K extends Key[]> = T extends TRecursive<infer S> ? TIndex<S, K> : T extends TIntersect ? UnionType<Flat<TIndexRestMany<T, K>>> : T extends TUnion ? UnionType<Flat<TIndexRestMany<T, K>>> : T extends TObject ? UnionType<Flat<TIndexRestMany<T, K>>> : T extends TTuple ? UnionType<Flat<TIndexRestMany<T, K>>> : TNever;

documented here https://github.com/sinclairzx81/typebox/issues/737

Expected Behavior

pass typescript check

Steps To Reproduce

-

Relevant log output

No response

Environment

- **OS**:
- **Language version**:
- **Pinecone client version**:

Additional Context

No response

guinaut commented 1 month ago

Not much to add.. also seeing this issue.

hstanford commented 1 month ago

I've resolved this by overriding the dependency to the latest (0.32.30 at the time of writing). For pnpm, top level in package.json:

  "pnpm": {
    "overrides": {
      "@pinecone-database/pinecone>@sinclair/typebox": "0.32.30"
    }
  }

Typescript version 5.4.5