First of all, thank you very much for taking the time to contribute to our open source project. We hope that this guide will clearly explain the contribution process and answer any questions you may have, so please take a few minutes to read it before submitting an issue or pull request.
We has adopted the Contributor Covenant as our Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.
All work on VGrammar happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process.
VGrammar follows semantic versioning.
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backward compatible manner
- PATCH version when you make backward compatible bug fixes
Every significant change is documented in the changelog file.
We will release a new version every two weeks.
Branch naming conventions:
- fix/xxx: bugfix branch
- feat/xxx: feature branch
- refactor/xxx: refactoring branch
- release/xxx: release branch
- chore/xxx: configuration modification
- docs/xxx: documentation update
- perf/xxx: performance optimization
- test/xxx: test case update
- ci/xxx: CI process configuration update
- style/xxx: code style related.
Submit all changes directly to the main branch. We don’t use separate branches for development or for upcoming releases. We do our best to keep main in good shape, with all tests passing.
Code that lands in main must be compatible with the latest stable release. It may contain additional features, but no breaking changes. We should be able to release a new minor version from the tip of main at any time.
We are using GitHub Issues for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist.
We have already prepared issue templates for bug reports and feature requests. If you want to fire an issue, just enter the New issue page and select either of them to get started.
If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend filing an issue, or just enter the New issue page and select either of them to get started.
If you’re only fixing a bug, it’s fine to submit a pull request right away but we still recommend to file an issue detailing what you’re fixing. This is helpful in case we don’t accept that specific fix but want to keep track of the issue.
Working on your first Pull Request? You can learn how from this free video series:How to Contribute to an Open Source Project on GitHub
To help you get your feet wet and get you familiar with our contribution process, we have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place to get started.
If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don’t accidentally duplicate your effort.
If somebody claims an issue but doesn’t follow up for more than two weeks, it’s fine to take it over but you should still leave a comment.
The core team is monitoring for pull requests. We will review your pull request and either merge it, request changes to it, or close it with an explanation. We’ll do our best to provide updates and feedback throughout the process.
Before submitting a pull request, please make sure the following is done:
- Fork the VGrammar and create your branch from
main
. - (If rush has been install, just go to step 3) global install @microsoft/rush:
npm i --global @microsoft/rush
. - Run
rush update --full
in the repository root. - If you’ve fixed a bug or added code that should be tested, add tests!
- Ensure the test suite passes (
rush test
). Tip:rush test -- --watch TestName
is helpful in development. - Make sure your code lints (
rush lint
). Tip: Lint runs automatically when you git commit (Use Git Hooks). - Run
rush compile
for typecheck.
After cloning VGrammar, run rush update --full
to fetch its dependencies. Then, you can run several commands:
rush run -p @internal/dev-demos -s start
runs VGrammar test page locally.rush eslint
checks the code style.rush build
rush test
runs the complete test suite.rush run -p <project_name> -s <script>
run the specified script for the specified project, eg.rush run -p @VisActor/VGrammar -s start
rush prettier --dir <project_relative_path> --ext <file_type>
prettier the specified script for the specified project, eg.rush prettier --dir packages/VGrammar --ext ts
By contributing to VGrammar, you agree that your contributions will be licensed under its MIT license.