Skip to content

Commit c5fe3e3

Browse files
authored
chore(compass-assistant): bump lg-chat packages, prettier and apply patches (#7246)
Updates the current lg-chat packages and adds some new style patches that we are going to upstream to Leafygreen to fix both large heading and list issues. This also includes a prettier bump.
1 parent 0a4001f commit c5fe3e3

File tree

45 files changed

+1443
-1374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1443
-1374
lines changed

package-lock.json

Lines changed: 1299 additions & 1292 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/group/group-with-statistics.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type { RootState } from '../../../../modules';
2020
import type { WizardComponentProps } from '..';
2121
import { FieldCombobox } from '../field-combobox';
2222

23-
type Accumulator = typeof ACCUMULATORS[number];
23+
type Accumulator = (typeof ACCUMULATORS)[number];
2424

2525
const ACCUMULATOR_LABELS = {
2626
$avg: 'Average',

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/group/group-with-subset.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import type { RootState } from '../../../../modules';
2121
import type { WizardComponentProps } from '..';
2222
import { FieldCombobox } from '../field-combobox';
2323

24-
type Accumulator = typeof ACCUMULATORS[number];
24+
type Accumulator = (typeof ACCUMULATORS)[number];
2525

2626
const SUBSET_ACCUMULATORS = {
2727
$first: {
@@ -54,7 +54,7 @@ const N_OPERATORS = Object.values(SUBSET_ACCUMULATORS).map(
5454
(acc) => acc.nOperator
5555
);
5656

57-
function isGroupNOperator(k: string): k is typeof N_OPERATORS[number] {
57+
function isGroupNOperator(k: string): k is (typeof N_OPERATORS)[number] {
5858
return N_OPERATORS.includes(k as any);
5959
}
6060

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/match/match-condition-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const MATCH_OPERATOR_LABELS = [
103103
},
104104
] as const;
105105

106-
export type MatchOperator = typeof MATCH_OPERATOR_LABELS[number]['operator'];
106+
export type MatchOperator = (typeof MATCH_OPERATOR_LABELS)[number]['operator'];
107107

108108
// Components - Condition
109109
const conditionContainerStyles = css({

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/sort/sort.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import type { WizardComponentProps } from '..';
1717
import { FieldCombobox } from '../field-combobox';
1818

19-
type SortDirection = typeof SORT_DIRECTION_OPTIONS[number]['value'];
19+
type SortDirection = (typeof SORT_DIRECTION_OPTIONS)[number]['value'];
2020
type SortFieldState = {
2121
id: number;
2222
field: string;

packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const SORT_DIRECTION_OPTIONS = [
2828
},
2929
] as const;
3030

31-
export type SortDirection = typeof SORT_DIRECTION_OPTIONS[number]['value'];
31+
export type SortDirection = (typeof SORT_DIRECTION_OPTIONS)[number]['value'];
3232

3333
export const mapSortDataToStageValue = (
3434
data: {

packages/compass-aggregations/src/modules/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ON_PREM, type ENVS } from '@mongodb-js/mongodb-constants';
22

3-
export type ServerEnvironment = typeof ENVS[number];
3+
export type ServerEnvironment = (typeof ENVS)[number];
44

55
export const INITIAL_STATE: ServerEnvironment = ON_PREM;
66

packages/compass-aggregations/src/stores/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export type ConfigureStoreOptions = CollectionTabPluginMetadata &
5252
* Current connection env type. Affects available stages. Accepted values:
5353
* "atlas" | "on-prem" | "adl"
5454
*/
55-
env: typeof ENVS[number] | null;
55+
env: (typeof ENVS)[number] | null;
5656
/**
5757
* Namespace field values that will be used in autocomplete
5858
*/
@@ -148,7 +148,7 @@ export function activateAggregationsPlugin(
148148
// mms specifies options.env whereas we don't currently get this variable when
149149
// we use the aggregations plugin inside compass. In that use case we get it
150150
// from the instance model above.
151-
options.env ?? (instance.env as typeof ENVS[number]),
151+
options.env ?? (instance.env as (typeof ENVS)[number]),
152152
// options.outResultsFn is only used by mms
153153
outResultsFn: options.outResultsFn,
154154
pipelineBuilder: {

packages/compass-app-stores/src/instances-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const MongoDBInstancesManagerEvents = {
1111
} as const;
1212

1313
type MongoDBInstancesManagerEvent =
14-
typeof MongoDBInstancesManagerEvents[keyof typeof MongoDBInstancesManagerEvents];
14+
(typeof MongoDBInstancesManagerEvents)[keyof typeof MongoDBInstancesManagerEvents];
1515

1616
export type MongoDBInstancesManagerEventListeners = {
1717
[MongoDBInstancesManagerEvents.InstanceCreated]: (

packages/compass-assistant/src/assistant-chat.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ describe('AssistantChat', function () {
9999
expect(sendButton.disabled).to.be.false;
100100
});
101101

102-
// Not currently supported by the LeafyGreen Input Bar
103-
it.skip('send button is disabled for whitespace-only input', async function () {
102+
it('send button is disabled for whitespace-only input', async function () {
104103
renderWithChat([]);
105104

106105
const inputField = screen.getByPlaceholderText(

0 commit comments

Comments
 (0)