Skip to content

Commit 5003346

Browse files
committed
Merge branch 'master' into release
2 parents dcd0ca9 + 2a2bdf7 commit 5003346

19 files changed

+341
-142
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+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# IDE files
2+
.idea/
13
# Logs
24
logs
35
*.log
@@ -35,3 +37,6 @@ node_modules
3537
coverage/
3638
doc/
3739
.nyc_output/
40+
yarn.lock
41+
*.log
42+
package-lock.json

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
Cory Robinson <[email protected]>
99
Dave Ramirez <[email protected]>
1010
Jason Dobry <[email protected]>
11+
Jens Böttcher <[email protected]>

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#### 1.0.0 - 06 September 2017
2+
3+
Stable 1.0.0 release
4+
5+
##### Bug fixes
6+
- #23 - orderBy does not work in most cases. Fixed by @eljenso
7+
8+
#### Other
9+
- Upgraded dependencies
10+
111
#### 1.0.0-rc.1 - 26 August 2016
212

313
##### Backwards compatible changes

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
Cory Robinson <[email protected]>
77
Dave Ramirez <[email protected]>
88
Jason Dobry <[email protected]>
9+
Jens Böttcher <[email protected]>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 js-data-express project authors
3+
Copyright (c) 2016-2017 js-data-express 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

