Skip to content

Commit 4cf633a

Browse files
committed
rename prop
1 parent 9e31ef5 commit 4cf633a

File tree

20 files changed

+115
-111
lines changed

20 files changed

+115
-111
lines changed

packages/collection-model/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ interface CollectionProps {
8282
sourceName: string | null;
8383
source: Collection;
8484
properties: { id: string; options?: Record<string, unknown> }[];
85-
is_non_existant: boolean;
85+
is_non_existent: boolean;
8686
}
8787

8888
type CollectionDataService = Pick<DataService, 'collectionStats' | 'collectionInfo' | 'listCollections' | 'isListSearchIndexesSupported'>;

packages/collection-model/lib/model.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ function pickCollectionInfo({
102102
validation,
103103
clustered,
104104
fle2,
105-
is_non_existant,
105+
is_non_existent,
106106
}) {
107-
return { type, readonly, view_on, collation, pipeline, validation, clustered, fle2, is_non_existant };
107+
return { type, readonly, view_on, collation, pipeline, validation, clustered, fle2, is_non_existent };
108108
}
109109

110110
/**
@@ -125,7 +125,7 @@ const CollectionModel = AmpersandModel.extend(debounceActions(['fetch']), {
125125
statusError: { type: 'string', default: null },
126126

127127
// Normalized values from collectionInfo command
128-
is_non_existant: 'boolean',
128+
is_non_existent: 'boolean',
129129
readonly: 'boolean',
130130
clustered: 'boolean',
131131
fle2: 'boolean',

packages/compass-connections-navigation/src/navigation-item-icon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const IconWithTooltip = ({
3535

3636
export const NavigationItemIcon = ({ item }: { item: SidebarTreeItem }) => {
3737
if (item.type === 'database') {
38-
if (item.isNonExistant) {
38+
if (item.isNonExistent) {
3939
return (
4040
<IconWithTooltip
4141
text={NON_EXISTANT_NAMESPACE_TEXT}
@@ -46,7 +46,7 @@ export const NavigationItemIcon = ({ item }: { item: SidebarTreeItem }) => {
4646
return <Icon glyph="Database" />;
4747
}
4848
if (item.type === 'collection') {
49-
if (item.isNonExistant) {
49+
if (item.isNonExistent) {
5050
return (
5151
<IconWithTooltip
5252
text={NON_EXISTANT_NAMESPACE_TEXT}

packages/compass-connections-navigation/src/styled-navigation-item.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ export default function StyledNavigationItem({
3434
const style: AcceptedStyles = {};
3535
const isDisconnectedConnection =
3636
item.type === 'connection' && item.connectionStatus !== 'connected';
37-
const isNonExistantNamespace =
37+
const isNonExistentNamespace =
3838
(item.type === 'database' || item.type === 'collection') &&
39-
item.isNonExistant;
39+
item.isNonExistent;
4040

4141
if (colorCode && colorCode !== DefaultColorCode) {
4242
style['--item-bg-color'] = connectionColorToHex(colorCode);
4343
style['--item-bg-color-hover'] = connectionColorToHexActive(colorCode);
4444
style['--item-bg-color-active'] = connectionColorToHexActive(colorCode);
4545
}
4646

47-
if (isDisconnectedConnection || isNonExistantNamespace) {
47+
if (isDisconnectedConnection || isNonExistentNamespace) {
4848
style['--item-color'] = inactiveColor;
4949
}
5050

5151
// For a non-existent namespace, even if its active, we show it as inactive
52-
if (isNonExistantNamespace) {
52+
if (isNonExistentNamespace) {
5353
style['--item-color-active'] = inactiveColor;
5454
}
5555
return style;

packages/compass-connections-navigation/src/tree-data.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export type Database = {
5454
collectionsStatus: DatabaseOrCollectionStatus;
5555
collectionsLength: number;
5656
collections: Collection[];
57-
isNonExistant: boolean;
57+
isNonExistent: boolean;
5858
};
5959

6060
type PlaceholderTreeItem = VirtualPlaceholderItem & {
@@ -68,7 +68,7 @@ export type Collection = {
6868
type: 'view' | 'collection' | 'timeseries';
6969
sourceName: string | null;
7070
pipeline: unknown[];
71-
isNonExistant: boolean;
71+
isNonExistent: boolean;
7272
};
7373

7474
export type NotConnectedConnectionTreeItem = VirtualTreeItem & {
@@ -102,7 +102,7 @@ export type DatabaseTreeItem = VirtualTreeItem & {
102102
connectionId: string;
103103
dbName: string;
104104
hasWriteActionsDisabled: boolean;
105-
isNonExistant: boolean;
105+
isNonExistent: boolean;
106106
};
107107

108108
export type CollectionTreeItem = VirtualTreeItem & {
@@ -113,7 +113,7 @@ export type CollectionTreeItem = VirtualTreeItem & {
113113
connectionId: string;
114114
namespace: string;
115115
hasWriteActionsDisabled: boolean;
116-
isNonExistant: boolean;
116+
isNonExistent: boolean;
117117
};
118118

119119
export type SidebarActionableItem =
@@ -249,7 +249,7 @@ const databaseToItems = ({
249249
collections,
250250
collectionsLength,
251251
collectionsStatus,
252-
isNonExistant,
252+
isNonExistent,
253253
},
254254
connectionId,
255255
expandedItems = {},
@@ -282,7 +282,7 @@ const databaseToItems = ({
282282
dbName: id,
283283
isExpandable: true,
284284
hasWriteActionsDisabled,
285-
isNonExistant,
285+
isNonExistent,
286286
};
287287

288288
const sidebarData: SidebarTreeItem[] = [databaseTI];
@@ -311,7 +311,7 @@ const databaseToItems = ({
311311

312312
return sidebarData.concat(
313313
collections.map(
314-
({ _id: id, name, type, isNonExistant }, collectionIndex) => ({
314+
({ _id: id, name, type, isNonExistent }, collectionIndex) => ({
315315
id: `${connectionId}.${id}`, // id is the namespace of the collection, so includes db as well
316316
level: level + 1,
317317
name,
@@ -323,7 +323,7 @@ const databaseToItems = ({
323323
namespace: id,
324324
hasWriteActionsDisabled,
325325
isExpandable: false,
326-
isNonExistant,
326+
isNonExistent,
327327
})
328328
)
329329
);

packages/compass-sidebar/src/components/use-filtered-connections.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ const sidebarConnections: SidebarConnection[] = [
5151
type: 'collection',
5252
sourceName: '',
5353
pipeline: [],
54-
isNonExistant: false,
54+
isNonExistent: false,
5555
},
5656
],
5757
collectionsLength: 1,
5858
collectionsStatus: 'ready',
59-
isNonExistant: false,
59+
isNonExistent: false,
6060
},
6161
{
6262
_id: 'db_ready_1_2',
@@ -68,12 +68,12 @@ const sidebarConnections: SidebarConnection[] = [
6868
type: 'collection',
6969
sourceName: '',
7070
pipeline: [],
71-
isNonExistant: false,
71+
isNonExistent: false,
7272
},
7373
],
7474
collectionsLength: 1,
7575
collectionsStatus: 'ready',
76-
isNonExistant: false,
76+
isNonExistent: false,
7777
},
7878
],
7979
databasesStatus: 'ready',
@@ -100,20 +100,20 @@ const sidebarConnections: SidebarConnection[] = [
100100
type: 'collection',
101101
sourceName: '',
102102
pipeline: [],
103-
isNonExistant: false,
103+
isNonExistent: false,
104104
},
105105
{
106106
_id: 'coll_ready_2_2',
107107
name: 'coll_ready_2_2',
108108
type: 'collection',
109109
sourceName: '',
110110
pipeline: [],
111-
isNonExistant: false,
111+
isNonExistent: false,
112112
},
113113
],
114114
collectionsLength: 1,
115115
collectionsStatus: 'ready',
116-
isNonExistant: false,
116+
isNonExistent: false,
117117
},
118118
],
119119
databasesStatus: 'ready',

packages/compass-sidebar/src/modules/databases.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ function createDatabases(dbs: any[] = []) {
1313
collections: db.collections.toJSON(),
1414
};
1515
});
16-
return data.map(({ is_non_existant, collections, ...rest }) => ({
16+
return data.map(({ is_non_existent, collections, ...rest }) => ({
1717
...rest,
18-
isNonExistant: is_non_existant,
19-
collections: collections.map(({ is_non_existant, ...coll }) => ({
18+
isNonExistent: is_non_existent,
19+
collections: collections.map(({ is_non_existent, ...coll }) => ({
2020
...coll,
21-
isNonExistant: is_non_existant,
21+
isNonExistent: is_non_existent,
2222
})),
2323
}));
2424
}

packages/compass-sidebar/src/modules/databases.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ export type Database = Pick<
4545
InstanceDatabase,
4646
'_id' | 'name' | 'collectionsStatus' | 'collectionsLength'
4747
> & {
48-
isNonExistant: boolean;
48+
isNonExistent: boolean;
4949
collections: Array<
5050
Pick<
5151
InstanceDatabase['collections'][number],
5252
'_id' | 'name' | 'type' | 'sourceName' | 'pipeline'
5353
> & {
54-
isNonExistant: boolean;
54+
isNonExistent: boolean;
5555
}
5656
>;
5757
};

packages/compass-sidebar/src/modules/instance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const setupInstance =
132132
name: db.name,
133133
collectionsStatus: db.collectionsStatus,
134134
collectionsLength: db.collectionsLength,
135-
isNonExistant: db.is_non_existant,
135+
isNonExistent: db.is_non_existent,
136136
};
137137
}
138138

@@ -143,7 +143,7 @@ export const setupInstance =
143143
type: coll.type,
144144
sourceName: coll.sourceName,
145145
pipeline: coll.pipeline,
146-
isNonExistant: coll.is_non_existant,
146+
isNonExistent: coll.is_non_existent,
147147
};
148148
}
149149

packages/compass-sidebar/test/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export function createInstance(
1616
databases: dbs.map((db) => {
1717
return {
1818
_id: db._id,
19-
is_non_existant: false,
19+
is_non_existent: false,
2020
collections: (db.collections || []).map((coll) => {
2121
return {
2222
_id: `${db._id}.${coll}`,
23-
is_non_existant: false,
23+
is_non_existent: false,
2424
};
2525
}),
2626
};

0 commit comments

Comments
 (0)