Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.35 KB

contributing.md

File metadata and controls

51 lines (36 loc) · 1.35 KB

Contributing

tus-node-server is a mono-repository managed by Turborepo. This means running npm run build in the root will build all packages in parallel. The same goes for lint and format.

Changesets

We use changesets to manage versioning, changelogs and publishing. This means when you contribute a PR you have to run npx changeset add to indicate the semver bump you are making and to add a changelog entry.

Tests

You can run tests for individual packages by running a NPM workspace command. For instance, for the @tus/server:

npm run --workspace @tus/server test

Running tests for @tus/gcs-store requires a keyfile.json with credentials to be present in root.

@uppy/s3-store also requires credentials, but these should be injected. The easiest way to do this is creating a .env.sh (which is in .gitignore) with the following exports:

export AWS_BUCKET="***"
export AWS_ACCESS_KEY_ID="***"
export AWS_SECRET_ACCESS_KEY="***"
export AWS_REGION="***"

And run it:

source .env.sh && npm run --workspace @tus/s3-store test

You can run all tests with (requires both S3 and GCS credentials):

npm test

If setting up buckets is too much effort, create a pull request and check if GitHub Actions succeeds with your changes.