Skip to content

Latest commit

 

History

History
87 lines (67 loc) · 2.16 KB

File metadata and controls

87 lines (67 loc) · 2.16 KB

Contributing Guide

Thank you for your interest in contributing to the Phase Node.js SDK! We welcome all contributions, whether it's fixing bugs, adding new features, or improving documentation.

Getting Started

  1. Fork the repository on GitHub.
  2. Clone your fork to your local machine:
    git clone https://github.com/your-username/node-sdk.git
    cd node-sdk
  3. Install dependencies:
    yarn install
  4. Build the package:
    yarn build
  5. Run tests:
    yarn test

Making Changes

  • Follow the existing code style (Prettier and ESLint are configured).
  • Write clear commit messages following the Conventional Commits format.
  • Ensure all tests pass before submitting a pull request.
  • If adding a new feature, consider writing tests to cover your changes.
  • Consider if your changes require an update to docs.
  • Bump the package version in package.json and version.ts. Use the semver standard to bump the major, minor or patch version depending on the type of change you're making.

Setting Up a Test Project

To test your local changes in a real project, follow these steps:

  1. Create a new test project:

    mkdir test-project && cd test-project
    yarn init -y
  2. Link the local SDK package: In the SDK root, run:

    yarn link

    Then in your test project,

    yarn link '@phase.dev/phase-node'
  3. Use the SDK in your test project:

    const Phase = require('@phase.dev/phase-node')

Submitting a Pull Request

  1. Create a new branch:
    git checkout -b feature/your-feature
  2. Make and commit your changes:
    git commit -m "feat: add new feature"
  3. Push to your fork:
    git push origin feature/your-feature
  4. Open a Pull Request on GitHub against the main branch.

Useful Links

Phase Quickstart

SDK Docs

Docs repo

Community Slack