Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONTRIBUTING.md: Fix spelling and other issue #810

Merged
merged 2 commits into from
Oct 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Contributions and feedback on your experience of using this software are welcome.

This includes bug reports, feature requests, ideas, pull requests and examples of how you have used this software.
This includes bug reports, feature requests, ideas, pull requests, and examples of how you have used this software.

Please see the [Code of Conduct](CODE_OF_CONDUCT.md) and follow any templates configured in GitHub when reporting bugs, requesting enhancements or contributing code.
Please see the [Code of Conduct](CODE_OF_CONDUCT.md) and follow any templates configured in GitHub when reporting bugs, requesting enhancements, or contributing code.

Please raise any significant new functionality or breaking change an issue for discussion before raising a Pull Request for it.

Expand All @@ -13,14 +13,14 @@ Please raise any significant new functionality or breaking change an issue for d
* The latest changes are always in `main`
* Pull Requests should be raised for larger changes
* Pull Requests do not need approval before merging for those with contributor access (it's just helpful to have them to track changes)
* Rebasing in Pull Requests is prefered to keep a clean commit history (see below)
* Rebasing in Pull Requests is preferred to keep a clean commit history (see below)
* Running `npm run lint:fix` before committing can make resolving conflicts easier, but is not required
* Merge commits (and pushing merge commits to `main`) are disabled in this repo; but commits in PR can be squashed so this is not a blocker
* Merge commits (and pushing merge commits to `main`) are disabled in this repo, but commits in PR can be squashed so this is not a blocker
* Pushing directly to main should ideally be reserved for minor updates (e.g. correcting typos) or small single-commit fixes

## Rebasing

*If you don't rebase and end up with merge commits in a PR then it's not a blocker, we can alway squash the commits when merging!*
*If you don't rebase and end up with merge commits in a PR then it's not a blocker, we can always squash the commits when merging!*

If you create a branch and there are conflicting updates in the `main` branch, you can resolve them by rebasing from a check out of your branch:

Expand All @@ -33,13 +33,13 @@ If there are any conflicts, you can resolve them and stage the files, then run:

*If there are a lot of changes you may be prompted to step more than once.*

When the rebase is complete (i.e. there are no more conflicts) you should push your changes to your branch before doing anyhing else:
When the rebase is complete (i.e. there are no more conflicts) you should push your changes to your branch before doing anything else:

git push --force-with-lease

You should see that any conflicts in your PR are now resolved. You can review changes to make sure it contains changes you intended to make.

*If you accidentally sync before pushing, it will trigger a merge. Uou can use `git merge --abort` to undo the merge.*
*If you accidentally sync before pushing, it will trigger a merge. You can use `git merge --abort` to undo the merge.*

You can use `npm run lint:fix` to automatically apply Standard JS rules to resolve formatting differences (tabs vs spaces, line endings, etc).

Expand Down Expand Up @@ -71,7 +71,7 @@ A quick and dirty guide on how to setup *next-auth* locally to work on it and te

That's it!

Notes: You may need to repeat both `npm link` steps if you install / update additional dependancies with `npm i`.
Notes: You may need to repeat both `npm link` steps if you install / update additional dependencies with `npm i`.

If you need an example project to link to, you can use [next-auth-example](https://github.com/iaincollins/next-auth-example).

Expand All @@ -84,7 +84,7 @@ You might find it helpful to use the `npm run watch` command in the next-auth pr

If you are working on `next-auth/src/client/index.js` hot reloading will work as normal in your Next.js app.

However if you are working on anything else (e.g. `next-auth/src/server/*` etc) then you will need to *stop and start* your app for changes to apply as **Next.js will not hot reload those changes by default**. To facitate this, you can try [this webpack plugin](https://www.npmjs.com/package/webpack-clear-require-cache-plugin). Note that the `next.config.js` syntax in the plugin README may be out of date. It should look like this:
However, if you are working on anything else (e.g. `next-auth/src/server/*` etc) then you will need to *stop and start* your app for changes to apply as **Next.js will not hot reload those changes by default**. To facilitate this, you can try [this webpack plugin](https://www.npmjs.com/package/webpack-clear-require-cache-plugin). Note that the `next.config.js` syntax in the plugin README may be out of date. It should look like this:

```
const clearRequireCachePlugin = require('webpack-clear-require-cache-plugin')
Expand All @@ -106,22 +106,22 @@ module.exports = {

### Databases

Included is a Docker Compose file that starts up MySQL, Postgres and MongoDB databases on localhost.
Included is a Docker Compose file that starts up MySQL, Postgres, and MongoDB databases on localhost.

It will use port 3306, 5432 and 27017 on localhost respectively; it will not work if are running existing databases on localhost.
It will use port 3306, 5432, and 27017 on localhost respectively; it will not work if are running existing databases on localhost.

You can start them with `npm run db:start` and stop them with `npm run db:stop`.

You will need Docker installed to be able to start / stop the databases.

When stop the databases, it will reset their contents.
When stopping the databases, it will reset their contents.

### Testing

Tests can be run with `npm run test`.

Automated tests are currently crude and limited in functionality, but improvements are in development.

Currently to run tests you need to first have started local test databases (e.g. using `npm run db:start`).
Currently, to run tests you need to first have started local test databases (e.g. using `npm run db:start`).

The databases can take a few seconds to start up, so you might need to give it a minute before running the tests.