Skip to content

Conversation

@gagik
Copy link
Contributor

@gagik gagik commented Dec 5, 2025

depcheck is deprecated and knip has some nice extra such as webpack and mocha integration.

Also bumps mocha and sinon to ensure we have 1 hoisted entry.

@gagik gagik marked this pull request as ready for review December 5, 2025 15:46
@gagik gagik requested a review from a team as a code owner December 5, 2025 15:46
Copilot AI review requested due to automatic review settings December 5, 2025 15:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates from the deprecated depcheck tool to knip for dependency checking in the monorepo. The migration includes:

  • Replacing depcheck with knip across all packages
  • Adding comprehensive knip configuration for the monorepo and individual packages
  • Bumping mocha and sinon versions to ensure single hoisted instances
  • Reorganizing some dependencies from production to development sections

Reviewed changes

Copilot reviewed 56 out of 60 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Adds knip, removes depcheck, updates root-level depcheck script, upgrades mocha and sinon
knip.ts Adds comprehensive knip configuration for monorepo workspace structure
.knipignore Adds patterns to exclude from knip analysis
mongosh.code-workspace Reorders java-shell workspace entry (dependency order)
packages/*/package.json Removes depcheck script and dependency from all packages
packages/*/.depcheckrc Removes deprecated depcheck config files
packages/shell-api/tsconfig-lint.json Updates include path from bin to scripts
packages/shell-api/scripts/*.ts Updates import paths from '../' to '../lib'
packages/shell-api/package.json Moves @babel packages to devDependencies, updates script paths from bin to scripts
packages/async-rewriter2/package.json Updates script path from bin to scripts
packages/browser-repl/package.json Adds webpack-serve script, removes unused type dependencies
packages/node-runtime-worker-thread/package.json Moves web-worker to devDependencies, upgrades mocha
packages/autocomplete/package.json Upgrades mocha version
packages/logging/package.json Moves @mongosh/errors to devDependencies
packages/e2e-tests/package.json Moves runtime dependencies to devDependencies
packages/e2e-tests/test/e2e.spec.ts Updates require path from dependencies to devDependencies
packages/browser-runtime-electron/package.json Removes unused @types dependencies
packages/browser-runtime-electron/src/electron-runtime.spec.ts Updates sinon stub creation pattern
packages/java-shell/package.json Adds @mongosh/testing as devDependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gagik gagik added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Dec 5, 2025
@gagik gagik force-pushed the gagik/adopt-knip branch 2 times, most recently from fdeeb03 to 7d15df4 Compare December 5, 2025 16:18
messageBus = sinon.createStubInstance(EventEmitter);
evaluationListener = sinon.createStubInstance(class FakeListener {});
evaluationListener.onPrint = sinon.stub();
evaluationListener = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

necessary because of sinon bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants