Skip to content

Commit 37cc2bc

Browse files
committed
Merge pull request #177 from 10gen/update-deps
Update deps + 👕 0 check errors
2 parents ce8da2e + 5899d97 commit 37cc2bc

23 files changed

+159
-137
lines changed

.eslintrc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2-
"env": {
3-
"mocha": true
4-
},
5-
"extends": "mongodb-js/node"
2+
"extends": [
3+
"mongodb-js/node",
4+
"mongodb-js/browser"
5+
],
6+
"rules": {
7+
"camelcase": 1
8+
}
69
}

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"release": "gulp release",
5858
"test": "mocha",
5959
"ci": "npm run check && npm run release",
60-
"check": "mongodb-js-precommit",
61-
"fmt": "mongodb-js-fmt src/{**/*.js,*.js}"
60+
"check": "mongodb-js-precommit ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js",
61+
"fmt": "mongodb-js-fmt ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js"
6262
},
6363
"pre-commit": [
6464
"check"
@@ -73,9 +73,9 @@
7373
"ampersand-rest-collection": "^5.0.0",
7474
"debug": "^2.2.0",
7575
"electron-squirrel-startup": "^0.1.4",
76-
"mongodb-collection-model": "^0.1.0",
77-
"mongodb-connection-model": "^3.0.4",
78-
"mongodb-instance-model": "^0.2.3",
76+
"mongodb-collection-model": "^0.1.1",
77+
"mongodb-connection-model": "^3.0.6",
78+
"mongodb-instance-model": "^1.0.1",
7979
"mongodb-ns": "^1.0.0",
8080
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.4.0/scout-server-0.4.0.tar.gz"
8181
},
@@ -88,31 +88,30 @@
8888
"ampersand-model": "^6.0.2",
8989
"ampersand-router": "^3.0.2",
9090
"ampersand-sync-localforage": "^0.1.1",
91-
"ampersand-view": "^8.0.1",
91+
"ampersand-view": "^9.0.0",
9292
"ampersand-view-switcher": "^2.0.0",
9393
"backoff": "^2.4.1",
9494
"bootstrap": "https://github.com/twbs/bootstrap/archive/v3.3.5.tar.gz",
95-
"browserify": "^11.2.0",
95+
"browserify": "^12.0.1",
9696
"bugsnag-js": "^2.4.8",
9797
"chalk": "^1.1.1",
9898
"d3": "^3.5.6",
9999
"del": "^2.0.2",
100100
"domready": "^1.0.8",
101101
"electron-installer-dmg": "^0.1.0",
102102
"electron-installer-squirrel-windows": "^0.4.0",
103-
"electron-packager": "^5.1.0",
104-
"eslint": "^1.6.0",
105-
"eslint-config-mongodb-js": "^0.1.6",
106-
"event-stream": "^3.3.1",
103+
"electron-packager": "^5.1.1",
104+
"eslint-config-mongodb-js": "^1.0.5",
105+
"event-stream": "^3.3.2",
107106
"figures": "^1.4.0",
108107
"font-awesome": "https://github.com/FortAwesome/Font-Awesome/archive/v4.4.0.tar.gz",
109108
"glob": "^5.0.15",
110109
"gulp": "^3.9.0",
111110
"gulp-jade": "^1.1.0",
112111
"gulp-less": "^3.0.3",
113-
"gulp-shell": "^0.5.0",
112+
"gulp-shell": "^0.5.1",
114113
"gulp-sourcemaps": "^1.6.0",
115-
"gulp-util": "^3.0.6",
114+
"gulp-util": "^3.0.7",
116115
"gulp-watch": "^4.3.5",
117116
"gulp-webserver": "^0.9.1",
118117
"jade": "^1.11.0",
@@ -123,26 +122,26 @@
123122
"merge-stream": "^1.0.0",
124123
"mocha": "^2.3.3",
125124
"moment": "^2.10.6",
126-
"mongodb-extended-json": "^1.5.2",
125+
"mongodb-extended-json": "^1.5.3",
127126
"mongodb-js-fmt": "^0.0.3",
128-
"mongodb-js-precommit": "^0.2.2",
129-
"mongodb-language-model": "^0.2.3",
127+
"mongodb-js-precommit": "^0.2.4",
128+
"mongodb-language-model": "^0.3.0",
130129
"mongodb-schema": "^3.3.0",
131130
"mousetrap": "^1.5.3",
132131
"node-notifier": "^4.3.1",
133132
"numeral": "^1.5.3",
134133
"octicons": "https://github.com/github/octicons/archive/v3.1.0.tar.gz",
135134
"pluralize": "^1.2.1",
136-
"pre-commit": "^1.1.1",
135+
"pre-commit": "^1.1.2",
137136
"qs": "^5.2.0",
138137
"raf": "^3.1.0",
139138
"run-sequence": "^1.1.4",
140139
"run-series": "^1.1.4",
141140
"scout-client": "http://bin.mongodb.org/js/scout-client/v0.4.0/scout-client-0.4.0.tar.gz",
142-
"stream-combiner2": "^1.0.2",
141+
"stream-combiner2": "^1.1.1",
143142
"uuid": "^2.0.1",
144143
"vinyl-buffer": "^1.0.0",
145144
"vinyl-source-stream": "^1.1.0",
146-
"watchify": "^3.4.0"
145+
"watchify": "^3.6.0"
147146
}
148147
}

