clients/js/DEVELOP.md
This readme is helpful for local dev.
This project is structured as a monorepo with three packages:
@internal/chromadb-core: Internal package containing shared code (not published)chromadb: Public package with bundled dependencieschromadb-client: Public package with peer dependenciesenvironment:
- IS_PERSISTENT=TRUE
- ALLOW_RESET=True
To install all dependencies for the monorepo:
pnpm install
To build all packages:
pnpm build
To build only the core package:
pnpm build:core
To build only the public packages:
pnpm build:packages
To get started developing on the JS client libraries, you'll want to run the examples.
pnpm install to install deps.pnpm build to build all packages.cd examples/browser or cd examples/nodepnpm install to install example deps.pnpm dev to run the example.If you modify the REST API, you'll need to regenerate the generated code that underlies the JavaScript client libraries.
pnpm install to install depspnpm genapiexamples folder. There is one for the browser and one for node. Run them with pnpm dev, eg cd examples/browser && pnpm devpnpm test will run tests for all packages.
js_release/A.B.C for production releases and js_release_alpha/A.B.C for alpha releases. Update the version number in the root package.json and all package.json files in the packages directory. For production releases this is just the version number, for alpha releases this is the version number with '-alphaX' appended to it.git tag js_release_A.B.C <SHA>
# or for alpha releases:
git tag js_release_alpha_A.B.C <SHA>
chroma js release to complete on main.git push origin js_release_A.B.C
# or for alpha releases:
git push origin js_release_alpha_A.B.C
pnpm publish:packages pushes the packages to the package manager for authenticated users. It will build, test, and then publish the new version.