Thank you for your interest in contributing! Please read through this guide before submitting any contributions.
- Getting Started
- Branch Purposes
- Branch Flow
- Branch Naming Convention
- Commit Message Convention
- Development Workflow
- Testing
- Pull Request Process
- Labels
- Code Standards
- Node.js >= 20.0.0
- Yarn 1.22.22
# Clone the repository
git clone https://github.com/michaeljymsgutierrez/arm-js-library.git
cd arm-js-library
# Install dependencies
cd packages
yarn install
# Run tests to verify setup
yarn test
# Build the library
yarn buildTo work on the documentation/demo site instead:
cd apps/docs
yarn install
# Starts the Nextra docs + live demo site on http://localhost:3002
yarn devThe API reference under /docs/api-reference is generated from the library's JSDoc
comments via yarn docs:generate (also runs automatically before yarn build) - never
edit the generated .mdx files under content/docs/api-reference by hand, edit the
JSDoc comments in packages/src/lib/api-resource-manager.js instead.
main is the only permanent branch of this repository (trunk-based). It is never deleted, and every change - features, fixes, and hotfixes alike - reaches it the same way: a reviewed, squash-merged pull request. main is never force-pushed or rebased; it only ever moves forward.
flowchart TD
subgraph Developing["Developing Phase"]
WB["feat/ - fix/ - chore/ - docs/ - refactor/ - test/ - hotfix/"]
end
main(main)
RW["Release workflow\n(manual workflow_dispatch trigger)"]
WB -->|squash merge| main
main -->|promote, when ready| RW
RW -->|version bump, npm publish,\ngit tag, GitHub release| main
All work branches - including hotfixes - are created from main and merged back into main via a squash-merged pull request. There is no separate base branch for hotfixes; an urgent fix follows the same path, just promoted sooner.
main can collect several merged PRs before anyone promotes a release - merging does not publish anything by itself. When ready to ship, a maintainer manually triggers the Release GitHub Actions workflow (workflow_dispatch), which runs semantic-release: it inspects the Conventional Commits made since the last release to decide the version bump, rebuilds dist/ and types/, publishes to npm, tags the release, and commits the version bump back to main.
No file needs manual version edits - packages/package.json is the single source of truth, and everything else (the npm badge, the library's own X-Powered-By header) derives from it automatically.
Branches must follow this format:
type/short-description
| Type | When to use |
|---|---|
feat/ |
New feature |
fix/ |
Bug fix |
chore/ |
Maintenance tasks (deps, config, cleanup) |
docs/ |
Documentation only changes |
refactor/ |
Code restructuring, no behavior change |
test/ |
Adding or updating tests |
hotfix/ |
Urgent fix for production issues |
Examples:
feat/record-paginationfix/alias-not-updatingchore/packages-dependency-updatesdocs/add-contributing-guiderefactor/collection-managertest/query-record-coveragehotfix/save-method-crash
This project follows the Conventional Commits specification.
type(scope): description
| Type | When to use |
|---|---|
feat |
New feature |
fix |
Bug fix |
chore |
Maintenance, no production code change |
docs |
Documentation only |
refactor |
Code restructuring, no behavior change |
test |
Adding or updating tests |
style |
Formatting, whitespace |
perf |
Performance improvement |
ci |
CI/CD changes |
build |
Build system or dependency changes |
Examples:
feat(records): add pagination supportfix(alias): resolve alias not updating on reloadchore(deps): upgrade axios from 1.13.5 to 1.18.1docs(contributing): add CONTRIBUTING.mdtest(query): add coverage for queryRecord edge cases
- Fork the repository
- Create a branch from
mainfollowing the Branch Naming Convention - Make your changes in
packages/src/lib/api-resource-manager.js - Write or update tests in
packages/tests/ - Run the test suite and ensure all tests pass
- Submit a pull request targeting
main
All changes must pass the full test suite before submitting a PR.
cd packages
# Run tests once
yarn test
# Run tests in watch mode
yarn test:watch- Write tests for any new functionality
- Ensure existing tests are not broken
- Tests live in
packages/tests/units/organized by feature domain
- Target branch:
main - Use the existing PR template (
.github/PULL_REQUEST_TEMPLATE.md) - Link any related GitHub issues
- Assign the appropriate reviewers
- Ensure CI checks pass before requesting review
- PRs are squash-merged only - keep the PR title a valid Conventional Commit, since it becomes the commit message on
main
Apply the appropriate label(s) when creating a PR or issue:
| Label | When to use |
|---|---|
feat |
New feature additions |
fix |
Bug fixes and patches |
chore |
Maintenance tasks, configs, and cleanups |
docs |
Documentation additions or improvements |
refactor |
Code restructuring with no behavior change |
deps |
Dependency updates and version bumps |
release |
Release preparation and versioning |
bug |
Confirmed bugs and reported issues |
experimental |
Experimental or exploratory changes |
javascript |
JavaScript code changes |
hacktoberfest-accepted |
Accepted Hacktoberfest contributions |
- Follow the existing code patterns in
packages/src/lib/api-resource-manager.js - Run ESLint before submitting:
yarn build(ESLint runs as part of the build) - Do not leave
console.logstatements in production code - Keep changes focused - one concern per PR