Skip to content

Conversation

@gagik
Copy link
Contributor

@gagik gagik commented Nov 13, 2025

This introduces a stricter knip dependency check and does some refactoring to make it possible to run workspace-specific installations for our tests in evergreen.

WIP - seeing how well this works...

* All CLI flags that are useful for {@link MongoshNodeRepl}.
*/
export type MongoshCliOptions = ShellCliOptions & {
type MongoshCliOptions = ShellCliOptions & {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this just removing all exports that aren't used elsewhere?

I think this is fine but I think this here would be a good example of a case where this type should be exported since it's definitely part of the module's API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, with the right configuration it can be smarter and figure out that this is meant to be a production exported file. that said I can disable it at this stage

"lint": "prettier --check .",
"reformat": "prettier --write ."
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

^ Are we sure about this? We should probably be expanding this file into a proper package.json instead of deleting it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah you predicted my eventual realization 😄

"rimraf": "^3.0.2",
"semver": "^7.6.3",
"sinon": "^7.5.0",
"sinon": "^19.0.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

btw, we should probably remove all or most packages here over time, this is a great step in that direction

@addaleax
Copy link
Collaborator

to make it possible to run workspace-specific installations for our tests in evergreen.

Is that the primary goal here by itself? This sounds like an X-Y thing, like, what is the ultimate problem we're trying to solve?

@gagik
Copy link
Contributor Author

gagik commented Nov 13, 2025

Is that the primary goal here by itself? This sounds like an X-Y thing, like, what is the ultimate problem we're trying to solve?

I'm going to split this up into multiple PRs once I reach a working point but there's a few things:

  1. turn testing hooks into a testing package
  2. fix deduped packages
  3. add knip + use better dependency management as result of this
  4. apply knip-suggested export changes (which we can ignore)
  5. workspace-specific install before tests for quicker installs per test

@gagik gagik changed the title chore: improve dependency management WIP - dependency experiments Nov 13, 2025
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.

3 participants