Skip to content
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

fix(server-provider-core): don't import MapReduceOptions from Node driver #1383

Merged

Conversation

baileympearson
Copy link
Contributor

mongodb/node-mongodb-native#3511 removes support for MapReduce in the Node driver.

This PR moves MapReduceOptions and FinalizeFunction from the driver into mongosh.

Alternatively, we could replace MapReduceOptions with Document instead of moving the definition out of the driver but since it's only two small interfaces, I felt that it's not a huge burden to maintain.

Example CI run from the driver with no MapReduce and the changes in this PR: https://spruce.mongodb.com/version/63bc2438d6d80a31a0a43fb3/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

@@ -0,0 +1,30 @@
import { CommandOperationOptions, Document, ObjectId, Sort } from 'mongodb';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { CommandOperationOptions, Document, ObjectId, Sort } from 'mongodb';
import type { CommandOperationOptions, Document, ObjectId, Sort } from 'mongodb';

(we don’t have a nice imports autoformatter like y’all do for the driver, but we do prefer import type where applicable)

@baileympearson baileympearson merged commit d4819fc into mongodb-js:main Jan 9, 2023
@baileympearson baileympearson deleted the no-story-fix-mongosh-tests branch January 9, 2023 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants