Skip to content

Latest commit

 

History

History
100 lines (63 loc) · 3.25 KB

CONTRIBUTING.md

File metadata and controls

100 lines (63 loc) · 3.25 KB

Issues

Issues are always very welcome - after all, they are a big part of making sequelize better. However, there are a couple of things you can do to make the lives of the developers much, much easier:

Tell us:

  • What you are doing?
    • Post a minimal code sample that reproduces the issue, including models and associations
    • What do you expect to happen?
    • What is actually happening?
  • Which dialect you are using (postgres, mysql etc)?
  • Which fastexpress version you are using?

When you post code, please use Github flavored markdown, in order to get proper syntax highlighting!

Pull requests

We're glad to get pull request if any functionality is missing or something is buggy. However, there are a couple of things you can do to make life easier for the maintainers:

  • Explain the issue that your PR is solving - or link to an existing issue
  • Make sure that all existing tests pass
  • Make sure you followed coding guidelines
  • Add some tests for your new functionality or a test exhibiting the bug you are solving. Ideally all new tests should not pass without your changes.
  • If you are adding to / changing the public API, remember to add API docs, in the form of JSDoc style comments.

Interested? Coolio! Here is how to get started:

1. Prepare your environment

Here comes a little surprise: You need Node.JS. We support the versions 8 LTS, 10 LTS and 12 LTS.

2. Install the dependencies

Just "cd" into sequelize directory and run npm install or yarn, see an example below:

$ cd path/to/fastexpress
$ npm install

3. Database

Database instances for testing can be started using Docker or you can use local instances of MySQL.

For docker

$ docker run --name fastexpress-mysql -e MYSQL_ROOT_PASSWORD=123 -p 3306:3306 -d mysql:5

With you Database running

Run the create the database and migrate commands.

$ npm run pre-test

4. Running tests

To run all tests like CI

$ npm test

For custom purposes

$ npm run jest

Example:

$ npm run jest -- --watch [somefile]

5. Commit

Sequelize follows the AngularJS Commit Message Conventions. Example:

feat(pencil): add 'graphiteWidth' option

Commit messages are used to automatically generate a changelog. So make your life better you can run:

$ npm run commit

Then push and send your pull request. Happy hacking and thank you for contributing.

Coding guidelines

Have a look at our .eslintrc.js file for the specifics, .prettierrc and .editorconfig. As part of the test process, all files will be linted, and your PR will not be accepted if it does not pass linting.

I recommend to you use plugins to show all the errors messages on you editor/IDE.

Thanks!