Skip to content

Commit 071babd

Browse files
committed
Merge pull request #219 from 10gen/keytar-prebuild-windows
🏁 prebuilt keytar
2 parents da72d65 + 28c1110 commit 071babd

File tree

12 files changed

+59
-47
lines changed

12 files changed

+59
-47
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build/**
2+
dist/**
3+
src/minicharts/d3-tip.js

.evergreen.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ functions:
6363
script: |
6464
set -ev
6565
export PATH="${node_path}:$PATH"
66-
${node|node} --version
67-
${npm|npm} --version
66+
test -n "${add_environment|}" && export ${add_environment|}
67+
${npm|npm} version --json
6868
${npm|npm} config set loglevel error
69-
${npm|npm} config -g list -l
70-
${npm|npm} install
69+
${npm|npm} config -g list
7170
${npm|npm} install
7271
7372
# For Windows: retrieve a fake "signtool.exe" which proxies to notary-service,
@@ -104,7 +103,6 @@ functions:
104103
export SIGNTOOL_PARAMS="yes"
105104
test -n "${add_environment|}" && export ${add_environment|}
106105
${npm|npm} run ci
107-
${npm|npm} run test
108106
109107
"save release":
110108
command: s3.put
@@ -191,6 +189,7 @@ buildvariants:
191189
installer_content_type: "application/octet-stream"
192190
installer_filename: "MongoDBCompassSetup.exe"
193191
num_cores: $(grep -c ^processor /proc/cpuinfo)
192+
add_environment: APPDATA=C:\\Users\\Administrator\\
194193
tasks:
195194
*all_tasks
196195

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ gulp.task('watch', function() {
126126
/**
127127
* Use browserify to compile the UI js.
128128
*/
129+
var jadeify = require('jadeify');
129130
gulp.task('build:js', function() {
130-
var bundler = browserify(pkg.browserify).transform('jadeify');
131+
var bundler = browserify(pkg.browserify).transform(jadeify);
131132
if (process.env.NODE_ENV === 'production') {
132133
return bundler.bundle()
133134
.on('error', notify('js'))

package.json

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,28 @@
1515
},
1616
"dependency-check": {
1717
"entries": [
18-
"./src/index.js"
18+
"./src/index.js",
19+
"./gulpfile.js",
20+
"./tasks/darwin.js",
21+
"./tasks/win32.js",
22+
"./tasks/linux.js"
1923
],
2024
"ignore": [
21-
"app",
22-
"auto-updater",
23-
"bootstrap",
24-
"browser-window",
25+
"app",
26+
"auto-updater",
27+
"bootstrap",
28+
"browser-window",
2529
"clipboard",
26-
"crash-reporter",
27-
"dialog",
28-
"electron-squirrel-startup",
29-
"font-awesome",
30-
"glob",
31-
"ipc",
32-
"jade",
33-
"keytar",
34-
"menu",
35-
"octicons",
30+
"crash-reporter",
31+
"dialog",
32+
"electron-squirrel-startup",
33+
"font-awesome",
34+
"glob",
35+
"ipc",
36+
"jade",
37+
"keytar",
38+
"menu",
39+
"octicons",
3640
"scout-server"
3741
]
3842
},
@@ -58,7 +62,7 @@
5862
"start": "gulp dev",
5963
"release": "gulp release",
6064
"test": "mocha",
61-
"ci": "npm run check && npm run release",
65+
"ci": "npm run check && npm test && npm run release",
6266
"check": "mongodb-js-precommit ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js",
6367
"fmt": "mongodb-js-fmt ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js"
6468
},
@@ -72,13 +76,13 @@
7276
"dependencies": {
7377
"debug": "^2.2.0",
7478
"electron-squirrel-startup": "^0.1.4",
75-
"keytar": "^3.0.0",
79+
"keytar": "mongodb-js/node-keytar",
7680
"localforage": "^1.3.0",
7781
"mongodb-collection-model": "^0.1.1",
7882
"mongodb-connection-model": "^3.0.7",
7983
"mongodb-instance-model": "^1.0.2",
80-
"mongodb-ns": "^1.0.1",
8184
"mongodb-js-metrics": "^0.2.2",
85+
"mongodb-ns": "^1.0.1",
8286
"ms": "^0.7.1",
8387
"node-notifier": "^4.3.1",
8488
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.4.6/scout-server-0.4.6.tar.gz"
@@ -113,7 +117,7 @@
113117
"electron-installer-squirrel-windows": "^0.4.0",
114118
"electron-packager": "^5.1.1",
115119
"eslint": "^1.9.0",
116-
"eslint-config-mongodb-js": "^1.0.5",
120+
"eslint-config-mongodb-js": "^1.0.6",
117121
"event-stream": "^3.3.2",
118122
"figures": "^1.4.0",
119123
"font-awesome": "https://github.com/FortAwesome/Font-Awesome/archive/v4.4.0.tar.gz",
@@ -136,7 +140,7 @@
136140
"moment": "^2.10.6",
137141
"mongodb-extended-json": "^1.5.3",
138142
"mongodb-js-fmt": "^0.0.3",
139-
"mongodb-js-precommit": "^0.2.4",
143+
"mongodb-js-precommit": "^0.2.8",
140144
"mongodb-language-model": "^0.3.3",
141145
"mongodb-schema": "^3.3.1",
142146
"mousetrap": "^1.5.3",
@@ -155,6 +159,7 @@
155159
"vinyl-buffer": "^1.0.0",
156160
"vinyl-source-stream": "^1.1.0",
157161
"watchify": "^3.6.0",
162+
"which": "^1.2.0",
158163
"xor-it": "^1.0.1"
159164
}
160165
}

