clients/new-js/DEVELOP.md
This readme is helpful for local dev.
environment:
- IS_PERSISTENT=TRUE
- ALLOW_RESET=True
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 the library.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 launch a test docker backend, run a db cleanup and run tests.
pnpm test:run will run against the docker backend you have running. But CAUTION, it will delete data. This is the easiest and fastest way to run tests.
js_release/A.B.C for production releases and js_release_alpha/A.B.C for alpha releases. In the package.json update the version number to the new version. For production releases this is just the version number, for alpha
releases this is the version number with '-alphaX' appended to it. For example, if the current version is 1.0.0, the alpha release would be 1.0.0-alpha1 for the first alpha release, 1.0.0-alpha2 for the second alpha release, etc.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 run release pushes the package.json defined packaged to the package manager for authenticated users. It will build, test, and then publish the new version.