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.
- Fork the repository on GitHub.
- Clone your fork to your local machine:
git clone https://github.com/your-username/node-sdk.git cd node-sdk - Install dependencies:
yarn install
- Build the package:
yarn build
- Run tests:
yarn test
- 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.jsonandversion.ts. Use the semver standard to bump the major, minor or patch version depending on the type of change you're making.
To test your local changes in a real project, follow these steps:
-
Create a new test project:
mkdir test-project && cd test-project yarn init -y
-
Link the local SDK package: In the SDK root, run:
yarn link
Then in your test project,
yarn link '@phase.dev/phase-node' -
Use the SDK in your test project:
const Phase = require('@phase.dev/phase-node')
- Create a new branch:
git checkout -b feature/your-feature
- Make and commit your changes:
git commit -m "feat: add new feature" - Push to your fork:
git push origin feature/your-feature
- Open a Pull Request on GitHub against the
mainbranch.