Skip to content

v1.1.0 Release

Compare
Choose a tag to compare
@jhamon jhamon released this 28 Sep 10:57
· 164 commits to main since this release

Fixed: Next.js fetch compatibility

In this release we made some adjustments to how we polyfill fetch (which is not natively supported in all versions of node) to avoid conflicting with the Next.js framework. Next.js expects you to use @vercel/fetch and stubs out other polyfills to keep the bundle small, so the cross-fetch polyfill we depend on was not working as expected.

We have tested these changes in an updated version of our pinecone-vercel-starter sample app deployed on Vercel, so we think this resolves the known issues (#124) using the Pinecone TypeScript client in combination with Next.js.

If you encounter other problems with Vercel Edge Runtime or next.js, please file a new issue and we'll work on it ASAP. Smoothing out this experience is important to us.

Added: Replacements for some deprecated utilities

Following up on a conversation about v1 replacements for the deprecated utils methods waitUntilIndexIsReady and createIndexIfNotExists, you can now pass additional options to the create method.

import { Pinecone } from '@pinecone-database/pinecone';

const pinecone = new Pinecone()

await pinecone.createIndex({
  name: 'my-index',
  dimension: 1536,

  // This option tells the client not to throw if the index already exists.
  // It serves as replacement for createIndexIfNotExists
  suppressConflicts: true,

  // This option tells the client not to resolve the promise until the 
  // index is ready. It replaces waitUntilIndexIsReady.
  waitUntilReady: true
})

Changelog

Bug fixes

  • [Bugfix] Implement next.js fetch compatibility by @jhamon in #126

Features

  • Expose an option in createIndex to suppress the 409 conflict error by @glody007 in #125

Doc improvements

Full Changelog: v1.0.1...v1.1.0