Skip to content

Commit 2d5ac43

Browse files
committed
Merge branch 'master' into release
2 parents bd420c5 + 0d0edac commit 2d5ac43

14 files changed

+4367
-77
lines changed

.babelrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"presets": [
3+
"es2015"
4+
],
5+
"plugins": [
6+
"syntax-async-functions",
7+
"transform-regenerator"
8+
]
9+
}

.github/CONTRIBUTING.md

Lines changed: 68 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,88 @@
11
# Contributing to js-data-mongodb
22

3-
[Read the general Contributing Guide](http://js-data.io/docs/contributing).
3+
Dear contributor,
4+
5+
**Thank you!** Projects like this are successful because of you!
6+
7+
## Getting started
8+
9+
1. Read the the general [JSData Contributing Guide](http://js-data.io/docs/contributing)
10+
1. To report a bug or request a feature, please [open an issue](https://github.com/js-data/js-data-mongodb/issues/new)
11+
* Be sure to search the existing issues to prevent duplication
12+
* Give your issue a short but descriptive title
13+
* For bug reports, please include all steps to reproduce the error
14+
* For feature requests, please include details of your use case
15+
1. To improve to the JSData + MongoDB tutorial, go to [js-data.io/v3.0/docs/js-data-mongodb](http://www.js-data.io/v3.0/docs/js-data-mongodb) and click "Suggest Edits"
16+
1. To improve the API Reference Documentation, write a test, fix a bug, or add a feature:
17+
1. Create a fork of github.com/js-data/js-data-mongodb. [Click here](https://github.com/js-data/js-data-mongodb#fork-destination-box) to do so now.
18+
1. Clone your fork:
19+
20+
```
21+
git clone [email protected]:YOUR_USERNAME/js-data-mongodb.git
22+
```
23+
1. Change directory to `js-data-mongodb`:
24+
25+
```
26+
cd js-data-mongodb
27+
```
28+
1. Install development dependencies
29+
30+
```
31+
npm install js-data@rc bson mongodb
32+
npm install
33+
```
34+
1. To just update API Reference Documentation, make changes to the [JSDoc](http://usejsdoc.org/) comments in the source code. To regenerate the API documentation:
35+
36+
```
37+
npm run doc
38+
```
39+
40+
You can find the regenerated API Reference Documentation in the `doc/` folder.
41+
1. To write a test, fix a bug, or add a feature, make your changes to files in the `src/` and `test/` folders.
42+
1. To run the tests, first make sure MongoDB is running in another terminal window:
43+
44+
```
45+
mongod --config /path/to/mongod.conf
46+
```
47+
1. Now run the tests:
48+
49+
```
50+
npm test
51+
```
52+
53+
1. Commit your changes, submit a Pull Request, and wait for review!
454
555
## Project structure
656
57+
* `coverage/` - Code coverage report produced by `npm test`
758
* `dist/` - Contains final build files for distribution
859
* `doc/` - Output folder for JSDocs
960
* `src/` - Project source code
1061
* `test/` - Project tests
1162
12-
## Clone, build & test
13-
14-
1. `clone [email protected]:js-data/js-data-mongodb.git`
15-
1. `cd js-data-mongodb`
16-
1. `npm install`
17-
1. `npm run build` - Lint and build distribution files
18-
1. `npm run mocha` - Run tests (RethinkDB must be running)
19-
2063
## To cut a release
2164
22-
1. Checkout master
65+
1. `git checkout master`
2366
1. Bump version in `package.json` appropriately
2467
1. Update `CHANGELOG.md` appropriately
25-
1. Run `npm run release`
26-
1. Commit and push changes
27-
1. Checkout `release`, merge `master` into `release`
28-
1. Run `npm run release` again
29-
1. Commit and push changes
30-
1. Make a GitHub release
68+
1. `npm run release`
69+
1. Commit and push changes (message should be something like "Prepare for VERSION")
70+
1. `git checkout release`
71+
1. `git merge master`
72+
1. `npm run release`
73+
1. Commit and push changes (message should be something like "VERSION")
74+
1. [Make a new GitHub release](https://github.com/js-data/js-data-mongodb/releases/new)
3175
- tag from `release` branch
3276
- set tag name to version
3377
- set release name to version
3478
- set release body to changelog entry for the version
3579
1. `npm publish .`
80+
1. `git checkout gh-pages`
81+
1. `cp -r doc/js-data-mongodb/VERSION VERSION`
82+
1. `cp -r doc/js-data-mongodb/VERSION latest`
83+
1. `git add -A`
84+
1. `git commit -m "VERSION"`
85+
1. `git push -u origin gh-pages`
86+
1. `git checkout master`
3687
37-
See also [Community & Support](http://js-data.io/docs/community).
88+
See also [JSData Community & Support](http://js-data.io/docs/community).

.github/ISSUE_TEMPLATE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
(delete this line) Find out how to get help here: http://js-data.io/docs/community.
1+
## Description
22

3-
<your detailed, actionable, and helpful text goes here>
3+
<description>
4+
5+
## Steps to reproduce
6+
7+
<steps_to_reproduce>
48

59
Thanks!

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)
22

3-
- [ ] - `npm test` succeeds
4-
- [ ] - Code coverage does not decrease (if any source code was changed)
5-
- [ ] - Appropriate JSDoc comments were updated in source code (if applicable)
6-
- [ ] - Approprate changes to js-data.io docs have been suggested ("Suggest Edits" button)
3+
- [ ] - If applicable, appropriate JSDoc comments were updated in source code
4+
- [ ] - If applicable, appropriate changes to js-data.io docs have been suggested ("Suggest Edits" button)
5+
- [ ] - Unit test coverage did not decrease & appropriate tests changes made

CONTRIBUTORS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
#
55
# Names should be added to this file as:
66
# [commit count] Name <email address>
7-
26 Jason Dobry <[email protected]>
8-
1 John Grogg <[email protected]>
7+
9 Cory Robinson <[email protected]>
8+
42 Jason Dobry <[email protected]>
9+
1 John Grogg <[email protected]>

README.md

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,55 @@
1+
12
<img src="https://raw.githubusercontent.com/js-data/js-data/master/js-data.png" alt="js-data logo" title="js-data" align="right" width="96" height="96" />
23

34
# js-data-mongodb
45

5-
[![Slack Status][sl_b]][sl_l]
6-
[![npm version][npm_b]][npm_l]
7-
[![Circle CI][circle_b]][circle_l]
8-
[![npm downloads][dn_b]][dn_l]
9-
[![Coverage Status][cov_b]][cov_l]
6+
[![Slack][1]][2]
7+
[![NPM][3]][4]
8+
[![Tests][5]][6]
9+
[![Downloads][7]][8]
10+
[![Coverage][9]][10]
11+
12+
A MongoDB adapter for the [JSData Node.js ORM][11].
13+
14+
### Just getting started?
15+
16+
Start with the [JSData + MongoDB tutorial][12] or checkout the [API Reference Documentation][13].
17+
18+
### Need help?
1019

11-
MongoDB adapter for [js-data](http://www.js-data.io/).
20+
Please [post a question][14] on Stack Overflow. **This is the preferred method.**
1221

13-
To get started, visit __[http://js-data.io](http://www.js-data.io/docs/js-data-mongodb)__.
22+
You can also chat with folks on the [Slack Channel][15]. If you end up getting
23+
your question answered, please still consider consider posting your question to
24+
Stack Overflow (then possibly answering it yourself). Thanks!
1425

15-
## Links
26+
### Want to contribute?
1627

17-
* [Quick start](http://www.js-data.io/docs/home#quick-start) - Get started in 5 minutes
18-
* [Guides and Tutorials](http://www.js-data.io/docs/home) - Learn how to use JSData
19-
* [`MongoDBAdapter` Guide](http://www.js-data.io/docs/js-data-mongodb) - Learn how to use `MongoDBAdapter`
20-
* [API Reference Docs](http://api.js-data.io) - Explore components, methods, options, etc.
21-
* [Community & Support](http://js-data.io/docs/community) - Find solutions and chat with the community
22-
* [General Contributing Guide](http://js-data.io/docs/contributing) - Give back and move the project forward
23-
* [Contributing to js-data-mongodb](https://github.com/js-data/js-data-mongodb/blob/master/.github/CONTRIBUTING.md)
28+
Awesome! You can get started over at the [Contributing guide][16].
2429

25-
## License
30+
Thank you!
2631

27-
The MIT License (MIT)
32+
### License
2833

29-
Copyright (c) 2014-2016 js-data-mongodb project authors
34+
[The MIT License (MIT)][17]
3035

31-
* [LICENSE](https://github.com/js-data/js-data-mongodb/blob/master/LICENSE)
32-
* [AUTHORS](https://github.com/js-data/js-data-mongodb/blob/master/AUTHORS)
33-
* [CONTRIBUTORS](https://github.com/js-data/js-data-mongodb/blob/master/CONTRIBUTORS)
36+
Copyright (c) 2014-2016 [js-data-mongodb project authors][18]
3437

35-
[sl_b]: http://slack.js-data.io/badge.svg
36-
[sl_l]: http://slack.js-data.io
37-
[npm_b]: https://img.shields.io/npm/v/js-data-mongodb.svg?style=flat
38-
[npm_l]: https://www.npmjs.org/package/js-data-mongodb
39-
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-mongodb.svg?style=flat
40-
[circle_l]: https://circleci.com/gh/js-data/js-data-mongodb
41-
[dn_b]: https://img.shields.io/npm/dm/js-data-mongodb.svg?style=flat
42-
[dn_l]: https://www.npmjs.org/package/js-data-mongodb
43-
[cov_b]: https://img.shields.io/codecov/c/github/js-data/js-data-mongodb.svg?style=flat
44-
[cov_l]: https://codecov.io/github/js-data/js-data-mongodb
38+
[1]: http://slack.js-data.io/badge.svg
39+
[2]: http://slack.js-data.io
40+
[3]: https://img.shields.io/npm/v/js-data-mongodb.svg?style=flat
41+
[4]: https://www.npmjs.org/package/js-data-mongodb
42+
[5]: https://img.shields.io/circleci/project/js-data/js-data-mongodb.svg?style=flat
43+
[6]: https://circleci.com/gh/js-data/js-data-mongodb
44+
[7]: https://img.shields.io/npm/dm/js-data-mongodb.svg?style=flat
45+
[8]: https://www.npmjs.org/package/js-data-mongodb
46+
[9]: https://img.shields.io/codecov/c/github/js-data/js-data-mongodb.svg?style=flat
47+
[10]: https://codecov.io/github/js-data/js-data-mongodb
48+
[11]: http://www.js-data.io/
49+
[12]: http://www.js-data.io/v3.0/docs/js-data-mongodb
50+
[13]: http://api.js-data.io/js-data-mongodb
51+
[14]: http://stackoverflow.com/questions/tagged/jsdata
52+
[15]: http://slack.js-data.io/
53+
[16]: https://github.com/js-data/js-data-mongodb/blob/master/.github/CONTRIBUTING.md
54+
[17]: https://github.com/js-data/js-data-mongodb/blob/master/LICENSE
55+
[18]: https://github.com/js-data/js-data-mongodb/blob/master/AUTHORS

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ general:
44
- gh-pages
55
machine:
66
node:
7-
version: 5.7.0
7+
version: 6
88
dependencies:
99
pre:
1010
- npm install -g npm

mocha.start.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global assert:true */
1+
/* global assert:true */
22
'use strict'
33

44
// prepare environment for js-data-adapter-tests
@@ -41,6 +41,7 @@ JSDataAdapterTests.init({
4141
})
4242

4343
require('./test/find.test')
44+
require('./test/update.test')
4445

4546
describe('exports', function () {
4647
it('should have exports', function () {

package.json

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-mongodb",
33
"description": "MongoDB adapter for js-data.",
4-
"version": "1.0.0-rc.1",
4+
"version": "1.0.0-rc.2",
55
"homepage": "https://github.com/js-data/js-data-mongodb",
66
"repository": {
77
"type": "git",
@@ -41,16 +41,10 @@
4141
"dist/"
4242
]
4343
},
44-
"babel": {
45-
"presets": [
46-
"es2015"
47-
]
48-
},
4944
"scripts": {
50-
"lint": "repo-tools lint \"**/*.js\"",
51-
"bundle": "rollup -c rollup.config.js -f cjs -o dist/js-data-mongodb.js -m dist/js-data-mongodb.js.map src/index.js && repo-tools write-version dist/js-data-mongodb.js",
45+
"lint": "standard '**/*.js'",
46+
"bundle": "rollup src/index.js -c -o dist/js-data-mongodb.js -m dist/js-data-mongodb.js.map -f cjs && repo-tools write-version dist/js-data-mongodb.js",
5247
"doc": "jsdoc -c conf.json src node_modules/js-data-adapter/src",
53-
"watch": "watch \"npm run bundle\" src/",
5448
"build": "npm run lint && npm run bundle",
5549
"mocha": "mocha -t 20000 -R dot -r babel-core/register -r babel-polyfill mocha.start.js",
5650
"cover": "nyc --require babel-core/register --require babel-polyfill --cache mocha -t 20000 -R dot mocha.start.js && nyc report --reporter=html",
@@ -62,11 +56,27 @@
6256
"mout": "1.0.0"
6357
},
6458
"peerDependencies": {
65-
"bson": "^0.4.x || ^0.3.x",
66-
"js-data": "^3.0.0-rc.4",
59+
"bson": ">=0.3.x",
60+
"js-data": "^3.0.0-rc.9",
6761
"mongodb": ">=1.3.x"
6862
},
6963
"devDependencies": {
70-
"js-data-repo-tools": "0.5.6"
64+
"babel-core": "6.24.1",
65+
"babel-eslint": "7.2.3",
66+
"babel-plugin-external-helpers": "6.22.0",
67+
"babel-plugin-syntax-async-functions": "6.13.0",
68+
"babel-plugin-transform-regenerator": "6.24.1",
69+
"babel-polyfill": "6.23.0",
70+
"babel-preset-es2015": "6.24.1",
71+
"chai": "3.5.0",
72+
"ink-docstrap": "git+https://github.com/js-data/docstrap.git#cfbe45fa313e1628c493076d5e15d2b855dfbf2c",
73+
"js-data-repo-tools": "1.0.0",
74+
"jsdoc": "3.4.3",
75+
"mocha": "3.4.2",
76+
"nyc": "10.3.2",
77+
"rollup": "0.41.6",
78+
"rollup-plugin-babel": "2.7.1",
79+
"sinon": "2.3.1",
80+
"standard": "10.0.2"
7181
}
7282
}

rollup.config.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
var babel = require('rollup-plugin-babel')
1+
import babel from 'rollup-plugin-babel'
22

3-
module.exports = {
3+
export default {
44
external: [
55
'mongodb',
66
'bson',
@@ -11,8 +11,16 @@ module.exports = {
1111
plugins: [
1212
babel({
1313
babelrc: false,
14+
plugins: [
15+
'external-helpers'
16+
],
1417
presets: [
15-
'es2015-rollup'
18+
[
19+
'es2015',
20+
{
21+
modules: false
22+
}
23+
]
1624
],
1725
exclude: 'node_modules/**'
1826
})

0 commit comments

Comments
 (0)