Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion configs/webpack-config-compass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json",
"postcompile": "gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "depcheck",
"check": "npm run lint && npm run depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"reformat": "npm run eslint . -- --fix && npm run prettier -- --write ."
},
Expand Down
3 changes: 2 additions & 1 deletion packages/compass-app-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "compass-scripts check-peer-deps && depcheck",
"check": "npm run lint && npm run depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"test": "mocha",
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
Expand Down
3 changes: 2 additions & 1 deletion packages/compass-connections-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "compass-scripts check-peer-deps && depcheck",
"check": "npm run lint && npm run depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"test": "mocha",
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ describe('ConnectionsNavigationTree', function () {
{
...connections[0],
csfleMode: 'enabled',
},
} as Connection,
connections[1],
connections[2],
];
Expand All @@ -312,7 +312,7 @@ describe('ConnectionsNavigationTree', function () {
{
...connections[0],
csfleMode: 'disabled',
},
} as Connection,
connections[1],
connections[2],
];
Expand All @@ -326,7 +326,7 @@ describe('ConnectionsNavigationTree', function () {
{
...connections[0],
csfleMode: 'unavailable',
},
} as Connection,
connections[1],
connections[2],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function NavigationTree({
onDefaultAction={() => {}}
onItemExpand={onExpandedChange}
onItemAction={() => {}}
getItemActions={() => []}
getItemActions={() => ({ actions: [] })}
getContextMenuGroups={() => []}
width={100}
renderItem={({ item }) => item.name}
__TEST_OVER_SCAN_COUNT={Infinity}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import { getDefaultRelationshipName } from '../../utils';
const titleBtnStyles = css({
marginLeft: 'auto',
maxHeight: 20, // To match accordion line height
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
Copy link
Member Author

Choose a reason for hiding this comment

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

Ah accidentally included this drive by. Fixes
image

});

const emptyRelationshipMessageStyles = css({
Expand Down
3 changes: 2 additions & 1 deletion packages/compass-logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "compass-scripts check-peer-deps && depcheck",
"check": "npm run lint && npm run depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"test": "mocha",
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
Expand Down
3 changes: 2 additions & 1 deletion packages/databases-collections-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "compass-scripts check-peer-deps && depcheck",
"check": "npm run lint && npm run depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"test": "mocha",
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
Expand Down
40 changes: 31 additions & 9 deletions packages/databases-collections-list/src/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import {
PreferencesProvider,
} from 'compass-preferences-model/provider';
import { createSandboxFromDefaultPreferences } from 'compass-preferences-model';
import type { CollectionProps } from 'mongodb-collection-model';
import type { DatabaseProps } from 'mongodb-database-model';

function createDatabase(name) {
function createDatabase(name: string): DatabaseProps {
return {
_id: name,
name: name,
Expand All @@ -35,7 +37,10 @@ function createDatabase(name) {
};
}

function createCollection(name, props: any = {}) {
function createCollection(
name: string,
props: Partial<CollectionProps> = {}
): CollectionProps {
const col = {
_id: name,
name: name,
Expand Down Expand Up @@ -71,6 +76,7 @@ function createCollection(name, props: any = {}) {
free_storage_size: 1000,
index_count: 15,
index_size: 16,
calculated_storage_size: undefined,
...props,
};

Expand All @@ -81,21 +87,24 @@ function createCollection(name, props: any = {}) {
return col;
}

function createTimeSeries(name, props: any = {}) {
function createTimeSeries(
name: string,
props: Partial<CollectionProps> = {}
): CollectionProps {
return {
...createCollection(name, props),
type: 'timeseries' as const,
};
}

const dbs = [
const dbs: DatabaseProps[] = [
createDatabase('foo'),
createDatabase('bar'),
createDatabase('buz'),
createDatabase('bat'),
];

const colls = [
const colls: CollectionProps[] = [
createCollection('foo.foo', { storage_size: 1000, free_storage_size: 1000 }), // 1000
createCollection('bar.bar', { storage_size: 2000, free_storage_size: 500 }), // 1500
createCollection('buz.buz', { storage_size: 3000, free_storage_size: 2000 }), // 1000
Expand All @@ -112,10 +121,16 @@ describe('databases and collections list', function () {

afterEach(cleanup);

const renderDatabasesList = (props) => {
const renderDatabasesList = (
props: Partial<React.ComponentProps<typeof DatabasesList>>
) => {
render(
<PreferencesProvider value={preferences}>
<DatabasesList {...props}></DatabasesList>
<DatabasesList
databases={[]}
onDatabaseClick={() => {}}
{...props}
></DatabasesList>
</PreferencesProvider>
);
};
Expand Down Expand Up @@ -190,10 +205,17 @@ describe('databases and collections list', function () {

afterEach(cleanup);

const renderCollectionsList = (props) => {
const renderCollectionsList = (
props: Partial<React.ComponentProps<typeof CollectionsList>>
) => {
render(
<PreferencesProvider value={preferences}>
<CollectionsList {...props}></CollectionsList>
<CollectionsList
onCollectionClick={() => {}}
namespace="db"
collections={[]}
{...props}
></CollectionsList>
</PreferencesProvider>
);
};
Expand Down
3 changes: 2 additions & 1 deletion packages/explain-plan-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile && compass-scripts check-exports-exist",
"compile": "tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
"eslint": "eslint-compass",
"prettier": "prettier-compass",
"lint": "npm run eslint . && npm run prettier -- --check .",
"depcheck": "compass-scripts check-peer-deps && depcheck",
"check": "npm run lint && npm run depcheck",
"check": "npm run typecheck && npm run lint && npm run depcheck",
"check-ci": "npm run check",
"test": "mocha",
"test-cov": "nyc --compact=false --produce-source-map=false -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
Expand Down
Loading
Loading