src/.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/connect/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ var ConnectView = View.extend({
344344
// `Untitled (\d)` connections, increment a counter
345345
// on them like every MS Office does.
346346
var untitleds = _.chain(this.connections.models)
347-
.filter(function(model) {
348-
return _.startsWith(model.name, 'Untitled (');
347+
.filter(function(m) {
348+
return _.startsWith(m.name, 'Untitled (');
349349
})
350350
.sort('name')
351351
.value();

src/electron/menu.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
var app = require('app');
22
var Menu = require('menu');
33

4-
var menu = (function() {
5-
return {
6-
init: function(window) {
7-
/* eslint-disable no-extra-parens */
8-
var menu = (process.platform == 'darwin')
9-
? darwinMenu(window) : nonDarwinMenu(window);
10-
/* eslint-enable no-extra-parens */
11-
menu = Menu.buildFromTemplate(menu);
12-
Menu.setApplicationMenu(menu);
13-
}
14-
};
15-
}());
16-
174
// menus
185
function darwinMenu(window) {
196
return [
@@ -158,7 +145,7 @@ function darwinMenu(window) {
158145
]
159146
}
160147
];
161-
};
148+
}
162149

163150
function nonDarwinMenu(window) {
164151
return [
@@ -204,6 +191,21 @@ function nonDarwinMenu(window) {
204191
]
205192
}
206193
];
207-
};
194+
}
195+
196+
var menu = (function() {
197+
return {
198+
init: function(window) {
199+
var m;
200+
if (process.platform === 'darwin') {
201+
m = darwinMenu(window);
202+
} else {
203+
m = nonDarwinMenu(window);
204+
}
205+
m = Menu.buildFromTemplate(m);
206+
Menu.setApplicationMenu(m);
207+
}
208+
};
209+
}());
208210

209-
module.exports = menu;
211+
module.exports = menu;

src/electron/scout-server-ctl.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
var fs = require('fs');
1313
var path = require('path');
1414
var app = require('app');
15-
var child_process = require('child_process');
15+
var spawn = require('child_process').spawn;
1616
var debug = require('debug')('scout:electron:scout-server-ctl');
1717

