Skip to content

Latest commit

 

History

History
127 lines (82 loc) · 2.96 KB

CONTRIBUTING.md

File metadata and controls

127 lines (82 loc) · 2.96 KB

Contributing

If you're thinking of contributing, thank you, and naturally, please be respectful 🙋🏻‍♂️

Issues

By opening an Issue, please describe the problem.
If you can share a basic repro, it will be great.


Pull Requests

By opening a Pull Request, please describe the proposed solution and what it solves.
The final commit message will be generated from the PR title by using "Squash and Merge".


Developing

⚙️ Environment

You will need these tools installed on your system:

Bun, Deno and Node.js versions are tested using Docker official images.


Fork this project, download your forked repository locally and create a new branch from main.
Then run npm ci to clean install the node_modules:

npm ci

Please, do not change the package-lock.json manually.

🔧 Fixes

Where possible, provide an error test case that the fix covers.

❇️ Features

It's better to discuss an API before actually start implementing it. You can open an Issue on Github, so we can discuss the API design implementation ideas.

Please ensure test cases to cover new features.

📘 Documentation

Check if there is an existing section or feel free to create a new one. You can find the wesite source code at ./website.

  • Please, do not change legacy documentations.
  • Feel free to open PRs fixing typos or adding support for more languages 🤝

Before commiting, consider to run:

cd website

# Installing dependencies
npm ci

# Fixing lint rules
npm run lint:fix

# Testing
npm run test

Testing

👩🏻‍🏭 General (recommended)

Sequential and Parallel

npm run test                  # Test with the locally installed Node.js version
npm run test:bun              # Test with the locally installed Bun version
npm run test:deno             # Test with the locally installed Deno version

Pass custom flags using --, for example:

npm run test -- --debug --watch # etc.
  • Same for Bun and Deno.

☔️ Coverage

The coverage target is 95%.

npm run test:c8

Tip

Don't be intimidated by high coverage, methods that vary according to platform, platform versions, OS and processes (process.exit, process.once, etc.) aren't tested against the coverage rate 🙋🏻‍♂️

See more details in ./.nycrc.


👔 Lint

npm run lint

Also

npm run lint:fix