Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 4 additions & 74 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/compass-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@
"lodash.find": "^4.6.0",
"lodash.get": "^4.4.2",
"lodash.groupby": "^4.6.0",
"lodash.has": "^4.5.2",
"lodash.includes": "^4.3.0",
"lodash.isequal": "^4.5.0",
"lodash.isstring": "^4.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import has from 'lodash.has';
import includes from 'lodash.includes';
import isString from 'lodash.isstring';
import { hasDistinctValue } from 'mongodb-query-util';
Expand Down Expand Up @@ -36,7 +35,7 @@ class ValueBubble extends Component {
* @return {String} converted value
*/
_extractStringValue(value) {
if (has(value, '_bsontype')) {
if (value && value._bsontype) {
if (includes([ DECIMAL_128, LONG ], value._bsontype)) {
return value.toString();
}
Expand Down
3 changes: 1 addition & 2 deletions packages/compass-schema/src/modules/number.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint camelcase: 0 */
import d3 from 'd3';
import assign from 'lodash.assign';
import has from 'lodash.has';
import includes from 'lodash.includes';
import groupBy from 'lodash.groupby';
import sortBy from 'lodash.sortby';
Expand All @@ -16,7 +15,7 @@ import shared from './shared';
* @return {Number} converted value
*/
function extractNumericValueFromBSON(value) {
if (has(value, '_bsontype')) {
if (value && value._bsontype) {
if (includes([ 'Decimal128', 'Long' ], value._bsontype)) {
return parseFloat(value.toString(), 10);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/compass-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"debug": "^3.0.1",
"depcheck": "^1.4.0",
"electron": "^6.1.12",
"electron-devtools-installer": "^3.1.1",
"electron-devtools-installer": "^3.2.0",
"electron-rebuild": "^2.3.5",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@
"cli-ux": "^5.5.1",
"cross-env": "^7.0.3",
"depcheck": "^1.4.0",
"devtron": "^1.4.0",
"download": "^8.0.0",
"electron": "^6.1.12",
"electron-devtools-installer": "^3.2.0",
"electron-mocha": "^8.2.2",
"electron-rebuild": "^2.3.5",
"enzyme": "^3.11.0",
Expand Down
25 changes: 16 additions & 9 deletions packages/compass/src/main/window-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,21 @@ app.on('ready', function() {
// install development tools (devtron, react tools) if in development mode
if (process.env.NODE_ENV === 'development') {
debug('Activating Compass specific devtools...');
require('devtron').install();
}
const {
default: installDevtools,
REACT_DEVELOPER_TOOLS,
} = require('electron-devtools-installer');

/**
* When electron's main renderer has completed setup,
* we'll always show the [connect][./src/connect] dialog
* on start which is responsible for retaining it's own
* state between application launches.
*/
showConnectWindow();
installDevtools(REACT_DEVELOPER_TOOLS).finally(() => {
showConnectWindow();
});
} else {
/**
* When electron's main renderer has completed setup,
* we'll always show the [connect][./src/connect] dialog
* on start which is responsible for retaining it's own
* state between application launches.
*/
showConnectWindow();
}
});