We welcome contributions to the iTwins Client library! This guide will help you get started with contributing code, reporting issues, and understanding our development workflow.
- Reporting Issues
- Feature Requests
- Development Setup
- Pull Request Process
- Changesets & Versioning
- Code Standards
- File Headers
Before creating a new issue, please search existing issues to avoid duplicates.
Please provide the following information:
- Version: Which version of
@itwin/itwins-clientyou're using - Environment: Node.js version, operating system, browser (if applicable)
- Steps to Reproduce: Clear, numbered steps that reproduce the issue
- Expected Behavior: What you expected to happen
- Actual Behavior: What actually happened
- Code Sample: Minimal code that demonstrates the issue
- Error Messages: Full error messages and stack traces
## Description
Brief description of the issue
## Version Information
- `@itwin/itwins-client` version: x.x.x
- Node.js version: x.x.x
- Operating System: Windows/macOS/Linux
## Steps to Reproduce
1. ...
2. ...
3. ...
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Code Sample
```typescript
// Minimal code that reproduces the issuePaste any error messages here
We welcome feature requests! Please:
- Check existing issues for similar requests
- Describe the use case - what problem does this solve?
- Provide examples of how the API should work
- Consider backwards compatibility and breaking changes
- Node.js 18+
- pnpm package manager
- Git
# Clone the repository
git clone https://github.com/iTwin/itwins-client.git
cd itwins-client
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run tests
pnpm testFor detailed setup instructions, see GETTINGSTARTED.md.
We follow a feature branch workflow with comprehensive code review.
- Create an issue to discuss significant changes
- Check existing PRs to avoid duplicate work
- Review our coding standards below
- Fork and clone the repository
- Create a feature branch from
main - Make your changes following our coding standards
- Add tests for new functionality
- Update documentation if needed
- Add a changeset (see below)
- Submit a pull request
- ✅ Tests pass: All existing and new tests pass
- 🧪 Tests added: New functionality includes comprehensive tests
- 📝 Changeset added: Version bump and changelog entry created
- 📚 Documentation updated: README, examples, or API docs updated if needed
- 🎯 Single concern: PR addresses one feature or bug
- 🔗 Linked to issue: PR references related GitHub issue
- 🚀 No breaking changes: Or clearly documented with migration path
- All PRs require review from maintainers
- Automated tests must pass
- Code quality and standards are verified
- Documentation completeness is checked
This project uses Changesets to manage package versioning and changelog generation. Every PR that affects the public API or user experience must include a changeset.
Add a changeset for:
- ✅ New features - API additions, new methods, new options
- ✅ Bug fixes - Fixes that affect user experience
- ✅ Breaking changes - API removals, signature changes, behavior changes
- ✅ Performance improvements - Notable performance enhancements
Use pnpm changeset --empty for:
- 🚫 Documentation only - README updates, code comments, examples
- 🚫 Internal refactoring - Code reorganization without API changes
- 🚫 Build/tooling changes - CI updates, dev dependencies, build scripts
- 🚫 Tests only - Adding tests without changing implementation
# Add a changeset for your changes
pnpm changeset
# For documentation-only changes
pnpm changeset --emptyFollow the prompts to:
- Select affected packages (usually just
@itwin/itwins-client) - Choose version bump type:
- patch (1.0.x) - Bug fixes, minor improvements
- minor (1.x.0) - New features, backwards compatible
- major (x.0.0) - Breaking changes
- Write a clear summary of the change
$ pnpm changeset
🦋 What kind of change is this for @itwin/itwins-client? › minor
🦋 Please enter a summary for this change (this will be in the changelog).
🦋 (submit empty line to open external editor)
🦋 Summary › Add support for iTwin export filtering by date range
🦋 === Summary of changesets ===
🦋 minor: @itwin/itwins-client
🦋
🦋 Add support for iTwin export filtering by date range
🦋
🦋 Is this correct? › Yes$ pnpm changeset
🦋 What kind of change is this for @itwin/itwins-client? › patch
🦋 Summary › Fix repository deletion not handling 404 responses gracefully$ pnpm changeset
🦋 What kind of change is this for @itwin/itwins-client? › major
🦋 Summary › Remove deprecated createItwin method, use createITwin instead$ pnpm changeset --empty
🦋 Summary › Update README with new authentication examplesChangesets create files in .changeset/ directory:
---
"@itwin/itwins-client": minor
---
Add support for iTwin export filtering by date range
New optional parameters `startDate` and `endDate` allow filtering exports by creation time:
```typescript
const exports = await client.getITwinExports(accessToken, iTwinId, {
startDate: "2024-01-01",
endDate: "2024-12-31"
});This enhancement improves performance for large iTwins with many historical exports.
- Changesets accumulate in
.changeset/directory - Release PR created automatically by Changesets GitHub Action
- Review release PR for version bumps and changelog accuracy
- Merge release PR to trigger automated publishing
- New version published to npm automatically
This project maintains high code quality standards through:
- TypeScript: Strict type checking enabled
- ESLint: Code quality and style enforcement
- Prettier: Consistent code formatting
The following file headers are used in this project. Please use it for new files.
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/