Skip to content

Commit 9a4ec63

Browse files
committed
Prepare for 1.0.0-beta.1
1 parent 6409140 commit 9a4ec63

20 files changed

+301
-400
lines changed

.babelrc

-3
This file was deleted.

.github/CONTRIBUTING.md

+22-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
1-
# Contributing
1+
# Contributing to js-data-mongodb
22

3-
[Read the Contributing Guide](http://js-data.io/docs/contributing).
3+
[Read the general Contributing Guide](http://js-data.io/docs/contributing).
44

5-
## Support
5+
## Project structure
66

7-
[Find out how to Get Support](http://js-data.io/docs/support).
7+
* `dist/` - Contains final build files for distribution
8+
* `doc/` - Output folder for JSDocs
9+
* `src/` - Project source code
10+
* `test/` - Project tests
811

9-
## Community
12+
## Clone, build & test
1013

11-
[Explore the Community](http://js-data.io/docs/community).
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)
1219

13-
### Have write access?
14-
15-
To cut a release:
20+
## To cut a release
1621

1722
1. Checkout master
1823
1. Bump version in `package.json` appropriately
19-
1. Run `npm run release`
2024
1. Update `CHANGELOG.md` appropriately
21-
1. Commit and push changes, including the `dist/` folder
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
2230
1. Make a GitHub release
31+
- tag from `release` branch
2332
- set tag name to version
2433
- set release name to version
2534
- set release body to changelog entry for the version
26-
- attach the files in the `dist/` folder
2735
1. `npm publish .`
36+
37+
See also [Community & Support](http://js-data.io/docs/community).

.github/ISSUE_TEMPLATE.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
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.
1+
(delete this line) Find out how to get help here: http://js-data.io/docs/community.
42

5-
<your detailed, discussable, actionable, and helpful text goes here>
3+
<your detailed, actionable, and helpful text goes here>
64

75
Thanks!

.github/PULL_REQUEST_TEMPLATE.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)
22

33
- [ ] - `npm test` succeeds
4-
- [ ] - Pull request has been squashed into 1 commit
5-
- [ ] - I did NOT commit changes to `dist/`
64
- [ ] - Code coverage does not decrease (if any source code was changed)
75
- [ ] - Appropriate JSDoc comments were updated in source code (if applicable)
86
- [ ] - Approprate changes to js-data.io docs have been suggested ("Suggest Edits" button)

.npmignore

-40
This file was deleted.

CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
##### 1.0.0-beta.1 - 30 April 2016
2+
3+
###### Breaking changes
4+
- How you must now import in ES2015:
5+
6+
```js
7+
import MongoDBAdapter from 'js-data-mongodb'
8+
const adapter = new MongoDBAdapter()
9+
```
10+
or
11+
```js
12+
import {MongoDBAdapter, version} from 'js-data-mongodb'
13+
console.log(version)
14+
const adapter = new MongoDBAdapter()
15+
```
16+
17+
- How you must now import in ES5:
18+
19+
```js
20+
var JSDataMongoDB = require('js-data-mongodb')
21+
var MongoDBAdapter = JSDataMongoDB.MongoDBAdapter
22+
var adapter = new MongoDBAdapter()
23+
```
24+
25+
- Moved some `dist` files to the `release` branch to reduce noise
26+
27+
###### Other
28+
- Upgraded to `js-data-adapter` v0.6.1
29+
- Now using js-data JSDoc template
30+
131
##### 1.0.0-alpha.6 - 17 March 2016
232

333
###### Backwards compatible API changes

README.md

+13-69
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,20 @@
77
[![Circle CI][circle_b]][circle_l]
88
[![npm downloads][dn_b]][dn_l]
99
[![Coverage Status][cov_b]][cov_l]
10-
[![Codacy][cod_b]][cod_l]
1110

1211
MongoDB adapter for [js-data](http://www.js-data.io/).
1312

14-
## Table of contents
13+
To get started, visit __[http://js-data.io](http://www.js-data.io/docs/js-data-mongodb)__.
1514

16-
* [Quick start](#quick-start)
17-
* [Guides and Tutorials](#guides-and-tutorials)
18-
* [API Reference Docs](#api-reference-docs)
19-
* [Community](#community)
20-
* [Support](#support)
21-
* [Contributing](#contributing)
22-
* [License](#license)
15+
## Links
2316

24-
## Quick Start
25-
`npm install --save js-data js-data-mongodb mongodb bson`.
26-
27-
```js
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-
```
49-
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-
```
58-
59-
## Guides and Tutorials
60-
61-
[Get started at http://js-data.io](http://js-data.io)
62-
63-
## API Reference Docs
64-
65-
[Visit http://api.js-data.io](http://api.js-data.io).
66-
67-
## Community
68-
69-
[Explore the Community](http://js-data.io/docs/community).
70-
71-
## Support
72-
73-
[Find out how to Get Support](http://js-data.io/docs/support).
74-
75-
## Contributing
76-
77-
[Read the Contributing Guide](http://js-data.io/docs/contributing).
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)
7824

7925
## License
8026

@@ -90,11 +36,9 @@ Copyright (c) 2014-2016 js-data-mongodb project authors
9036
[sl_l]: http://slack.js-data.io
9137
[npm_b]: https://img.shields.io/npm/v/js-data-mongodb.svg?style=flat
9238
[npm_l]: https://www.npmjs.org/package/js-data-mongodb
93-
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-mongodb/master.svg?style=flat
94-
[circle_l]: https://circleci.com/gh/js-data/js-data-mongodb/tree/master
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
9541
[dn_b]: https://img.shields.io/npm/dm/js-data-mongodb.svg?style=flat
9642
[dn_l]: https://www.npmjs.org/package/js-data-mongodb
97-
[cov_b]: https://img.shields.io/coveralls/js-data/js-data-mongodb/master.svg?style=flat
98-
[cov_l]: https://coveralls.io/github/js-data/js-data-mongodb?branch=master
99-
[cod_b]: https://img.shields.io/codacy/1f45ede49dfb4bdea68f46ca55631968.svg
100-
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-mongodb/dashboard
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

conf.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
"package": "./package.json"
1313
},
1414
"templates": {
15-
"theme": "lumen",
15+
"theme": "jsdata",
1616
"systemName": "js-data-mongodb",
1717
"copyright": "js-data-mongodb Copyright © 2014-2016 js-data-mongodb project authors",
1818
"outputSourceFiles": true,
19-
"syntaxTheme": "dark",
2019
"linenums": true,
21-
"footer": "<div style=\"text-align:center\">Back to <a href=\"http://js-data.io\">js-data.io</a></div>",
20+
"footer": "<div style=\"text-align:center\"><a href=\"/\">api.js-data.io</a>&nbsp;&#8226;&nbsp;<a href=\"http://js-data.io\">js-data.io</a></div>",
2221
"analytics": {
2322
"ua": "UA-55528236-2",
2423
"domain": "api.js-data.io"
2524
}
2625
}
27-
}
26+
}

dist/js-data-mongodb.d.ts

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {Adapter} from 'js-data-adapter'
2+
3+
interface IDict {
4+
[key: string]: any;
5+
}
6+
interface IBaseAdapter extends IDict {
7+
debug?: boolean,
8+
raw?: boolean
9+
}
10+
interface IBaseMongoDBAdapter extends IBaseAdapter {
11+
translateId?: boolean
12+
uri?: string
13+
}
14+
export class MongoDBAdapter extends Adapter {
15+
static extend(instanceProps?: IDict, classProps?: IDict): typeof MongoDBAdapter
16+
constructor(opts?: IBaseMongoDBAdapter)
17+
}
18+
export interface version {
19+
full: string
20+
minor: string
21+
major: string
22+
patch: string
23+
alpha: string | boolean
24+
beta: string | boolean
25+
}

0 commit comments

Comments
 (0)