-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: setup issue templates and contributing
- Loading branch information
Showing
6 changed files
with
216 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: 🐛 Bug report | ||
description: Report an issue | ||
labels: ['status: review needed'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
- type: textarea | ||
id: bug-description | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks! | ||
placeholder: Bug description | ||
validations: | ||
required: true | ||
- type: input | ||
id: reproduction | ||
attributes: | ||
label: Reproduction | ||
description: A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is **required**, otherwise the issue might be closed without further notice. [**Why & How?**](https://antfu.me/posts/why-reproductions-are-required) | ||
placeholder: Reproduction | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: system-info | ||
attributes: | ||
label: System Info | ||
description: Output of `npx envinfo --system --binaries --browsers` | ||
render: Shell | ||
placeholder: System, Binaries, Browsers | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: package-manager | ||
attributes: | ||
label: Used Package Manager | ||
description: Select the used package manager | ||
options: | ||
- npm | ||
- yarn | ||
- pnpm | ||
- other (if you use other package manager, please describe at the `Additional context`) | ||
- n/a | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: Any other context or screenshots about the bug report here. | ||
- type: checkboxes | ||
id: checkboxes | ||
attributes: | ||
label: Validations | ||
description: Before submitting the issue, please make sure you do the following | ||
options: | ||
- label: Follow our [Code of Conduct](https://github.com/intlify/.github/blob/main/CODE_OF_CONDUCT.md) | ||
required: true | ||
- label: Read the [Contributing Guide](https://github.com/intlify/utils/blob/main/CONTRIBUTING.md). | ||
required: true | ||
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. | ||
required: true | ||
- label: Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. | ||
required: true | ||
- label: The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
contact_links: | ||
- name: 🙌 Contribution Guide | ||
url: https://github.com/intlify/utils/blob/main/CONTRIBUTING.md | ||
about: Please read through before making contributions. | ||
- name: ⁉️ Why and How to make a reproduction? | ||
url: https://antfu.me/posts/why-reproductions-are-required | ||
about: Reproduction is very important for maintainer to help on your issues! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: 🚀 New feature proposal | ||
description: Propose a new feature | ||
labels: [feature] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for your interest in the project and taking the time to fill out this feature report! | ||
- type: textarea | ||
id: feature-description | ||
attributes: | ||
label: Clear and concise description of the problem | ||
description: 'As a developer using vite-test-utils I want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!' | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: suggested-solution | ||
attributes: | ||
label: Suggested solution | ||
description: 'In module [xy] we could provide following implementation...' | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: alternative | ||
attributes: | ||
label: Alternative | ||
description: Clear and concise description of any alternative solutions or features you've considered. | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
description: Any other context or screenshots about the feature request here. | ||
- type: checkboxes | ||
id: checkboxes | ||
attributes: | ||
label: Validations | ||
description: Before submitting the issue, please make sure you do the following | ||
options: | ||
- label: Follow our [Code of Conduct](https://github.com/intlify/.github/blob/main/CODE_OF_CONDUCT.md) | ||
required: true | ||
- label: Read the [Contributing Guide](https://github.com/intlify/utils/blob/main/CONTRIBUTING.md). | ||
required: true | ||
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate. | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Contributing Guide | ||
|
||
- [Contributing Guide](#contributing-guide) | ||
- [Issue Reporting Guidelines](#issue-reporting-guidelines) | ||
- [Pull Request Guidelines](#pull-request-guidelines) | ||
- [Work Step Example](#work-step-example) | ||
- [Development Setup](#development-setup) | ||
- [Commonly used NPM scripts](#commonly-used-npm-scripts) | ||
|
||
## Issue Reporting Guidelines | ||
|
||
- The issue list of this repo is **exclusively** for bug reports and feature | ||
requests. Non-conforming issues will be closed immediately. | ||
|
||
- Try to search for your issue, it may have already been answered or even fixed | ||
in the main branch. | ||
|
||
- Check if the issue is reproducible with the latest stable version of | ||
vite-test-utils. If you are using a pre-release, please indicate the specific | ||
version you are using. | ||
|
||
- It is **required** that you clearly describe the steps necessary to reproduce | ||
the issue you are running into. Issues with no clear repro steps will not be | ||
triaged. If an issue labeled `status: need more repro codes or info` receives | ||
no further input from the issue author for more than 5 days, it will be | ||
closed. | ||
|
||
- For bugs that involves build setups, you can create a reproduction repository | ||
with steps in the README. | ||
|
||
- If your issue is resolved but still open, don’t hesitate to close it. In case | ||
you found a solution by yourself, it could be helpful to explain how you fixed | ||
it. | ||
|
||
## Pull Request Guidelines | ||
|
||
- Checkout a topic branch from the `main` branch. | ||
|
||
- It's OK to have multiple small commits as you work on the PR - we will let | ||
GitHub automatically squash it before merging. | ||
|
||
- Make sure `npm test` passes. (see [development setup](#development-setup)) | ||
|
||
- If adding new feature: | ||
|
||
- Add accompanying test case. | ||
- Provide convincing reason to add this feature. Ideally you should open a | ||
suggestion issue first and have it greenlighted before working on it. | ||
|
||
- If fixing a bug: | ||
- Provide detailed description of the bug in the PR. | ||
- Add appropriate test coverage if applicable. | ||
|
||
### Work Step Example | ||
|
||
- Fork the repository from [intlify/utils](https://github.com/intlify/utils) ! | ||
- Create your topic branch from `main`: `git branch my-new-topic origin/main` | ||
- Add codes and pass tests ! | ||
- Commit your changes: `git commit -am 'Add some topic'` | ||
- Push to the branch: `git push origin my-new-topic` | ||
- Submit a pull request to `main` branch of `intlify/utils` repository ! | ||
|
||
## Development Setup | ||
|
||
You will need to install the below JavaScript runtime: | ||
|
||
- [Node.js](http://nodejs.org) **version 18+** | ||
- [Bun](https://bun.sh/) **version 1.0+** | ||
- [Deno](https://deno.com/) **version 1.36+** | ||
|
||
After cloning the repo, run: | ||
|
||
```bash | ||
$ bun install # install the dependencies of the project | ||
``` | ||
|
||
A high level overview of tools used: | ||
|
||
- [TypeScript](https://www.typescriptlang.org/) as the development language | ||
- [Vitest](https://vitest.dev/) for unit testing | ||
|
||
### Commonly used NPM scripts | ||
|
||
# lint source codes | ||
$ npm run lint | ||
|
||
# format source codes | ||
$ npm run format | ||
|
||
# run the full test suite | ||
$ npm run test | ||
|
||
There are some other scripts available in the `scripts` section of the | ||
`package.json` file. | ||
|
||
**Please make sure to have this pass successfully before submitting a PR.** | ||
Although the same tests will be run against your PR on the CI server, it is | ||
better to have it working locally beforehand. |