@@ -29,6 +29,8 @@ It is essential that you provide an [SSCCE](http://sscce.org/)/[MCVE](https://st
If you can even provide a Pull Request with a failing test (unit test or integration test), that is great! The bug will likely be fixed much faster in this case.
You can also create and execute your SSCCE locally: see [Section 5](https://github.com/sequelize/sequelize/blob/main/CONTRIBUTING.md#running-an-sscce).
### Opening an issue to request a new feature
We're more than happy to accept feature requests! Before we get into how you can bring these to our attention, let's talk about our process for evaluating feature requests:
...
...
@@ -130,7 +132,7 @@ If you have Docker installed, use any of the following commands to start fresh l
*Note:* if you're using Windows, make sure you run these from Git Bash (or another MinGW environment), since these commands will execute bash scripts. Recall that [it's very easy to include Git Bash as your default integrated terminal on Visual Studio Code](https://code.visualstudio.com/docs/editor/integrated-terminal).
Each of these commands will start a Docker container with the corresponding database, ready to run Sequelize tests.
Each of these commands will start a Docker container with the corresponding database, ready to run Sequelize tests (or an SSCCE).
##### Hint for Postgres
...
...
@@ -164,9 +166,37 @@ Then, if you want to run tests for another dialect, assuming you've set it up as
There are also the `test-unit-*` and `test-integration-*` sets of npm scripts (for example, `test-integration-postgres`).
#### 4.1. Running only some tests
While you're developing, you may want to execute only a single test (or a few), instead of executing everything (which takes some time). You can easily achieve this by modifying the `.mocharc.jsonc` file (but don't commit those changes!) to use `spec` (and maybe `grep`) from Mocha to specify the desired tests. Then, simply call `DIALECT=some-dialect npx mocha` from your terminal (example: `DIALECT=postgres npx mocha`).
Hint: if you're creating a new test, you can execute only that test locally against all dialects by adapting the `spec` and `grep` options on `.mocharc.jsonc` and running the following from your terminal (assuming you already set up the database instances via the corresponding `npm run setup-*` calls, as explained on [Section 3a](https://github.com/sequelize/sequelize/blob/main/CONTRIBUTING.md#3a-with-docker-recommended)):
You can modify the `sscce.js` file (at the root of the repository) to create an [SSCCE](http://www.sscce.org/).
Run it for the dialect of your choice using one of the following commands:
*`npm run sscce-mariadb`
*`npm run sscce-mysql`
*`npm run sscce-postgres`
*`npm run sscce-sqlite`
*`npm run sscce-mssql`
_Note:_ First, you need to set up (once) the database instance for corresponding dialect, as explained on [Section 3a](https://github.com/sequelize/sequelize/blob/main/CONTRIBUTING.md#3a-with-docker-recommended).
#### 5.1. Debugging an SSCCE with Visual Studio Code
If you open the `package.json` file with Visual Studio Code, you will find a small `debug` button rendered right above the `"scripts": {` line. By clicking it, a popup will appear where you can choose which npm script you want to debug. Select one of the `sscce-*` scripts (listed above) and VSCode will immediately launch your SSCCE in debug mode (meaning that it will stop on any breakpoints that you place within `sscce.js` or any other Sequelize source code).
### 5. Commit your modifications
### 6. Commit your modifications
Sequelize follows the [AngularJS Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.em2hiij8p46d). The allowed categories are `build`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test` and `meta`.