Vasta Logo
Contributing

Local Development

Set up your database

The tests in this package are currently configured to work on a Postgres database. To run the tests, you'll need to have a Postgres database set up and running to connect to.

Copy the .env.example file to .env and fill in your database connection details.

Install package dependencies with pnpm

pnpm install

Run database migrations and seeds

pnpm db:migrate
pnpm db:seed

Run tests with vitest

pnpm test

You can also reset the database and re-run the tests with a single command:

pnpm test:reset

Testing the package locally

You can bundle this package for local testing as an independent package without publishing to npm. This is useful for making sure that all peer dependencies are correct and that the package works as expected when installed as a dependency in another project.

  1. Build the package with pnpm build
  2. Bundle the package with pnpm pack
  3. Install the tarball in your project with pnpm install /path/to/tarball.tgz

When you want to update the package in your project, you'll need to repeat these steps, which should also refresh any dependencies that have changed.

Docs

Run the docs server locally with hot-reloading for development:

pnpm run dev:docs
Copyright © 2026