Skip to content

Commit a18acf6

Browse files
committed
upgrade to babel6
1 parent 2d7d750 commit a18acf6

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

.babelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"plugins": ["transform-object-rest-spread"],
3+
"presets": [
4+
"async-to-bluebird",
5+
"es2015-node4"
6+
]
7+
}

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prepublish": "npm run check && npm run build",
1111
"check": "npm run lint && npm run test-unit",
1212
"lint": "eslint src",
13-
"build": "rm -rf lib/* && babel src --ignore test --optional runtime --out-dir lib",
13+
"build": "rm -rf lib/* && babel src --ignore test --out-dir lib",
1414
"test": "npm run test-unit && npm run test-docker",
1515
"test-watch": "npm run test-unit -- --watch",
1616
"test-unit": "mocha $npm_package_options_mocha test/unit/*.test.js test/unit/**/*.test.js",
@@ -33,7 +33,6 @@
3333
},
3434
"homepage": "https://github.com/mickhansen/graphql-sequelize",
3535
"dependencies": {
36-
"babel-runtime": "^6.0.8",
3736
"graphql-relay": "^0.4.2",
3837
"invariant": "2.2.1",
3938
"lodash": "^4.0.0"
@@ -42,10 +41,13 @@
4241
"graphql": "^0.5.0 || ^0.6.0"
4342
},
4443
"devDependencies": {
45-
"babel": "^5.8.29",
46-
"babel-core": "^5.8.31",
44+
"babel-cli": "^6.9.0",
4745
"babel-eslint": "^6.0.3",
48-
"bluebird": "^3.1.4",
46+
"babel-plugin-transform-object-rest-spread": "^6.8.0",
47+
"babel-preset-async-to-bluebird": "^1.1.0",
48+
"babel-preset-es2015-node4": "^2.1.0",
49+
"babel-register": "^6.9.0",
50+
"bluebird": "^3.4.0",
4951
"chai": "^3.0.0",
5052
"chai-as-promised": "^5.1.0",
5153
"eslint": "^1.7.3",

scripts/mocha-bootload

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
require('babel/register')({
2-
optional: ['runtime', 'bluebirdCoroutines']
3-
});
1+
require('babel-register');
42

53
var chai = require('chai');
64

src/relay.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export class NodeTypeMapper {
2525
}
2626

2727
mapTypes(types) {
28-
Object.entries(types).forEach(([k, v]) => {
28+
Object.keys(types).forEach((k) => {
29+
let v = types[k];
2930
this.map[k] = v.type
3031
? v
3132
: { type: v };

src/resolver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function resolverFactory(target, options) {
108108
source: source
109109
});
110110
}).then(function (findOptions) {
111-
if (!findOptions.order) {
111+
if (list && !findOptions.order) {
112112
findOptions.order = [model.primaryKeyAttribute, 'ASC'];
113113
}
114114

0 commit comments

Comments
 (0)