Here's how to set up a development environment to hack on multi-db-driver's code and run the tests:
- Install Node.js / npm.
- Fork/clone this repo.
npm ci- Install Docker.
npm run docker-testto run the tests ornpm run docker-coverageto see test coverage.
- Install Node.js / npm.
- Fork/clone this repo.
npm ci- Install MySQL (this is used to test both MySQL and MariaDB drivers):
- Windows:
- Install from: https://dev.mysql.com/downloads/mysql/
- Use
passwordfor the root password.
- Mac
- Install from: https://dev.mysql.com/downloads/mysql/
- Use
passwordfor the root password. - Add
/usr/local/mysql/binto your PATH.
- Ubuntu:
sudo apt install mysql-serversudo mysqld --initializesudo mysql -u rootALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
- Windows:
- Install PostgreSQL:
- Windows:
- Install from: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
- Use
postgresfor the superuser password.
- Mac:
- Install from: https://postgresapp.com/
- Open Postgres.app and initialize.
- Ubuntu:
sudo apt install postgresqlsudo -u postgres psql postgres- Note: default database password is
postgres.
- Note: default database password is
ALTER USER postgres WITH PASSWORD 'postgres';quit- Change line in pg_hba.conf file under
# "local" is for Unix domain socket connections onlytolocal all all trust.
- Windows:
- Install SQLite:
- Windows:
- Download
sqlite-tools-....ziplisted underPrecompiled Binaries for Windowsfrom: https://www.sqlite.org/download.html - Create a new folder named
sqliteanywhere on your machine. - Extract contents of
sqlite-tools-....zipinto your createdsqlitefolder.
- Download
- Mac:
- Comes pre-installed.
- Ubuntu:
sudo apt install sqlite3
- Windows:
npm tto run the tests ornpm run coverageto see test coverage.
- Be sure all tests pass:
npm t. - Ensure good test coverage and write new tests if necessary:
npm run coverage. - Add your changes to
CHANGELOG.md.
If you are a maintainer, please follow the following release procedure:
- Merge all desired pull requests into main.
- Bump
package.jsonto a new version and runnpm ito generate a newpackage-lock.json. - Add new version to CHANGELOG.
- Paste contents of CHANGELOG into new version commit.
- Open and merge a pull request with those changes.
- Tag the merge commit as the a new release version number.
- Publish commit to npm.
- Submit a pull request to the Roosevelt website following the instructions here.