cardano-uri-parser
Version:
A modular, type-safe Cardano URI parser supporting CIP-13, claim, stake, browse, and future authorities.
117 lines (70 loc) β’ 2.44 kB
Markdown
# Contributing to cardano-uri-parser
π Welcome! We appreciate your interest in improving `cardano-uri-parser`.
Please follow these guidelines to help us maintain a high-quality, secure, and useful package for the Cardano community.
## π Ways to contribute
* π‘ Suggest features β open a [feature request](https://github.com/crypto2099/cardano-uri-parser/issues/new?template=feature_request.yml)
* π Report bugs β open a [bug report](https://github.com/crypto2099/cardano-uri-parser/issues/new?template=bug_report.yml)
* π§ Submit pull requests β improvements, tests, docs, refactors
## π Project setup
```bash
npm install
npm run build
npm run test
```
Run tests in watch mode:
```bash
npm run test:watch
```
Check code coverage:
```bash
npm run test:coverage
```
## π Development workflow
Please **fork this repository** and create a feature or bugfix branch. Do **not** work directly in `main`.
Example:
```bash
git checkout -b feature/new-authority-handler
```
When ready, open a pull request from your forkβs branch to the main repository.
## ποΈ Modularity rules
β
Each **URI authority handler** must:
* Live in its own file under `src/handlers/`
* Have dedicated test coverage in `/tests`
* Add or update type definitions in `types.ts` if needed
β
Do **not** combine unrelated changes in one PR.
β
Keep logic small, focused, and maintainable.
β
Use clear, consistent naming, e.g.:
* `src/handlers/newAuthority.ts`
* `newAuthority.test.ts`
## π¦ Before opening a pull request
β
**Bump the version:**
```bash
npm version patch # or minor / major
```
β
**Update the changelog or README if needed**
β
**Ensure tests pass and coverage β₯90%**
β
**Add tests for any new or changed code**
β
**Follow the pull request template checklist**
## π₯ Commit & PR tips
* Use clear commit messages (e.g., `fix: handle Byron-era address check`)
* One logical change per PR
* Link to related Issues or CIPs if applicable
## π§ͺ CI & publishing
β οΈ Merging to `main` automatically triggers:
* Build + test
* Version check
* Publish to npm
**Important:** Make sure `package.json` version is bumped
before merging, or the CI will fail.
## π License
By contributing, you agree your work will be released under the [Apache 2.0 License](./LICENSE).
Thank you for helping grow the Cardano developer ecosystem! β€οΈ