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
14 changes: 10 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,31 @@ https://jira.mongodb.org/projects/COMPASS/summary
## Bug Report

#### Current Behavior

<!--- A clear and concise description of the behavior -->

#### Code/Gist

<!--- Any code, gist links, or repo links you have available that would be helpful for debugging -->

#### Expected Behavior/Code

#### Expected behavior/code
<!--- A clear and concise description of what you expected to happen (or code). -->

#### Environment

<!--
- node.js / npm versions: [e.g. node v10.3.0 / npm 6.7.1]
- OS: [e.g. OSX 10.13.4, Windows 10]
-->

- node.js / npm versions:
- OS:
- OS:

#### Possible Solution

<!--- Only if you have suggestions on a fix for the bug -->

#### Additional context/Screenshots
<!--- Add any other context about the problem here. If applicable, add screenshots to help explain. -->>
#### Additional Context/Screenshots

<!--- Add any other context about the problem here. If applicable, add screenshots to help explain. -->
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ https://jira.mongodb.org/projects/COMPASS/summary
## Feature Request

## Detailed Description

<!--- Provide a detailed description of the change or addition you are proposing -->

## Context

<!--- Why is this change important to you? How would you use it? -->

## Possible Implementation
<!--- Optional: suggest an idea for implementing addition or change -->>

<!--- Optional: suggest an idea for implementing addition or change -->
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
name: Bug Report
name: Question
about: Create a report to help us improve
title: Question
---

<!--- Provide a general summary of the issue in the Title above -->

## Question

<!--- Provide your detailed question here -->

## Additional context

<!--- Optional: supply any additional context on what you are trying to do -->
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
"url": "git://github.com/mongodb-js/compass.git"
},
"dependencies": {
"@mongodb-js/compass-aggregations": "^7.1.3",
"@mongodb-js/compass-aggregations": "^7.1.4",
"@mongodb-js/compass-app-stores": "^4.0.2",
"@mongodb-js/compass-auth-kerberos": "^4.0.1",
"@mongodb-js/compass-auth-ldap": "^4.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/app/loading/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ipc.on(CHANGE_STATUS, (evt, meta) => {
});

ipc.on('compass:error:fatal', (evt, meta) => {
// eslint-disable-next-line no-console
console.error(meta.stack);
});

Expand Down
5 changes: 5 additions & 0 deletions src/app/setup-plugin-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ const ILLEGAL_MODULES = ['fs', 'net', 'tls', 'child_process'];

/**
* Prevent loading of fs, net, tls, and child process for 3rd party plugins.
*
* @param {String} request - The request.
* @param {Object} loc - The location.
*
* @returns {Function}
*/
Module._load = function(request, loc) {
if (ILLEGAL_MODULES.includes(request)) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/setup-style-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const setup = (stylesheet, done) => {
try {
const styles = document.createElement(STYLE);
const loc = path.join(DEV_PLUGINS, file, 'lib', 'styles', 'index.css');

// eslint-disable-next-line no-sync
styles.textContent = fs.readFileSync(loc, { encoding: 'utf8' });
document.head.appendChild(styles);
} catch (e) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ const cleanStack = require('clean-stack');
const ensureError = require('ensure-error');

process.on('uncaughtException', err => {
// eslint-disable-next-line no-console
console.error('handling uncaughtException', err);
err = ensureError(err);
const stack = cleanStack(err.stack);

var detail = '${app.getName()} version ${app.getVersion()}\n';
detail += `Stacktrace:\n${stack}`;
const message = `${app.getName()} has encountered an unexpected error`;

// eslint-disable-next-line no-console
console.error(`${message}: ${detail}`);

const btnIndex = dialog.showMessageBox({
Expand Down
2 changes: 1 addition & 1 deletion src/main/window-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function showAboutDialog() {
}

/**
* @param {Object} bw - Current BrowserWindow
* @param {Object} _bw - Current BrowserWindow
* @param {String} message - Message to be set by MessageBox
* @param {String} detail - Details to be shown in MessageBox
*/
Expand Down