Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dd5ab22
test(@mongodb-js/triejs): Disable tests in package
gribnoysup Apr 29, 2021
6309002
test(hadron-style-manager): Ignore metadata generated by tests
gribnoysup Apr 29, 2021
50ab420
test(hadron-react-utils): Compile before running tests; Add base webp…
gribnoysup Apr 29, 2021
324a621
test(hadron-react-components): Compile before running tests; Add base…
gribnoysup Apr 29, 2021
7407de0
test(hadron-react-buttons): Compile before running tests; Add base we…
gribnoysup Apr 29, 2021
9454bfc
test(hadron-react-bson): Compile before running tests; Add base webpa…
gribnoysup Apr 29, 2021
32d8515
test(hadron-plugin-manager): Ease assertion to avoid failing on stack…
gribnoysup Apr 29, 2021
228cb5b
test(hadron-compile-cache): Update babel hashes to match new ones; Re…
gribnoysup Apr 29, 2021
a8f4afc
test(hadron-build): Skip very flaky functional test on darwin
gribnoysup Apr 29, 2021
23bffcb
chore(mongodb-connection-model): Remove directConnection logic from m…
gribnoysup Apr 29, 2021
85091f9
fix(@mongodb-js/compass-aggregations): Make sure that react-dnd uses …
gribnoysup Apr 29, 2021
f581ddd
test(@mongodb-js/compass-connect): Update url to match driver behavior
gribnoysup Apr 29, 2021
6a566f0
chore(@mongodb-js/compass-crud): Add missing peer dep for the driver
gribnoysup Apr 29, 2021
7031bdf
test(@mongodb-js/compass-deployment-awareness): Ease assertion to onl…
gribnoysup Apr 29, 2021
a17c5b6
chore(@mongodb-js/compass-shell): Add missing mocha dep; Fix version …
gribnoysup Apr 29, 2021
0d2dde2
fix(@mongodb-js/compass-query-bar): Update query-parser to latest; Fi…
gribnoysup Apr 29, 2021
f63bd71
test(@mongodb-js/compass-home): Remove real dependencies from home te…
gribnoysup Apr 29, 2021
4a2e30b
test(@mongodb-js/electron-wix-msi): Fix Buffer reference when mocking…
gribnoysup Apr 29, 2021
8a03264
ci(monorepo): Bootstrap all the packages; Remove compass scope
gribnoysup Apr 29, 2021
e9fb9d0
chore(mongodb-explain-compat, storage-mixin): Keep package-log in git…
gribnoysup Apr 29, 2021
7fe9a84
fix(@mongodb-js/compass-import-export): Fix fast-csv import
gribnoysup Apr 29, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-node@v2.1.2
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
node-version: 12.4.0
node-version: ^12.4.0

- name: Install Deps Ubuntu
run: sudo apt-get -y install libkrb5-dev libsecret-1-dev net-tools libstdc++6 gnome-keyring
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"shortcutFolderName": "MongoDB",
"license": "SSPL",
"scripts": {
"check": "lerna run check --stream",
"install": "lerna bootstrap --concurrency=1 --scope mongodb-compass",
"check": "lerna run check --concurrency 1 --stream",
"install": "npm run bootstrap-ci",
"bootstrap-ci": "lerna exec --concurrency 1 --stream -- npm ci",
"start": "lerna run start --stream --scope mongodb-compass",
"release": "cd packages/compass && npm run --silent release --",
"test": "lerna run test --stream --scope mongodb-compass"
"test": "lerna run test --concurrency 1 --stream"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
import React, { Component } from 'react';
import { DndProvider } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import createHTML5Backend from 'react-dnd-html5-backend';
import PropTypes from 'prop-types';
import CustomDragLayer from './custom-drag-layer';
import SortableStageContainer from './sortable-stage-container';

// A replacement for default react-dnd global context selection strategy that
// makes sure that we prioritize `window` as a global context instead of
// `global` specifically to make sure that jsdom environments are working
function getGlobalContext() {
if (typeof window !== 'undefined') {
return window;
} else if (typeof global !== 'undefined') {
return global;
}
return null;
}

function createBackend(manager) {
return createHTML5Backend(manager, getGlobalContext());
}

class SortableStageList extends Component {
static propTypes = {
items: PropTypes.array.isRequired,
Expand All @@ -20,7 +36,7 @@ class SortableStageList extends Component {
} = this.props;

return (
<DndProvider backend={HTML5Backend}>
<DndProvider backend={createBackend}>
<CustomDragLayer />
{items.map((item, i) => (
<SortableStageContainer
Expand Down
28 changes: 18 additions & 10 deletions packages/compass-connect/test/renderer/stores/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1052,12 +1052,16 @@ describe('Store', () => {

it('sets the driverUrl', (done) => {
const driverUrl =
'mongodb://server.example.com:27017/?readPreference=primary&ssl=false';
'mongodb://server.example.com:27017/?readPreference=primary&directConnection=true&ssl=false';
const unsubscribe = Store.listen((state) => {
unsubscribe();
expect(state.connectionModel).to.exist;
expect(state.connectionModel.driverUrl).to.equal(driverUrl);
done();
try {
unsubscribe();
expect(state.connectionModel).to.exist;
expect(state.connectionModel.driverUrl).to.equal(driverUrl);
done();
} catch (e) {
done(e);
}
});

Actions.onChangeViewClicked('connectionForm');
Expand Down Expand Up @@ -2181,11 +2185,15 @@ describe('Store', () => {

it('updates customUrl with a safe value', (done) => {
const unsubscribe = Store.listen((state) => {
unsubscribe();
expect(state.customUrl).to.equal(
'mongodb://user:*****@localhost:27018/?authSource=admin&readPreference=primary&ssl=false'
);
done();
try {
unsubscribe();
expect(state.customUrl).to.match(
/^mongodb:\/\/user:\*\*\*\*\*@localhost:27018/
);
done();
} catch (e) {
done(e);
}
});

Actions.onSaveFavoriteClicked();
Expand Down
58 changes: 49 additions & 9 deletions packages/compass-crud/package-lock.json

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

1 change: 1 addition & 0 deletions packages/compass-crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"mongodb-ace-autocompleter": "^0.4.12",
"mongodb-ace-mode": "^0.4.0",
"mongodb-ace-theme-query": "0.0.2",
"mongodb-client-encryption": "^1.2.3",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit surprising – the driver should not require this to be present unless we’re actually doing anything with FLE … are we?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah, no, I don't think so... Let me double-check that I actually got the reason for this right in the first place

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, so seems it's a breaking* change introduced in driver here https://github.com/mongodb/node-mongodb-native/pull/2760/files#diff-c088451b2b6c514ba0f163c7c00dfae50dc86c534feeffe18cf618749af66da0R15

* - breaking only for webpack because it tries to bundle mongodb-client-encryption and because this time it's a top level import it throws instead of warning as it does with v3.6.3

"mongodb-connection-model": "^16.1.6",
"mongodb-data-service": "^19.2.0",
"mongodb-ns": "^2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('<OptionWriteSelector />', () => {

it('renders the button label', () => {
const button = component.find('#test-id');
expect(button.dive().text()).to.be.equal('test-label<e />');
expect(button.dive().text()).to.match(/^test-label/);
});

it('sets the button as enabled', () => {
Expand Down
Loading