src/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ var Application = View.extend({
237237
});
238238

239239
var params = qs.parse(window.location.search.replace('?', ''));
240-
var connection_id = params.connection_id;
240+
var connectionId = params.connection_id;
241241
var state = new Application({
242-
connection_id: connection_id
242+
connection_id: connectionId
243243
});
244244

245245
/**
@@ -296,7 +296,7 @@ app.extend({
296296
domReady(function() {
297297
state.render();
298298

299-
if (!connection_id) {
299+
if (!connectionId) {
300300
// Not serving a part of the app which uses the client,
301301
// so we can just start everything up now.
302302
state.startRouter();
@@ -306,10 +306,10 @@ app.extend({
306306
app.statusbar.show('Retrieving connection details...');
307307

308308
state.connection = new Connection({
309-
_id: connection_id
309+
_id: connectionId
310310
});
311311

312-
debug('looking up connection `%s`...', connection_id);
312+
debug('looking up connection `%s`...', connectionId);
313313
getConnection(state.connection, function(err) {
314314
if (err) {
315315
state.onFatalError('fetch connection', err);

src/models/scout-client-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = {
3030
if (err) {
3131
return options.error({}, 'error', err.message);
3232
}
33-
raf(function call_scout_client_success() {
33+
raf(function onScoutClientSuccess() {
3434
options.success(res, 'success', res);
3535
});
3636
};

src/models/selectable-collection-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
if (model.selected) {
6262
return false;
6363
}
64-
raf(function selectable_mark_selected() {
64+
raf(function selectableMarkModelSelected() {
6565
var current = this.selected;
6666
if (current) {
6767
current.selected = false;

src/models/sync/keychain.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@ var inherits = require('util').inherits;
55
var _ = require('lodash');
66
var Base = require('./base');
77

8-
var keytar;
9-
10-
try {
11-
keytar = window.require('keytar');
12-
} catch (e) {
13-
debug('keytar unavailable! passwords will not be stored!');
14-
}
15-
8+
var keytar = window.require('keytar');
169
/**
1710
* Securely get, add, replace, and delete passwords via the OS keychain
1811
* using GitHub's [keytar](http://npm.im/keytar). The OS keychains are:

src/models/user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ var User = Model.extend({
1212
created_at: 'date',
1313
avatar_url: 'string',
1414
company_name: 'string'
15-
// github_username: 'string',
16-
/**
17-
* `public_repos + public_gists + followers + following`
18-
*/
19-
// github_score: 'number',
20-
// github_last_activity_at: 'date'
15+
// github_username: 'string',
16+
/**
17+
* `public_repos + public_gists + followers + following`
18+
*/
19+
// github_score: 'number',
20+
// github_last_activity_at: 'date'
2121
},
2222
sync: sync.exec.bind(sync)
2323
});

tasks/linux.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint no-console:0 */
12
var path = require('path');
23
var pkg = require(path.resolve(__dirname, '../package.json'));
34
var fs = require('fs');

0 commit comments

Comments
 (0)