README.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,43 @@ Generate Express.js-compatible route middleware for [js-data](http://www.js-data
1313
To get started, visit __[http://js-data.io](http://www.js-data.io/docs/js-data-express)__.
1414

1515
```js
16-
import express from 'express'
17-
import {mount, queryParser, Router} from 'js-data-express'
18-
import {Container} from 'js-data'
19-
20-
const app = express()
21-
const store = new Container()
22-
const UserMapper = store.defineMapper('user')
23-
const CommentMapper = store.defineMapper('comment')
16+
import express from 'express';
17+
import { mount, queryParser, Router } from 'js-data-express';
18+
import { Container } from 'js-data';
19+
20+
const app = express();
21+
const store = new Container();
22+
const UserMapper = store.defineMapper('user');
23+
const CommentMapper = store.defineMapper('comment');
2424
```
2525

2626
```js
2727
// Mount queryParser and store at "/"
28-
mount(app, store)
28+
mount(app, store);
2929

3030
// Mount queryParser and store at "/api"
31-
mount(app, store, '/api')
31+
mount(app, store, '/api');
3232

3333
// Mount queryParser at "/"
34-
app.use(queryParser)
34+
app.use(queryParser);
3535
// Mount store at "/"
36-
app.use(new Router(store).router)
36+
app.use(new Router(store).router);
3737

3838
// Mount queryParser at "/api"
39-
app.use('/api' queryParser)
39+
app.use('/api' queryParser);
4040
// Mount store at "/api"
41-
app.use('/api', new Router(store).router)
41+
app.use('/api', new Router(store).router);
4242

43-
var api = app.route('/api')
44-
// Mount queryParser at "/api"
45-
api.use(queryParser)
43+
// Create an express Router instance
44+
const api = express().Router();
45+
// Mount queryParser
46+
api.use(queryParser);
4647
// Mount UserMapper at "/api/user"
47-
api.use('/user', new Router(UserMapper).router)
48+
api.use('/user', new Router(UserMapper).router);
4849
// Mount UserMapper at "/api/comment"
49-
api.use('/comment', new Router(CommentMapper).router)
50+
api.use('/comment', new Router(CommentMapper).router);
51+
// Use api Router in an existing express app instance
52+
app.use('/api', api);
5053
```
5154

5255
## Links
@@ -63,7 +66,7 @@ api.use('/comment', new Router(CommentMapper).router)
6366

6467
The MIT License (MIT)
6568

66-
Copyright (c) 2014-2016 js-data-express project authors
69+
Copyright (c) 2016-2017 js-data-express project authors
6770

6871
* [LICENSE](https://github.com/js-data/js-data-express/blob/master/LICENSE)
6972
* [AUTHORS](https://github.com/js-data/js-data-express/blob/master/AUTHORS)

circle.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
# Adjust the behavior of the virtual machine (VM)
2+
machine:
3+
node:
4+
version: 6.11.2
5+
6+
# Use for broader build-related configuration
17
general:
28
branches:
39
ignore:
410
- gh-pages
5-
machine:
6-
node:
7-
version: 5.7.0
11+
812
dependencies:
913
pre:
1014
- npm i -g npm
1115
- npm i -g codecov nyc
12-
- npm i js-data@^3.0.0-rc.4 express
1316
test:
1417
post:
15-
- nyc report --reporter=lcov | codecov
18+
- nyc report --reporter=lcov > coverage.lcov && codecov

conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"templates": {
1515
"theme": "jsdata",
1616
"systemName": "js-data-express",
17-
"copyright": "js-data-express Copyright © 2016 js-data-express project authors",
17+
"copyright": "js-data-express Copyright © 2016-2017 js-data-express project authors",
1818
"outputSourceFiles": true,
1919
"linenums": true,
2020
"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>",

package.json

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-express",
33
"description": "Generate Express.js-compatible route middleware for JSData models.",
4-
"version": "1.0.0-rc.1",
4+
"version": "1.0.0",
55
"homepage": "https://github.com/js-data/js-data-express",
66
"repository": {
77
"type": "git",
@@ -32,28 +32,45 @@
3232
"dist/"
3333
]
3434
},
35-
"babel": {
36-
"presets": [
37-
"es2015"
38-
]
39-
},
4035
"scripts": {
4136
"doc": "jsdoc -c conf.json src",
42-
"lint": "repo-tools lint \"**/*.js\"",
43-
"bundle": "rollup -c rollup.config.js -f cjs -o dist/js-data-express.js -m dist/js-data-express.js.map src/index.js && repo-tools write-version dist/js-data-express.js",
37+
"lint": "standard '**/*.js'",
38+
"bundle": "rollup src/index.js -c -o dist/js-data-express.js -m dist/js-data-express.js.map -f cjs && repo-tools write-version dist/js-data-express.js",
4439
"build": "npm run lint && npm run bundle",
4540
"mocha": "mocha --recursive -t 30000 -R dot -r babel-core/register -r babel-polyfill",
4641
"cover": "nyc --require babel-core/register --require babel-polyfill --cache mocha --recursive -t 20000 -R dot && nyc report --reporter=html",
4742
"test": "npm run build && npm run cover",
48-
"release": "npm test && npm run doc && repo-tools updates && repo-tools changelog && repo-tools authors"
43+
"release": "npm test && npm run doc && repo-tools changelog && repo-tools authors"
44+
},
45+
"dependencies": {
46+
"body-parser": "1.17.2",
47+
"express": "4.15.4",
48+
"js-data": ">=3.0.0"
4949
},
5050
"peerDependencies": {
51-
"js-data": "^3.0.0-rc.4"
51+
"body-parser": "1.17.2",
52+
"express": "4.15.4",
53+
"js-data": ">=3.0.0"
5254
},
5355
"devDependencies": {
54-
"express": "4.14.0",
55-
"js-data-repo-tools": "0.5.6",
56-
"supertest": "2.0.0",
57-
"body-parser": "1.15.2"
56+
"babel-core": "6.26.0",
57+
"babel-eslint": "7.2.3",
58+
"babel-plugin-external-helpers": "6.22.0",
59+
"babel-plugin-syntax-async-functions": "6.13.0",
60+
"babel-plugin-transform-regenerator": "6.26.0",
61+
"babel-polyfill": "6.26.0",
62+
"babel-preset-es2015": "6.24.1",
63+
"chai": "4.1.2",
64+
"ink-docstrap": "git+https://github.com/js-data/docstrap.git#cfbe45fa313e1628c493076d5e15d2b855dfbf2c",
65+
"js-data-repo-tools": "1.0.0",
66+
"jsdoc": "3.5.4",
67+
"mocha": "3.5.0",
68+
"node-mocks-http": "1.6.4",
69+
"nyc": "11.2.1",
70+
"rollup": "0.49.2",
71+
"rollup-plugin-babel": "3.0.2",
72+
"sinon": "3.2.1",
73+
"standard": "10.0.3",
74+
"supertest": "3.0.0"
5875
}
5976
}

0 commit comments

Comments
 (0)