Skip to content

Commit 9c38eaa

Browse files
committed
1.0.0-alpha.1
1 parent 3868e08 commit 9c38eaa

19 files changed

+1855
-818
lines changed

.github/CONTRIBUTING.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
[Read the Contributing Guide](http://js-data.io/docs/contributing).
4+
5+
## Support
6+
7+
[Find out how to Get Support](http://js-data.io/docs/support).
8+
9+
## Community
10+
11+
[Explore the Community](http://js-data.io/docs/community).
12+
13+
### Have write access?
14+
15+
To cut a release:
16+
17+
1. Checkout master
18+
1. Bump version in `package.json` appropriately
19+
1. Run `npm run release`
20+
1. Update `CHANGELOG.md` appropriately
21+
1. Commit and push changes, including the `dist/` folder
22+
1. Make a GitHub release
23+
- set tag name to version
24+
- set release name to version
25+
- set release body to changelog entry for the version
26+
- attach the files in the `dist/` folder
27+
1. `npm publish .`

.github/ISSUE_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(delete this line) GitHub Issues are NOT for support questions.
2+
(delete this line) GitHub Issues ARE for bug reports, feature requests, and other issues.
3+
(delete this line) Find out how to Get Support here: http://js-data.io/docs/support.
4+
5+
<your detailed, discussable, actionable, and helpful text goes here>
6+
7+
Thanks!

.github/PULL_REQUEST_TEMPLATE.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)
2+
3+
- [ ] - `npm test` succeeds
4+
- [ ] - Pull request has been squashed into 1 commit
5+
- [ ] - I did NOT commit changes to `dist/`
6+
- [ ] - Code coverage does not decrease (if any source code was changed)
7+
- [ ] - Appropriate JSDoc comments were updated in source code (if applicable)
8+
- [ ] - Approprate changes to js-data.io docs have been suggested ("Suggest Edits" button)

.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Jason Dobry <[email protected]> Jason Dobry <[email protected]>

AUTHORS

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This is the official list of js-data-mongodb project authors.
2+
#
3+
# This file is controlled by scripts/authors.js
4+
#
5+
# Names are formatted as:
6+
# # commits Name or Organization <email address>
7+
# The email address is not required for organizations.
8+
Jason Dobry <[email protected]>
9+
John Grogg <[email protected]>

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
##### 1.0.0-alpha.1 - 26 February 2016
2+
3+
###### Breaking API changes
4+
- Now depends on js-data 3.x
5+
6+
###### Backwards compatible API changes
7+
- Added createMany and updateMany methods
8+
- Added lifecycle methods
9+
- Added insertOpts, insertManyOpts, updateOpts, removeOpts, findOpts, and findOneOpts options
10+
111
##### 0.7.0 - 19 February 2016
212

313
###### Backwards compatible API changes

CONTRIBUTING.md

-27
This file was deleted.

CONTRIBUTORS

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# People who have contributed to the js-data-mongodb project.
2+
#
3+
# This file is controlled by scripts/authors.js
4+
#
5+
# Names should be added to this file as:
6+
# [commit count] Name <email address>
7+
24 Jason Dobry <[email protected]>
8+
1 John Grogg <[email protected]>

LICENSE

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2015 Jason Dobry
3+
Copyright (c) 2014-2016 js-data-mongodb project authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

README.md

+47-40
Original file line numberDiff line numberDiff line change
@@ -14,67 +14,77 @@ MongoDB adapter for [js-data](http://www.js-data.io/).
1414
## Table of contents
1515

1616
* [Quick start](#quick-start)
17-
* [Documentation](#documentation)
18-
* [API Reference](#api-reference)
19-
* [Support](#support)
17+
* [Guides and Tutorials](#guides-and-tutorials)
18+
* [API Reference Docs](#api-reference-docs)
2019
* [Community](#community)
20+
* [Support](#support)
2121
* [Contributing](#contributing)
2222
* [License](#license)
2323

2424
## Quick Start
25-
`npm install --save js-data js-data-mongodb`.
25+
`npm install --save js-data js-data-mongodb mongodb bson`.
2626

2727
```js
28-
var JSData = require('js-data');
29-
var DSMongoDBAdapter = require('js-data-mongodb');
30-
31-
var store = new JSData.DS();
32-
var adapter = new DSMongoDBAdapter('mongodb://localhost:27017');
28+
// Use Container instead of DataStore on the server
29+
import {Container} from 'js-data'
30+
import MongoDBAdapter from 'js-data-mongodb'
31+
32+
// Create a store to hold your Mappers
33+
const store = new Container({
34+
mapperDefaults: {
35+
// MongoDB uses "_id" as the primary key
36+
idAttribute: '_id'
37+
}
38+
})
39+
40+
// Create an instance of MongoDBAdapter with default settings
41+
const adapter = new MongoDBAdapter()
42+
43+
// Mappers in "store" will use the MongoDB adapter by default
44+
store.registerAdapter('mongodb', adapter, { default: true })
45+
46+
// Create a Mapper that maps to a "user" collection
47+
store.defineMapper('user')
48+
```
3349

34-
// "store" will now use the MongoDB adapter for all async operations
35-
store.registerAdapter('mongodb', adapter, { default: true });
50+
```js
51+
async function findAllAdminUsers () {
52+
// Find all users where "user.role" == "admin"
53+
return await store.findAll('user', {
54+
role: 'admin'
55+
})
56+
}
57+
```
3658

37-
var User = store.defineResource({
38-
// Why couldn't Mongo just use "id"?
39-
idAttribute: '_id',
59+
## Guides and Tutorials
4060

41-
// map this resource to a collection, default is Resource#name
42-
table: 'users'
43-
});
44-
```
61+
[Get started at http://js-data.io](http://js-data.io)
4562

46-
### Documentation
47-
- [Getting Started with js-data](http://www.js-data.io/docs/home)
48-
- [js-data-mongodb](http://www.js-data.io/docs/js-data-mongodb)
49-
- [CHANGELOG.md](https://github.com/js-data/js-data-mongodb/blob/master/CHANGELOG.md)
63+
## API Reference Docs
5064

51-
## API Reference
52-
- [js-data-mongodb](http://api.js-data.io/js-data-mongodb/)
65+
[Visit http://api.js-data.io](http://api.js-data.io).
5366

54-
## Support
67+
## Community
5568

56-
Support questions are handled via [StackOverflow][so], [Slack][sl_l], and the
57-
[Mailing List][ml]. Ask your questions there.
69+
[Explore the Community](http://js-data.io/docs/community).
5870

59-
When submitting bug reports on GitHub, please include as much detail as possible
60-
to make debugging quick and easy.
71+
## Support
6172

62-
## Community
63-
- [StackOverflow Channel][so]
64-
- [Slack Chat][sl_l] [![Slack Status][sl_b]][sl_l]
65-
- [Announcements](http://www.js-data.io/blog)
66-
- [Mailing List](ml)
67-
- [Issue Tracker](https://github.com/js-data/js-data-mongodb/issues)
73+
[Find out how to Get Support](http://js-data.io/docs/support).
6874

6975
## Contributing
7076

71-
See [CONTRIBUTING.md](https://github.com/js-data/js-data-mongodb/blob/master/CONTRIBUTING.md).
77+
[Read the Contributing Guide](http://js-data.io/docs/contributing).
7278

7379
## License
7480

7581
The MIT License (MIT)
7682

77-
See [LICENSE](https://github.com/js-data/js-data-mongodb/blob/master/LICENSE).
83+
Copyright (c) 2014-2016 js-data-mongodb project authors
84+
85+
* [LICENSE](https://github.com/js-data/js-data-mongodb/blob/master/LICENSE)
86+
* [AUTHORS](https://github.com/js-data/js-data-mongodb/blob/master/AUTHORS)
87+
* [CONTRIBUTORS](https://github.com/js-data/js-data-mongodb/blob/master/CONTRIBUTORS)
7888

7989
[sl_b]: http://slack.js-data.io/badge.svg
8090
[sl_l]: http://slack.js-data.io
@@ -88,6 +98,3 @@ See [LICENSE](https://github.com/js-data/js-data-mongodb/blob/master/LICENSE).
8898
[cov_l]: https://coveralls.io/github/js-data/js-data-mongodb?branch=master
8999
[cod_b]: https://img.shields.io/codacy/1f45ede49dfb4bdea68f46ca55631968.svg
90100
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-mongodb/dashboard
91-
92-
[ml]: https://groups.io/org/groupsio/jsdata
93-
[so]: http://stackoverflow.com/questions/tagged/jsdata

conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"templates": {
1515
"theme": "lumen",
1616
"systemName": "js-data-mongodb",
17-
"copyright": "js-data-mongodb Copyright © 2014-2016 Jason Dobry",
17+
"copyright": "js-data-mongodb Copyright © 2014-2016 js-data-mongodb project authors",
1818
"outputSourceFiles": true,
1919
"syntaxTheme": "dark",
2020
"linenums": true,

0 commit comments

Comments
 (0)