Skip to content
Merged
5 changes: 4 additions & 1 deletion .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ functions:
script: |
set -ev
export PATH="${node_path}:$PATH"
ls -alh ${node_path}
test -n "${add_environment|}" && export ${add_environment|}
${npm|npm} version --json
${npm|npm} config set loglevel error
${npm|npm} config -g list
which -a npm
node -p process.env
${npm|npm} install

# For Windows: retrieve a fake "signtool.exe" which proxies to notary-service,
Expand All @@ -81,7 +84,7 @@ functions:
curl -fs \
-o "signtool.exe" \
--url "https://s3.amazonaws.com/boxes.10gen.com/build/signtool.exe"
rm node_modules/electron-installer-squirrel-windows/vendor/signtool.exe
rm -f node_modules/electron-installer-squirrel-windows/vendor/signtool.exe

# Environment variables set for use by notary-service signtool.exe on Windows:
# NOTARY_URL, NOTARY_AUTH_TOKEN, NOTARY_SIGNING_KEY, NOTARY_SIGNING_COMMENT
Expand Down
20 changes: 20 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ var del = require('del');
var sequence = require('run-sequence');
var watch = require('gulp-watch');
var notify = require('./tasks/notify');
var format = require('util').format;
var pkg = require('./package.json');

var which = require('which');
console.log('which npm?', which.sync('npm', {all: true}));

// Platform specific tasks
var platform = require(path.join(__dirname, 'tasks', process.platform));

