We welcome contributions from the community! Please follow these guidelines to ensure a smooth development process.
All commit messages and Pull Request titles must follow the Conventional Commits specification. This helps us automatically generate changelogs and release notes.
The commit message format is:
<type>(<scope>): <short description>
- type:
feat,fix,refactor,test,ci,docs,chore,perf,security - scope:
registry,registrar,resolver,auction,subdomain,nft,bridge,sdk,cli,common
To automatically validate your commit messages, you can use a pre-commit hook.
-
Install Husky and commitlint:
If you have Node.js and npm installed, you can use
huskyandcommitlintto validate your commit messages before you commit.npm install --save-dev @commitlint/cli @commitlint/config-conventional husky npx husky install npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'You will also need a
package.jsonfile in the root of the project. If you don't have one, you can create it by runningnpm init -y. -
Use the
.commitlintrc.ymlconfiguration:The
.commitlintrc.ymlfile in the root of the repository contains the configuration forcommitlint.# .commitlintrc.yml rules: "type-enum": - 2 - "always" - - feat - fix - refactor - test - ci - docs - chore - perf - security "scope-enum": - 2 - "always" - - registry - registrar - resolver - auction - subdomain - nft - bridge - sdk - cli - common
If a test intentionally changes snapshot output, regenerate the snapshots, review the diff, and commit the updated files together with the code change:
UPDATE_SNAPSHOTS=1 cargo test --test registrar_registry_test
git diff -- tests/test_snapshotsCI also checks tests/test_snapshots/ after the test suite runs and fails if
new or modified snapshot files are left uncommitted.