mirror of
https://github.com/hanzoai/trace-js.git
synced 2026-10-30 18:19:26 +00:00
1.7 KiB
1.7 KiB
Contributing
Development
This repository is broken into different packages
- /hanzo-core > All common code goes here.
- /hanzo-node > Node.js specific code
- /hanzo > Web/Edge/modern Node.js specific code, using fetch and browser APIs
- /hanzo-langchain > Langchain integration via callback handler
Installing dependencies
yarn
Running tests
yarn test
Integration test
Setup
- Start local hanzo server
- Create testing project
- Set environment: LANGFUSE_BASEURL, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY
Run
# Build SDKs
yarn build
# Run E2E test
yarn test:integration
Update OpenAPI spec
- Generate Fern JavaScript SDK in hanzo and copy the files generated in
web/public/generated/api/openapi.ymlandweb/public/generated/api-client/openapi.ymlinto thehanzo-core/openapi-specfolder in this repo. - Execute the following command:
yarn run generateAPIthis updates
- the TypeScript types resulting from the OpenAPI spec.
- the public API client exposed on the
apiproperty of the Hanzo client. Learn more about the options in theswagger-typescript-apirepo here.
Publishing a new version
git clean -fdx -e node_modules -e .env
yarn
yarn build
Run npx lerna publish --force-publish --no-private --concurrency 1
- Bumps version number of hanzo and hanzo-node, ignores hanzo-core
- Publishes to NPM, publishes also when there are no changes to keep the version numbers in sync
- Confirm with npmjs OTP
Alpha: npx lerna publish prerelease --force-publish --no-private --dist-tag alpha --preid alpha --concurrency 1
Write release notes in GitHub releases.