-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
14,068 additions
and
11,381 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,9 @@ | ||
{ | ||
"presets": [ | ||
"es2015" | ||
], | ||
"plugins": [ | ||
"syntax-async-functions", | ||
"transform-regenerator" | ||
] | ||
} |
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,91 @@ | ||
# Contributing to js-data-sql | ||
|
||
[Read the general Contributing Guide](http://js-data.io/docs/contributing). | ||
|
||
## Project structure | ||
|
||
* `dist/` - Contains final build files for distribution | ||
* `doc/` - Output folder for JSDocs | ||
* `src/` - Project source code | ||
* `test/` - Project tests | ||
|
||
## Clone, build & test | ||
|
||
1. `clone [email protected]:js-data/js-data-sql.git` | ||
1. `cd js-data-sql` | ||
1. `npm install` | ||
1. `npm run build` - Lint and build distribution files | ||
1. `npm run mocha` - Run tests (A compatible sql server must be running) | ||
|
||
#### Submitting Pull Requests | ||
|
||
1. Contribute to the issue/discussion that is the reason you'll be developing in | ||
the first place | ||
1. Fork js-data-sql | ||
1. `git clone [email protected]:<you>/js-data-sql.git` | ||
1. `cd js-data-sql; npm install;` | ||
1. Write your code, including relevant documentation and tests | ||
1. Run `npm test` (build and test) | ||
- You need Node 4.x that includes generator support without a flag | ||
- The tests expect a database to be running as follows, but can be overridden by passing the applicable environment variable as indicated (ex. `DB_HOST=192.168.99.100 npm test`). | ||
- `DB_HOST`: `localhost` | ||
- `DB_NAME`: `circle_test` | ||
- `DB_USER`: `ubuntu` | ||
- You may use `docker`/`docker-compose` to create MySql and Postgres containers to test against | ||
- `docker-compose up -d` | ||
- Start containers named `js-data-sql-mysql` and `js-data-sql-pg` | ||
- MySQL | ||
- Environment variables | ||
- `DB_CLIENT` = `mysql` | ||
- `DB_USER` = `root` | ||
- `DB_HOST` = `IP of docker-machine if not localhost` | ||
- Populate schema | ||
- `DB_CLIENT=mysql DB_USER=root npm run migrate-db` | ||
- Also set `DB_HOST` if different from `localhost` | ||
- Run tests | ||
- `npm run mocha-mysql` | ||
- Set `DB_HOST` if different from `localhost` | ||
- Run cli | ||
- `docker exec -it js-data-sql-mysql mysql circle_test` | ||
- Postgres | ||
- Environment variables | ||
- `DB_CLIENT` = `pg` | ||
- `DB_USER` = `ubuntu` | ||
- `DB_HOST` = `IP of docker-machine if not localhost` | ||
- Populate schema | ||
- `DB_CLIENT=pg npm run migrate-db` | ||
- Also set `DB_HOST` if different from `localhost` | ||
- Run tests | ||
- `npm run mocha-pg` | ||
- Also set `DB_HOST` if different from `localhost` | ||
- `docker exec -it js-data-sql-pg psql -U ubuntu -d circle_test` | ||
- Run cli | ||
- All databases | ||
- Run all tests against MySQL and Postgres | ||
- `npm run mocha-all` | ||
- Also set `DB_HOST` if different from `localhost` | ||
|
||
1. Your code will be linted and checked for formatting, the tests will be run | ||
1. The `dist/` folder & files will be generated, do NOT commit `dist/*`! They | ||
will be committed when a release is cut. | ||
1. Submit your PR and we'll review! | ||
1. Thanks! | ||
|
||
## To cut a release | ||
|
||
1. Checkout master | ||
1. Bump version in `package.json` appropriately | ||
1. Update `CHANGELOG.md` appropriately | ||
1. Run `npm run release` | ||
1. Commit and push changes | ||
1. Checkout `release`, merge `master` into `release` | ||
1. Run `npm run release` again | ||
1. Commit and push changes | ||
1. Make a GitHub release | ||
- tag from `release` branch | ||
- set tag name to version | ||
- set release name to version | ||
- set release body to changelog entry for the version | ||
1. `npm publish .` | ||
|
||
See also [Community & Support](http://js-data.io/docs/community). |
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,5 @@ | ||
(delete this line) Find out how to get help here: http://js-data.io/docs/community. | ||
|
||
<your detailed, actionable, and helpful text goes here> | ||
|
||
Thanks! |
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,6 @@ | ||
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion) | ||
|
||
- [ ] - `npm test` succeeds | ||
- [ ] - Code coverage does not decrease (if any source code was changed) | ||
- [ ] - Appropriate JSDoc comments were updated in source code (if applicable) | ||
- [ ] - Approprate changes to js-data.io docs have been suggested ("Suggest Edits" button) |
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 |
---|---|---|
|
@@ -29,4 +29,11 @@ node_modules | |
|
||
.idea/ | ||
*.iml | ||
coverage/ | ||
coverage/ | ||
.open | ||
doc/ | ||
*.db | ||
|
||
.nyc_output/ | ||
dist/*.js | ||
dist/*.map |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
# This is the official list of js-data-sql project authors. | ||
# | ||
# Names are formatted as: | ||
# # commits Name or Organization <email address> | ||
# The email address is not required for organizations. | ||
Andy Vanbutsele <[email protected]> | ||
Jason Dobry <[email protected]> | ||
Jason Dobry <[email protected]> | ||
Mike Eldridge <[email protected]> | ||
Mike Eldridge <[email protected]> | ||
Nathan Vecchiarelli <[email protected]> | ||
Robert P <[email protected]> | ||
Sean Lynch <[email protected]> | ||
Simon Williams <[email protected]> |
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
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
# People who have contributed to the js-data-sql project. | ||
# | ||
# Names should be added to this file as: | ||
# [commit count] Name <email address> | ||
2 Andy Vanbutsele <[email protected]> | ||
44 Jason Dobry <[email protected]> | ||
19 Jason Dobry <[email protected]> | ||
3 Mike Eldridge <[email protected]> | ||
2 Mike Eldridge <[email protected]> | ||
1 Nathan Vecchiarelli <[email protected]> | ||
1 Robert P <[email protected]> | ||
69 Sean Lynch <[email protected]> | ||
1 Simon Williams <[email protected]> |
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
Oops, something went wrong.