diff --git a/.github/workflows/issues--bug_report.md b/.github/workflows/issues--bug_report.md new file mode 100644 index 0000000..83d42ec --- /dev/null +++ b/.github/workflows/issues--bug_report.md @@ -0,0 +1,16 @@ +> This issue has been labeled as a **bug** since it was created using the [🚨 **Bug Report Template**](./new?assignees=&labels=bug&template=bug_report.md&title=). + +Hi there, thank you so much for the report! + +Following our [Maintenance Process](../blob/HEAD/CONTRIBUTING.md#maintaining), we will review your bug report and get back to you _next Wednesday_. To ensure a smooth review of your issue and avoid unnecessary delays, please make sure your issue includes the following: + +- Information about your environment and packages you use (Node.js version, package names and their versions, etc.) + _Feel free to attach a copy of your `package.json` file._ +- Any troubleshooting steps you already went through +- A minimal reproduction of the issue, and/or instructions on how to reproduce it + +If you have identified the cause of the bug described in your report and know how to fix it, you're more than welcome to [open a pull request](../pulls) addressing it. Check out our [quick start guide](../blob/HEAD/CONTRIBUTING.md#quick-start) for a simple contribution process. + +If you think your issue is a _question_ (not a bug) and would like quicker support, please _close this issue_ and forward it to an appropriate section on our community forum: https://community.prismic.io + +_- The Prismic Open-Source Team_ diff --git a/.github/workflows/issues--feature_request.md b/.github/workflows/issues--feature_request.md new file mode 100644 index 0000000..57ab502 --- /dev/null +++ b/.github/workflows/issues--feature_request.md @@ -0,0 +1,13 @@ +> This issue has been labeled as a **feature request** since it was created using the [🙋‍♀️ **Feature Request Template**](./new?assignees=&labels=enhancement&template=feature_request.md&title=). + +Hi there, thank you so much for your request! + +Following our [Maintenance Process](../blob/HEAD/CONTRIBUTING.md#maintaining), we will review your request and get back to you soon. If we decide to implement it, will proceed to implement the feature during the _last week of the month_. In the meantime, feel free to provide any details to help us better understand your request, such as: + +- The context that made you think of this feature request +- As many details about the solution you'd like to see implemented, how it should behave, etc. +- Any alternative solution you have considered + +If you think you can implement the proposed change yourself, you're more than welcome to [open a pull request](../pulls) implementing the new feature. Check out our [quick start guide](../blob/HEAD/CONTRIBUTING.md#quick-start) for a simple contribution process. Please note that submitting a pull request does not guarantee the feature will be merged. + +_- The Prismic Open-Source Team_ diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 0000000..4429f78 --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,29 @@ +name: issues + +on: + issues: + types: + - opened + +jobs: + issues: + if: github.event.issue.author_association == 'NONE' + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Reply bug report + if: contains(github.event.issue.labels.*.name, 'bug') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_URL: ${{ github.event.issue.html_url }} + run: gh issue comment $ISSUE_URL --body-file ./.github/workflows/issues--bug_report.md + + - name: Reply feature request + if: contains(github.event.issue.labels.*.name, 'enhancement') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ISSUE_URL: ${{ github.event.issue.html_url }} + run: gh issue comment $ISSUE_URL --body-file ./.github/workflows/issues--feature_request.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4496f6a..fdcc7e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,7 +87,7 @@ The CI system will try to build the project on each commit targeting the `master ### Testing -All projects have at least linting and unit tests. Linting is handled by [ESLint][eslint] with [Prettier][prettier] and unit tests are handled by [AVA][ava]. +All projects have at least linting and unit tests. Linting is handled by [ESLint][eslint] with [Prettier][prettier] and unit tests are handled by [Vitest][vitest]. To run all tests: @@ -110,7 +110,7 @@ npm run unit If you'd like to run only the unit tests in watch mode (re-runs tests each time a file is saved): ```bash -npm run unit -- --watch +npm run unit:watch ``` When working on unit tests, you might want to update snapshots (be careful when doing so): @@ -155,14 +155,40 @@ Those scripts will: - Publish a new version tag to GitHub; - Publish build artifacts to [npm][npm]. +Once a script has been run successfully, a new version of the package should have been published to npm. To complete the publishing process you only need to head to the repository's releases tab on GitHub to publish the new version tag that was created. + If you ran any of those commands but happen not to have access to the related npm package, you can still ask a collaborator of the said package to publish it for you. Appending `:dry` (e.g. `release:dry`) to any of the above commands will dry-run the targeted release script and output the new changelog to the console. -We consider [maintaining](#maintaining) project dependencies before publishing a new version a best practice. +We consider maintaining project dependencies before publishing a new version a best practice. ### Maintaining +Anyone can, and is welcome to, contribute to the project by opening bug reports and submitting feature requests. To remain focused and ensure we are able to respond to each contribution, we have adopted the following framework to maintain this package: + +**🚨  Bug reports** + +> **Note**: An automated reply is posted when a bug report is opened to explain our maintenance schedule. + +Every Wednesday is _bug squashing day_. During this day, we respond to and/or fix bug reports. + +At the end of each Wednesday (assuming there were issues to fix), or later during the week if reviews are required, a _patch_ version is [released](#publishing) containing any fixes that were needed. Releasing multiple patches during the same week should be avoided. + +Ideally, all opened bug reports are addressed each Wednesday. If a particular bug report is not able to be resolved in that timeframe, maintainers are free to continue working on the issue or to report back to it next Wednesday. Overall, while most issues should be closed within _7 days_, we consider up to _14 days_ to get back to and address an issue a reasonable delay. Beyond that threshold, an issue is considered problematic and will be given more attention. + +**🙋‍♀️  Feature requests** + +> **Note**: An automated message gets sent to people creating feature requests about this process. + +Every last week of a month is _feature week_. During this week, we implement new features. Discussing and coming up with implementation proposals can happen before that week, but implementations are targeted for the last week. + +At the end of the week (assuming there were features to implement), a _minor_ version is [released](#publishing) containing the new features. Releasing multiple minors during the same week should be avoided. + +Ideally, all opened feature requests are discussed each month and implemented if consensus was reached. Unlike bug reports, we do not consider delays to address feature requests as good or bad. Instead, those should essentially be driven by the community's demand on a per-request basis. + +**🏗  Updating the project structure** + We actively maintain a [TypeScript template][template] with Prismic's latest open-source standards. Keeping every project in sync with this template is nearly impossible so we're not trying to immediately reflect changes to the template in every project. Instead we consider a best practice to manually pull changes from the template into the project whenever someone is doing project maintenance and has time for it, or wants to enjoy the latest standards from it. ## `@prismicio/vue` in Prismic's Open-Source Ecosystem @@ -336,7 +362,7 @@ This folder contains utility functions used to test the project. This folder contains snapshots generated by the test framework when using snapshot testing strategies. It should not be altered manually. -### 📄  `.editorconfig`, `.eslintrc.cjs`, `.prettierrc`, `.size-limit.json`, `.versionrc`, `ava.config.js`, `siroc.config.ts`, `tsconfig.json` +### 📄  `.editorconfig`, `.eslintrc.cjs`, `.prettierrc`, `.size-limit.json`, `.versionrc`, `vitest.config.ts`, `siroc.config.ts`, `tsconfig.json` These files contain configuration for their eponymous tools: @@ -345,7 +371,7 @@ These files contain configuration for their eponymous tools: - [Prettier][prettier]; - [Size Limit][size-limit]; - [Standard Version][standard-version]; -- [AVA][ava]; +- [Vitest][vitest]; - [`siroc`][siroc]; - [TypeScript][typescript]. @@ -391,7 +417,8 @@ The project's package definition file. - `release:alpha`: creates and publishes a new alpha release of the package; - `release:alpha:dry`: dry-run of the `release:alpha` script; - `lint`: Runs ESLint on the project; -- `unit`: Runs AVA on the project; +- `unit`: Runs Vitest on the project; +- `unit:watch`: Runs Vitest on the project in watch mode; - `size`: Runs Size Limit on the project; - `test`: Runs the `lint`, `unit`, `build`, and `size` scripts. @@ -411,7 +438,7 @@ The minimum Node version supported by the project is stated under the `engines` [prettier]: https://prettier.io [size-limit]: https://github.com/ai/size-limit [standard-version]: https://github.com/conventional-changelog/standard-version -[ava]: https://github.com/avajs/ava +[vitest]: https://vitest.dev/ [siroc]: https://github.com/unjs/siroc [typescript]: https://www.typescriptlang.org [template]: https://github.com/prismicio/prismic-typescript-template