Thank you for your interest in contributing to dfsync.
dfsync is an open-source TypeScript library focused on reliable HTTP communication between services. We welcome contributions that improve stability, developer experience, documentation, and examples.
You can contribute by:
- fixing bugs
- improving documentation
- adding examples
- improving test coverage
- suggesting new features
- improving developer experience
Small and focused pull requests are preferred.
Before opening a pull request:
- Check existing issues and pull requests
- For larger changes, consider opening an issue first
- For small fixes (docs, typos, tests), feel free to open a PR directly
This repository uses a pnpm monorepo.
packages/
client/ main dfsync HTTP client package
examples/
node-basic/ basic usage example
smoke/
*/ smoke tests verifying published packages
The main library lives in:
packages/client
- Node >= 20
- pnpm >= 10
Clone the repository:
git clone https://github.com/dfsyncjs/dfsync.git
cd dfsyncSetup:
corepack enable
pnpm installInstall dependencies:
pnpm installBuild the project:
pnpm buildRun tests:
pnpm testRun lint:
pnpm lintType checking:
pnpm typecheckPlease follow these principles:
- Use TypeScript
- Keep the public API minimal and predictable
- Prefer small focused changes
- Avoid breaking public APIs without discussion
- Keep code readable and maintainable
If your change affects behavior:
- add or update tests
- ensure all tests pass
Tests are run using Vitest.
Run locally:
pnpm testIf your change affects the public API, please update:
- README
- documentation
- examples (if necessary)
Examples should remain simple and runnable.
This project uses changesets for release management.
If your change affects the published package:
pnpm changesetExamples when a changeset is required:
- new features
- bug fixes
- API changes
Documentation-only changes usually do not require a changeset.
Before publishing @dfsync/client, run the standard test suite and the pack smoke checks.
pnpm testThese checks build the package, create a tarball with pnpm pack, install that tarball into isolated smoke projects, and verify that the package works as expected.
pnpm smoke:packThis command runs:
pnpm smoke:pack:esm— verifies ESM import from the packed tarballpnpm smoke:pack:cjs— verifies CommonJSrequire()from the packed tarballpnpm smoke:pack:types— verifies TypeScript types from the packed tarball
Examples in the monorepo validate local workspace usage, but the pack smoke tests validate the actual publish artifact that users install from npm. This helps catch issues with:
distoutputexports- CommonJS / ESM entry points
- published type definitions
When submitting a PR:
- create a branch from
main - keep PRs small and focused
- provide a clear description of the change
- explain why the change is needed
Before submitting, ensure the following commands succeed:
pnpm lint
pnpm typecheck
pnpm testYour contributions help make dfsync better for everyone.