Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-dryers-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@dfsync/client': patch
---

update LICENSE url
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bug report
about: Report a problem with dfsync
title: '[bug] '
labels: bug
---

---

## Description

A clear and concise description of the bug.

## Reproduction

Steps to reproduce the behavior.

Example:

1. create client
2. send request
3. observe unexpected behavior

## Expected behavior

What did you expect to happen?

## Environment

Please provide:

- Node.js version
- dfsync version
- OS

Example:

Node.js: 20.x
dfsync: 0.x
OS: macOS / Linux / Windows

## Additional context

Add any other context, logs, or screenshots if relevant.
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest a new feature for dfsync
title: '[feature] '
labels: enhancement
---

---

## Problem

What problem are you trying to solve?

Example:

"I want to handle request retries differently..."

## Proposed solution

Describe the solution you would like to see.

## Alternatives considered

Describe alternative solutions you considered.

## Additional context

Add any other context or examples.
38 changes: 38 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Pull Request

## Description

Please describe the changes in this pull request.

What does this PR do and why?

---

## Type of change

Please mark relevant options:

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
- [ ] Other

---

## Checklist

Before submitting, please confirm:

- [ ] Code builds successfully
- [ ] Tests pass (`pnpm test`)
- [ ] Lint passes (`pnpm lint`)
- [ ] Type check passes (`pnpm typecheck`)
- [ ] Documentation updated if needed
- [ ] Changeset added (if package behavior changed)

---

## Additional notes

Add any additional information if needed.
62 changes: 62 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Code of Conduct

## Our Pledge

We as contributors and maintainers pledge to make participation in the **dfsync** community a respectful and harassment-free experience for everyone.

We are committed to creating a welcoming, inclusive, and professional environment.

---

## Our Standards

Examples of behavior that contributes to a positive environment include:

- being respectful and considerate
- welcoming new contributors
- giving and accepting constructive feedback
- focusing on what is best for the project
- communicating professionally

Examples of unacceptable behavior include:

- harassment or discrimination of any kind
- insulting or derogatory comments
- trolling or disruptive behavior
- publishing private information without permission
- any conduct that could reasonably be considered inappropriate in a professional environment

---

## Scope

This Code of Conduct applies to all project spaces, including:

- GitHub issues
- pull requests
- discussions
- project documentation
- community interactions related to the project

---

## Enforcement

Project maintainers are responsible for clarifying and enforcing acceptable behavior.

Maintainers may remove or reject comments, commits, code, issues, and other contributions that are not aligned with this Code of Conduct.

---

## Reporting Issues

If you experience or witness unacceptable behavior, please report it to the project maintainers.

All reports will be reviewed and handled appropriately.

---

## Attribution

This Code of Conduct is inspired by the Contributor Covenant
https://www.contributor-covenant.org
214 changes: 214 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Contributing to dfsync

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.

---

# Ways to Contribute

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 You Start

Before opening a pull request:

1. Check existing **issues** and **pull requests**
2. For larger changes, consider opening an **issue** first
3. For small fixes (docs, typos, tests), feel free to open a PR directly

---

# Project Structure

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
```

---

# Local Development

Clone the repository:

```bash
git clone https://github.com/dfsyncjs/dfsync.git
cd dfsync
```

Install dependencies:

```bash
pnpm install
```

Build the project:

```bash
pnpm build
```

Run tests:

```bash
pnpm test
```

Run lint:

```bash
pnpm lint
```

Type checking:

```bash
pnpm typecheck
```

---

# Coding Guidelines

Please 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

---

# Tests

If your change affects behavior:

- add or update tests
- ensure **all tests pass**

Tests are run using **Vitest**.

Run locally:

```bash
pnpm test
```

---

# Documentation

If your change affects the public API, please update:

- README
- documentation
- examples (if necessary)

Examples should remain **simple and runnable**.

---

# Changesets and Releases

This project uses **changesets** for release management.

If your change affects the published package:

```bash
pnpm changeset
```

Examples when a changeset is required:

- new features
- bug fixes
- API changes

Documentation-only changes usually **do not require a changeset**.

## How to verify the package before release

Before publishing `@dfsync/client`, run the standard test suite and the pack smoke checks.

### 1. Run the regular checks

```bash
pnpm test
```

### 2. Verify the published package shape

These 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.

```bash
pnpm smoke:pack
```

This command runs:

- `pnpm smoke:pack:esm` — verifies ESM import from the packed tarball
- `pnpm smoke:pack:cjs` — verifies CommonJS `require()` from the packed tarball
- `pnpm smoke:pack:types` — verifies TypeScript types from the packed tarball

### Why this matters

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:

- `dist` output
- `exports`
- CommonJS / ESM entry points
- published type definitions

---

# Pull Requests

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:

```bash
pnpm lint
pnpm typecheck
pnpm test
```

---

# Thank You

Your contributions help make **dfsync** better for everyone.
Loading
Loading