Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Aug 23, 2016
2 parents 6f780cc + dd43e87 commit 61a9b43
Show file tree
Hide file tree
Showing 9 changed files with 513 additions and 328 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ node_modules
*.iml

data/
doc/
doc/
.nyc_output/
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
# Names are formatted as:
# # commits Name or Organization <email address>
# The email address is not required for organizations.
Cory Robinson <crobinson42@users.noreply.github.com>
Jason Dobry <jason.dobry@gmail.com>
John Grogg <johng@freshrealm.co>
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
##### 1.0.0-rc.1 - 23 August 2016

###### Backwards compatible changes
- #16, #17 - Feature - Translate all ObjectID fields by @crobinson42
- Cleaned up the code
- Improved support for `fields` option in `find` and `findAll`

##### 1.0.0-beta.1 - 30 April 2016

###### Breaking changes
Expand Down
13 changes: 9 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
general:
branches:
ignore:
- gh-pages
machine:
node:
version: 4.1.0
version: 5.7.0
dependencies:
pre:
- npm install -g npm
- npm install js-data@^3.0.0-beta.3 mongodb bson
- npm install -g codecov nyc
- npm install js-data@^3.0.0-rc.4 mongodb bson@^0.4.x
test:
override:
- npm run ci
post:
- nyc report --reporter=lcov | codecov
22 changes: 11 additions & 11 deletions mocha.start.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@
'use strict'

// prepare environment for js-data-adapter-tests
require('babel-polyfill')
import 'babel-polyfill'

var JSData = require('js-data')
var JSDataAdapterTests = require('js-data-adapter-tests')
var JSDataMongoDB = require('./')
var version = JSDataMongoDB.version
var MongoDBAdapter = JSDataMongoDB.MongoDBAdapter
import * as JSData from 'js-data'
import JSDataAdapterTests from './node_modules/js-data-adapter/dist/js-data-adapter-tests'
import * as JSDataMongoDB from './src/index'

var assert = global.assert = JSDataAdapterTests.assert
const assert = global.assert = JSDataAdapterTests.assert
global.sinon = JSDataAdapterTests.sinon

JSDataAdapterTests.init({
debug: false,
JSData: JSData,
Adapter: MongoDBAdapter,
Adapter: JSDataMongoDB.MongoDBAdapter,
adapterConfig: {
uri: 'mongodb://localhost:27017'
uri: 'mongodb://localhost:27017',
translateObjectIDs: true
},
containerConfig: {
mapperDefaults: {
Expand All @@ -44,6 +43,7 @@ JSDataAdapterTests.init({
require('./test/find.test')

describe('exports', function () {
assert(version)
assert(version.full)
it('should have exports', function () {
assert(JSDataMongoDB.version, 'Should have version')
})
})
31 changes: 13 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-mongodb",
"description": "MongoDB adapter for js-data.",
"version": "1.0.0-beta.1",
"version": "1.0.0-rc.1",
"homepage": "https://github.com/js-data/js-data-mongodb",
"repository": {
"type": "git",
Expand Down Expand Up @@ -37,41 +37,36 @@
"beforeEach",
"afterEach"
],
"ignore": ["dist/"]
"ignore": [
"dist/"
]
},
"babel": {
"presets": ["es2015-rollup"]
"presets": [
"es2015"
]
},
"scripts": {
"lint": "repo-tools lint \"**/*.js\"",
"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",
"doc": "jsdoc -c conf.json src node_modules/js-data-adapter/src",
"watch": "watch \"npm run bundle\" src/",
"build": "npm run lint && npm run bundle",
"mocha": "mocha -t 20000 -R dot -r source-map-support/register mocha.start.js",
"cover": "istanbul cover --hook-run-in-context node_modules/mocha/bin/_mocha -- -t 20000 -R dot -r source-map-support/register mocha.start.js",
"mocha": "mocha -t 20000 -R dot -r babel-core/register -r babel-polyfill mocha.start.js",
"cover": "nyc --require babel-core/register --require babel-polyfill --cache mocha -t 20000 -R dot mocha.start.js && nyc report --reporter=html",
"test": "npm run build && npm run cover",
"release": "npm test && npm run doc && repo-tools updates && repo-tools changelog && repo-tools authors",
"ci": "npm run test && cat coverage/lcov.info | codecov"
"release": "npm test && npm run doc && repo-tools updates && repo-tools changelog && repo-tools authors"
},
"dependencies": {
"js-data-adapter": "~0.6.1",
"js-data-adapter": "~0.8.2",
"mout": "1.0.0"
},
"peerDependencies": {
"bson": "^0.4.x || ^0.3.x",
"js-data": "^3.0.0-beta.3",
"js-data": "^3.0.0-rc.4",
"mongodb": ">=1.3.x"
},
"devDependencies": {
"babel-polyfill": "6.7.4",
"babel-preset-es2015-rollup": "1.1.1",
"istanbul": "0.4.3",
"js-data-adapter-tests": "^2.0.0-alpha.16",
"js-data-repo-tools": "0.5.0",
"rollup": "0.26.1",
"rollup-plugin-babel": "2.4.0",
"source-map-support": "0.4.0",
"watch": "0.18.0"
"js-data-repo-tools": "0.5.6"
}
}
11 changes: 11 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
var babel = require('rollup-plugin-babel')

module.exports = {
external: [
'mongodb',
'bson',
'js-data',
'js-data-adapter',
'mout/string/underscore'
],
plugins: [
babel({
babelrc: false,
presets: [
'es2015-rollup'
],
exclude: 'node_modules/**'
})
]
Expand Down
Loading

0 comments on commit 61a9b43

Please sign in to comment.