1818
// Where we'll keep the process id.
@@ -67,8 +67,8 @@ var killIfRunning = function(done) {
6767
debug('killing existing pid', pid);
6868
try {
6969
process.kill(pid, 'SIGTERM');
70-
} catch (err) {
71-
if (err.code === 'ESRCH') {
70+
} catch (e) {
71+
if (e.code === 'ESRCH') {
7272
debug('orphaned pid file');
7373
}
7474
}
@@ -92,7 +92,7 @@ module.exports.start = function(done) {
9292
// not! `child_process.exec` has space escape issues
9393
// but not `child_process.spawn`!
9494
debug('spawning: `%s %s`...', process.execPath, BIN);
95-
var server = child_process.spawn(process.execPath, [BIN], {
95+
var server = spawn(process.execPath, [BIN], {
9696
env: {
9797
ATOM_SHELL_INTERNAL_RUN_AS_NODE: '1',
9898
RESOURCES_PATH: process.resourcesPath

src/electron/window-manager.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,22 @@ module.exports.create = function(opts) {
6767
// makes the application a single instance application
6868
// see "app.makeSingleInstance" in https://github.com/atom/electron/blob/master/docs/api/app.md
6969
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
70-
// Someone tried to run a second instance, we should focus our window
70+
debug('Someone tried to run a second instance! We should focus our window', {
71+
commandLine: commandLine,
72+
workingDirectory: workingDirectory
73+
});
7174
if (_window) {
72-
if (_window.isMinimized()) _window.restore();
75+
if (_window.isMinimized()) {
76+
_window.restore();
77+
}
7378
_window.focus();
7479
}
7580
return true;
7681
});
7782

7883
if (shouldQuit) {
7984
app.quit();
80-
return;
85+
return null;
8186
}
8287

8388
_window.loadUrl(opts.url);

src/minicharts/d3-tip.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
/* eslint no-use-before-define: 1, one-var: 1, no-else-return: 1, no-unused-vars: 1, eqeqeq: 1, no-shadow: 1, yoda: 1, consistent-return: 1, one-var: 1 */
12
// d3.tip
23
// Copyright (c) 2013 Justin Palmer
34
//
45
// Tooltips for d3.js SVG visualizations
56

67
(function(root, factory) {
7-
if (typeof define === 'function' && define.amd) {
8-
// AMD. Register as an anonymous module with d3 as a dependency.
9-
define(['d3'], factory);
10-
} else if (typeof module === 'object' && module.exports) {
8+
if (typeof module === 'object' && module.exports) {
119
// CommonJS
1210
module.exports = function(d3) {
1311
d3.tip = factory(d3);
@@ -18,18 +16,17 @@
1816
root.d3.tip = factory(root.d3);
1917
}
2018
}(this, function(d3) {
21-
2219
// Public - contructs a new tooltip
2320
//
2421
// Returns a tip
2522
return function() {
26-
var direction = d3_tip_direction,
27-
offset = d3_tip_offset,
28-
html = d3_tip_html,
29-
node = initNode(),
30-
svg = null,
31-
point = null,
32-
target = null;
23+
var direction = d3_tip_direction;
24+
var offset = d3_tip_offset;
25+
var html = d3_tip_html;
26+
var node = initNode();
27+
var svg = null;
28+
var point = null;
29+
var target = null;
3330

3431
function tip(vis) {
3532
svg = getSVGNode(vis);
@@ -349,5 +346,4 @@
349346

350347
return tip;
351348
};
352-
353349
}));

src/minicharts/d3fns/date.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint no-use-before-define:1 */
12
var d3 = require('d3');
23
var _ = require('lodash');
34
var $ = require('jquery');
@@ -309,7 +310,7 @@ var minicharts_d3fns_date = function() {
309310

310311
raf(function() {
311312
var chartWidth = width / (upperRatio + 1) - upperMargin;
312-
var chart = many()
313+
var manyChart = many()
313314
.width(chartWidth)
314315
.height(upperBarBottom)
315316
.options({
@@ -323,13 +324,13 @@ var minicharts_d3fns_date = function() {
323324
},
324325
view: options.view
325326
});
326-
weekdayContainer.call(chart);
327+
weekdayContainer.call(manyChart);
327328
});
328329

329330
var hourContainer = g.select('g.hour').data([hours]);
330331
raf(function() {
331332
var chartWidth = width / (upperRatio + 1) * upperRatio - upperMargin;
332-
var chart = many()
333+
var manyChart = many()
333334
.width(chartWidth)
334335
.height(upperBarBottom)
335336
.options({
@@ -342,7 +343,7 @@ var minicharts_d3fns_date = function() {
342343
},
343344
view: options.view
344345
});
345-
hourContainer.call(chart);
346+
hourContainer.call(manyChart);
346347
});
347348
});
348349
}

src/minicharts/d3fns/few.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint no-use-before-define:1 */
12
var d3 = require('d3');
23
var _ = require('lodash');
34
var $ = require('jquery');

0 commit comments

Comments
 (0)