Thank you for your interest in contributing to the GuildPass SDK! This is the official TypeScript SDK for the GuildPass protocol.
- Code of Conduct
- Ways to Contribute
- Finding Issues
- Development Setup
- Coding Standards
- Branching & Commits
- Submitting a Pull Request
- Review Process
- Communication
By participating you agree to our Code of Conduct.
- Fix bugs in existing service modules
- Add new service methods with full TypeScript types
- Write or improve Vitest unit tests
- Improve TypeDoc documentation comments on public APIs
- Improve the usage guides in
docs/ - Add new code examples in
examples/ - Fix TypeScript strict mode issues
- Improve error messages and error types
- Browse issues directly on GitHub:
- Comment
I'd like to work on thison the GitHub issue you'd like to work on. - Wait for a maintainer to assign it before starting — this avoids duplicate effort.
- Node.js 18+
- pnpm (recommended)
# 1. Fork and clone
git clone https://github.com/<your-username>/guildpass-sdk.git
cd guildpass-sdk
# 2. Install dependencies
pnpm install
# 3. Build the SDK (tsup)
pnpm build
# 4. Run tests to confirm everything works
pnpm test:run| Path | Purpose |
|---|---|
src/ |
SDK source code (services, types, client) |
src/index.ts |
Public API entry point |
tests/ |
Vitest unit tests |
docs/ |
Markdown documentation guides |
examples/ |
Usage examples |
dist/ |
Build output (generated, do not edit) |
- TypeScript only — no plain JavaScript files.
- No
anywithout a clear comment explaining why. - Public APIs must have TypeDoc comments — every exported function, class, and type.
- Tests required — every new public method must have at least one Vitest unit test.
- No side effects — the package sets
"sideEffects": false. Keep it that way. - Minimal dependencies — the SDK has zero runtime dependencies by design. Do not add any without prior discussion with a maintainer.
- Formatting — run
pnpm format(Prettier) before submitting. - Linting — run
pnpm lint(ESLint) and fix all reported issues. - Keep the public API clean — prefer extending existing interfaces over adding new ones.
The SDK's test suite uses a set of fixture files to mock API responses. These fixtures are located in the tests/fixtures directory and are organized by service module.
The fixtures ensure that the SDK's tests are run against a consistent and predictable set of data that mirrors the real GuildPass backend's API contract. This prevents tests from passing with outdated or incorrect mock data.
Fixture files are JSON files, with each file representing a specific API endpoint response. The directory structure is as follows:
tests/fixtures/
├───access/
│ ├───check-access-success.json
│ └───...
├───guilds/
│ └───...
├───membership/
│ └───...
└───roles/
└───...
Each service has its own directory, and within that directory, there are separate files for success and error cases for each endpoint.
When the GuildPass backend API contract changes, the corresponding fixture files must be updated. To do this, follow these steps:
- Identify the affected endpoint: Determine which API endpoint has changed and locate the corresponding fixture file in the
tests/fixturesdirectory. - Update the fixture file: Modify the JSON file to reflect the new API response structure.
- Run the tests: Run the test suite to ensure that the SDK's response parsing and handling logic is compatible with the new fixture.
- Commit the changes: Commit the updated fixture file along with any code changes.
- Branch off
main:git checkout -b feat/short-descriptionorfix/short-description - Conventional commits:
feat: add client.membership.getHistory() methodfix: handle 404 response from access.checkAccess()test: add unit tests for roles servicedocs: add SIWE authentication examplechore: upgrade vitest to 2.xrefactor: extract HTTP client into shared utility
- Push your branch to your fork.
- Open a PR against
Adamantine-Guild/guildpass-sdkonmain. - Fill in the PR template completely.
- Ensure these pass before submitting:
pnpm typecheck # Must pass with no errors
pnpm lint # Fix all reported issues
pnpm test:run # All tests must pass
pnpm build # Build must succeed- All new public methods/types have TypeDoc comments.
- New behaviour is covered by at least one Vitest test.
- No new runtime dependencies without prior maintainer approval.
- Public API changes include documentation updates in
docs/. - Semver impact is noted in the PR description (patch / minor / major).
- A maintainer will review your PR within 5 business days.
- Address requested changes promptly.
- Breaking changes (major version) require additional design discussion.
- Once approved and CI passes, a maintainer merges and releases.
- GitHub Issues: preferred for all task discussion
- Contact: cerealboxx123@gmail.com
We monitor changes to our public API surface closely to prevent accidental breaking changes.
If you modify exported classes, interfaces, or types:
- Run
pnpm api-reportlocally to update the API baseline file (api-report/guildpass-sdk.api.md). - Commit the updated
guildpass-sdk.api.mdfile alongside your code changes. - Your pull request will display a diff of the API changes for maintainer review.
Maintainers can compare the regenerated API report against the last release tag to decide the correct version bump. This is local tooling only — it is not part of the release GitHub Actions workflow.
# Regenerate api-report/, diff against the latest v*.*.* tag, print semver guidance
pnpm check-api-diffThe script:
- Runs
pnpm buildandpnpm api-report:cito refreshapi-report/guildpass-sdk.api.md - Loads the baseline from the latest semver release tag (
v*.*.*) - If no tags exist yet, falls back to the last committed
api-report/onHEAD - Classifies each difference:
- Added export → non-breaking
- Removed export or changed signature → breaking
- Recommends a version bump using the project's current stage:
- Pre-1.0 (
0.x.y): breaking → minor, additive → patch - Post-1.0: breaking → major, additive → minor
- Pre-1.0 (
- Exits with code
1when breaking changes are detected
Useful flags:
# Skip regeneration when you already ran api-report:ci
pnpm check-api-diff -- --skip-regenerate
# Compare against a specific tag or file (e.g. in tests)
pnpm check-api-diff -- --baseline-tag v0.1.0
pnpm check-api-diff -- --baseline-file /tmp/old.api.mdBefore tagging a release, update package.json and add a matching CHANGELOG.md entry so the tag and package version align (see README → Versioning and changelog).