-
Notifications
You must be signed in to change notification settings - Fork 84
chore: use knip for dependency checking #2613
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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
depcheckwithknipacross all packages - Adding comprehensive
knipconfiguration for the monorepo and individual packages - Bumping
mochaandsinonversions 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.
147f7d0 to
f4bf9ba
Compare
7ab8453 to
ba93a57
Compare
fdeeb03 to
7d15df4
Compare
| messageBus = sinon.createStubInstance(EventEmitter); | ||
| evaluationListener = sinon.createStubInstance(class FakeListener {}); | ||
| evaluationListener.onPrint = sinon.stub(); | ||
| evaluationListener = { |
There was a problem hiding this comment.
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
7d15df4 to
a4c2d77
Compare
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.