UNPKG

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
# 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! ❀️