Expand Down Expand Up @@ -63,6 +67,7 @@ gulp.task('build', function(done) {
'copy:package.json'
],
'npm:install',
'electron-rebuild',
'build:js'
, done);
});
Expand Down Expand Up @@ -258,3 +263,18 @@ gulp.task('npm:install', shell.task('npm install --production --quiet --loglevel
gulp.task('clean', function(done) {
del(['build/', 'dist/', 'node_modules/'], done);
});


/**
* @note (imlucas): When our electron updates to node@5.x, we'll need to update
* the `--node-module-version` used here to `47`.
* You're very welcome, @futurelucas.
*/
gulp.task('electron-rebuild',
shell.task(format([
'electron-rebuild',
'--version %s',
'--node-module-version 46',
'--module-dir ./build/node_modules',
'--which-module keytar'
].join(' '), pkg.electron_version)));
44 changes: 23 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"release": "gulp release",
"test": "mocha",
"ci": "npm run check && npm test && npm run release",
"check": "mongodb-js-precommit ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js",
"check": "mongodb-js-precommit --debug ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js",
"fmt": "mongodb-js-fmt ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} tasks/*.js"
},
"pre-commit": [
Expand All @@ -74,23 +74,6 @@
"url": "git://github.com/10gen/scout.git"
},
"dependencies": {
"debug": "^2.2.0",
"electron-squirrel-startup": "^0.1.4",
"highlight.js": "^8.9.1",
"kerberos": "0.0.17",
"keytar": "mongodb-js/node-keytar",
"localforage": "^1.3.0",
"marky-mark": "^1.2.1",
"mongodb-collection-model": "^0.1.1",
"mongodb-connection-model": "^3.0.7",
"mongodb-instance-model": "^1.0.2",
"mongodb-js-metrics": "^0.2.2",
"mongodb-ns": "^1.0.1",
"ms": "^0.7.1",
"node-notifier": "^4.3.1",
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.4.6/scout-server-0.4.6.tar.gz"
},
"devDependencies": {
"ampersand-app": "^1.0.4",
"ampersand-collection": "^1.5.0",
"ampersand-collection-filterable": "^0.2.1",
Expand All @@ -111,14 +94,34 @@
"async": "^1.5.0",
"backoff": "^2.4.1",
"bootstrap": "https://github.com/twbs/bootstrap/archive/v3.3.5.tar.gz",
"debug": "^2.2.0",
"electron-squirrel-startup": "^0.1.4",
"highlight.js": "^8.9.1",
"kerberos": "0.0.17",
"keytar": "mongodb-js/node-keytar#compass-production",
"localforage": "^1.3.0",
"marky-mark": "^1.2.1",
"mongodb-collection-model": "^0.1.1",
"mongodb-connection-model": "^3.0.7",
"mongodb-instance-model": "^1.0.2",
"mongodb-js-metrics": "^0.2.2",
"mongodb-ns": "^1.0.1",
"ms": "^0.7.1",
"mongodb-language-model": "^0.3.3",
"mongodb-schema": "^3.3.1",
"node-notifier": "^4.3.1",
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.4.6/scout-server-0.4.6.tar.gz"
},
"devDependencies": {
"browserify": "^12.0.1",
"chalk": "^1.1.1",
"d3": "^3.5.6",
"del": "^2.0.2",
"domready": "^1.0.8",
"electron-installer-dmg": "^0.1.0",
"electron-installer-squirrel-windows": "^0.4.0",
"electron-installer-squirrel-windows": "^1.0.0",
"electron-packager": "^5.1.1",
"electron-rebuild": "^1.0.2",
"eslint": "^1.9.0",
"eslint-config-mongodb-js": "^1.0.6",
"event-stream": "^3.3.2",
Expand All @@ -144,10 +147,9 @@
"mongodb-extended-json": "^1.5.3",
"mongodb-js-fmt": "^0.0.3",
"mongodb-js-precommit": "^0.2.8",
"mongodb-language-model": "^0.3.3",
"mongodb-schema": "^3.3.1",
"mousetrap": "^1.5.3",
"node-notifier": "^4.3.1",
"npm": "^3.4.0",
"numeral": "^1.5.3",
"octicons": "https://github.com/github/octicons/archive/v3.1.0.tar.gz",
"pluralize": "^1.2.1",
Expand Down
40 changes: 24 additions & 16 deletions src/minicharts/d3fns/coordinates.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,23 @@ var minicharts_d3fns_coordinates = function() {

xScale
.domain([
d3.min(data, function(d) { return d[0]; }) - 3,
d3.max(data, function(d) { return d[0]; }) + 3
d3.min(data, function(d) {
return d[0];
}) - 3,
d3.max(data, function(d) {
return d[0];
}) + 3
])
.range([0, innerWidth]);

yScale
.domain([
d3.min(data, function(d) { return d[1]; }) - 3,
d3.max(data, function(d) { return d[1]; }) + 3
d3.min(data, function(d) {
return d[1];
}) - 3,
d3.max(data, function(d) {
return d[1];
}) + 3
])
.range([innerHeight, 0]);

Expand All @@ -82,26 +90,26 @@ var minicharts_d3fns_coordinates = function() {
.attr('class', 'x axis')
.attr('transform', 'translate(0, ' + innerHeight + ')')
.append('text')
// .attr('class', 'label')
.attr('x', innerWidth)
.attr('y', -6)
.style('text-anchor', 'end')
.text('lng');
// .attr('class', 'label')
.attr('x', innerWidth)
.attr('y', -6)
.style('text-anchor', 'end')
.text('lng');
x.call(xAxis);

var y = g.selectAll('.y.axis').data([null]);
y.enter().append('g')
.attr('class', 'y axis')
.append('text')
// .attr('class', 'label')
.attr('transform', 'rotate(-90)')
.attr('y', 6)
.attr('dy', '.71em')
.style('text-anchor', 'end')
.text('lat');
// .attr('class', 'label')
.attr('transform', 'rotate(-90)')
.attr('y', 6)
.attr('dy', '.71em')
.style('text-anchor', 'end')
.text('lat');
y.call(yAxis);

// select all g.bar elements
// select all g.bar elements
var circle = g.selectAll('circle.circle')
.data(data);

Expand Down
2 changes: 1 addition & 1 deletion src/minicharts/d3fns/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ var minicharts_d3fns_date = function() {
.on('mousedown', handleMouseDown);

// disabling direct onClick handler in favor of click-drag
// .on('click', handleClick);
// .on('click', handleClick);

lines
.attr('y1', barcodeTop)
Expand Down
2 changes: 1 addition & 1 deletion src/minicharts/d3fns/few.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var minicharts_d3fns_few = function() {
.attr('class', 'd3-tip')
.direction('n')
.offset([-9, 0]);
// --- end chart setup ---
// --- end chart setup ---

function handleClick(d) {
if (!options.view) {
Expand Down
35 changes: 21 additions & 14 deletions src/minicharts/d3fns/geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var minicharts_d3fns_geo = function() {
buttons: ['OK']
});

// @todo thomasr/imlucas: add call to metrics.error here with errror code
// @todo thomasr/imlucas: add call to metrics.error here with errror code
};

var script = document.createElement('script');
Expand Down Expand Up @@ -152,14 +152,18 @@ var minicharts_d3fns_geo = function() {
function onKeyDown() {
if (d3.event.keyCode === SHIFTKEY) {
// disable dragging while shift is pressed
googleMap.setOptions({ draggable: false });
googleMap.setOptions({
draggable: false
});
}
}

function onKeyUp() {
if (d3.event.keyCode === SHIFTKEY) {
// disable dragging while shift is pressed
googleMap.setOptions({ draggable: true });
googleMap.setOptions({
draggable: true
});
}
}

Expand Down Expand Up @@ -334,25 +338,25 @@ var minicharts_d3fns_geo = function() {
};

var marker = layer.selectAll('svg.marker')
.data(data)
.each(transform) // update existing markers
.data(data)
.each(transform) // update existing markers
.enter().append('svg:svg')
.each(transform)
.attr('class', 'marker');
.each(transform)
.attr('class', 'marker');

// Add a circle
marker.append('circle')
.attr('r', 4.5)
.attr('cx', padding)
.attr('cy', padding);
.attr('r', 4.5)
.attr('cx', padding)
.attr('cy', padding);
}; // end overlay.draw

overlay.setMap(googleMap);
innerDiv.on('mousedown', startSelection);

d3.select('body')
.on('keydown', onKeyDown)
.on('keyup', onKeyUp);
.on('keydown', onKeyDown)
.on('keyup', onKeyUp);
} // end if (!googleMap) ...

// var innerWidth = width - margin.left - margin.right;
Expand All @@ -368,11 +372,14 @@ var minicharts_d3fns_geo = function() {
fillColor: '#F68A1E',
fillOpacity: 0.35,
map: googleMap,
center: { lat: 0, lng: 0 },
center: {
lat: 0,
lng: 0
},
radius: 0,
visible: false,
draggable: true
// editable: true
// editable: true
});

selectionCircle.addListener('drag', function() {
Expand Down
2 changes: 1 addition & 1 deletion src/minicharts/d3fns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = {
date: require('./date'),
string: require('./string'),
objectid: require('./date'),
geo: require('./geo'), // google maps
geo: require('./geo'), // google maps
coordinates: require('./coordinates')
};
2 changes: 1 addition & 1 deletion src/minicharts/d3fns/many.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var minicharts_d3fns_many = function() {
.on('brushstart', brushstart)
.on('brush', brushed)
.on('brushend', brushend);
// --- end chart setup ---
// --- end chart setup ---

function handleClick(d) {
if (!options.view || !options.selectable) {
Expand Down
7 changes: 1 addition & 6 deletions src/tour/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ var TourView = View.extend({
evt.preventDefault();
evt.stopPropagation();
this.tourRemove();
} else if ([
RIGHT_ARROW_KEY,
TAB_KEY,
ENTER_KEY,
SPACE_KEY
].indexOf(evt.keyCode) !== -1) {
} else if ([RIGHT_ARROW_KEY, TAB_KEY, ENTER_KEY, SPACE_KEY].indexOf(evt.keyCode) !== -1) {
this.showNextFeature();
} else if (evt.keyCode === LEFT_ARROW_KEY) {
this.showPreviousFeature();
Expand Down
4 changes: 2 additions & 2 deletions tasks/win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ function addCodesignIdentityIfAvailable(fn) {
if (process.env.SIGNTOOL_PARAMS) {
INSTALLER_CONFIG.sign_with_params = process.env.SIGNTOOL_PARAMS;
console.log(chalk.green.bold(figures.tick),
format(' This build will be signed using signtool.exe `%s`',
INSTALLER_CONFIG.sign_with_params));
format(' This build will be signed using signtool.exe `%s`',
INSTALLER_CONFIG.sign_with_params));
}
fn();
return;
Expand Down