From c8b348c312dc11322b5be03b8cefd7bcbdadbd8b Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Wed, 20 Sep 2023 15:57:26 +0900 Subject: [PATCH] chore: setup issue templates and contributing --- .github/ISSUE_TEMPLATE/.gitkeep | 0 .github/ISSUE_TEMPLATE/bug_report.yml | 67 +++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 7 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 44 ++++++++++ CONTRIBUTING.md | 98 ++++++++++++++++++++++ mod.ts | 3 - 6 files changed, 216 insertions(+), 3 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/.gitkeep create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 CONTRIBUTING.md delete mode 100644 mod.ts diff --git a/.github/ISSUE_TEMPLATE/.gitkeep b/.github/ISSUE_TEMPLATE/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..ac11c6d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..6ca910d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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! diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..b2419ed --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..aff4e42 --- /dev/null +++ b/CONTRIBUTING.md @@ -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. diff --git a/mod.ts b/mod.ts deleted file mode 100644 index 7f67017..0000000 --- a/mod.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { isLocale } from 'https://deno.land/x/intlify_utils' - -console.log('isLocale', isLocale(new Intl.Locale('en-US')))