-
-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): improve the contribution guidelines (#2552)
* ci(coverage): improve c8 configs * docs: improve Contribute.md * ci: exclude dirs from c8 coverage * ci: adapt c8 limits * ci: adapt Codecov limits * docs: fix typo
- Loading branch information
1 parent
0f08c7c
commit 8a818ce
Showing
4 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
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,12 @@ | ||
{ | ||
"all": true, | ||
"include": ["index.js", "promise.js", "lib/**/*.js"], | ||
"exclude": ["mysqldata/**", "node_modules/**", "test/**"], | ||
"reporter": ["text", "lcov", "cobertura"], | ||
"statements": 88, | ||
"branches": 84, | ||
"functions": 78, | ||
"lines": 88, | ||
"checkCoverage": true, | ||
"clean": 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 |
---|---|---|
|
@@ -16,6 +16,8 @@ Contributions are always welcomed. You can help **MySQL2** community in various | |
- Performance improvements | ||
- Add Features | ||
|
||
--- | ||
|
||
## Security Issues | ||
|
||
Please contact project maintainers privately before opening a security issue on Github. It will allow us to fix the issue before attackers know about it. | ||
|
@@ -24,18 +26,22 @@ Please contact project maintainers privately before opening a security issue on | |
|
||
- Andrey Sidorov, [email protected] | ||
|
||
--- | ||
|
||
## New Features | ||
|
||
It's better to discuss an API before actually start implementing it. You can open an issue on Github. We can discuss design of API and implementation ideas. | ||
|
||
--- | ||
|
||
## Development | ||
|
||
We assume you already have these tools installed on your system: | ||
|
||
- MySQL Server | ||
- Node.JS | ||
|
||
As **MySQL2** is purely JS based you can develop it on Linux, Mac or Windows. Please follow these steps | ||
As **MySQL2** is purely JS based, you can develop it on Linux, Mac or Windows. Please follow these steps | ||
|
||
```bash | ||
# clone node-mysql2 | ||
|
@@ -47,6 +53,40 @@ cd /path/to/node-mysql2 | |
npm install | ||
``` | ||
|
||
--- | ||
|
||
### Commits and Pull Request Titles | ||
|
||
To ensure a clean commit history pattern, please use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format. | ||
|
||
Prefixes that will trigger a new release version: | ||
|
||
- `fix:` for patches, e.g., bug fixes that result in a patch version release. | ||
- `feat:` for new features, e.g., additions that result in a minor version release. | ||
|
||
Examples: | ||
|
||
- `fix: message` | ||
- `feat: message` | ||
- `docs: message` | ||
- `fix(module): message` | ||
- `feat(module): message` | ||
- etc. | ||
|
||
--- | ||
|
||
### Including Tests | ||
|
||
#### Fixes | ||
|
||
Where possible, provide an error test case that your fix covers. | ||
|
||
#### Features | ||
|
||
Please ensure test cases to cover your features. | ||
|
||
--- | ||
|
||
### Running Tests | ||
|
||
Running tests requires MySQL server and an empty database. You can run `bash` command given below to create `test` database | ||
|
@@ -77,3 +117,12 @@ FILTER='test-timestamp' npm run test | |
# or | ||
FILTER='timeout' npm run test | ||
``` | ||
|
||
> [!Tip] | ||
> You can also run a single test by performing `node ./test/path-to-test-file`. | ||
For testing **coverage**: | ||
|
||
```bash | ||
npm run coverage-test | ||
``` |
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 |
---|---|---|
|
@@ -2,5 +2,5 @@ coverage: | |
status: | ||
project: | ||
default: | ||
target: 90% | ||
target: 89% | ||
threshold: 2% |
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