Skip to content

fix(mongodb-constants): add text.matchCriteria to template COMPASS-8601 #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2025
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
10 changes: 10 additions & 0 deletions packages/devtools-connect/src/connect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,16 @@ describe('devtools connect', function () {
).to.equal(false);
});

it('returns false if the OIDC_CALLBACK is set', function () {
Copy link
Collaborator

@mabaasit mabaasit Jul 9, 2025

Choose a reason for hiding this comment

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

Is this test related to this ticket?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. The CI complained, it didn't make sense to add a test related to the template changes, so I added an unrelated test to please the gods of test coverage :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

drive-by? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The CI complained, it didn't make sense to add a test related to the template changes, so I added an unrelated test to please the gods of test coverage :D

expect(
isHumanOidcFlow('mongodb://example/?authMechanism=MONGODB-OIDC', {
authMechanismProperties: {
OIDC_CALLBACK: () => Promise.resolve({ accessToken: 'abc123' }),
},
}),
).to.equal(false);
});

it('returns false if the ENVIRONMENT url option is set', function () {
expect(
isHumanOidcFlow(
Expand Down
5 changes: 3 additions & 2 deletions packages/mongodb-constants/src/stage-operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ const STAGE_OPERATORS = [
description: 'Performs a full-text search on the specified field(s).',
comment: `/**
* index: The name of the Search index.
* text: Analyzed search, with required fields of query and path, the analyzed field(s) to search.
* text: Analyzed search, with required fields of query and path, the analyzed field(s) to search. Use matchCriteria to match 'any' or 'all' query terms.
* compound: Combines ops.
* span: Find in text field regions.
* exists: Test for presence of a field.
Expand All @@ -912,7 +912,8 @@ const STAGE_OPERATORS = [
index: '\${1:string}',
text: {
query: '\${2:string}',
path: '\${3:string}'
path: '\${3:string}',
matchCriteria: '\${4:any}',
}
}`,
},
Expand Down