Skip to content
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3de5611
chore: turn the testing folder into a package
gagik Nov 13, 2025
c22d196
chore: move testing folder to packages
gagik Nov 13, 2025
d5fb0c4
chore: package-lock
gagik Nov 13, 2025
fcfa3cc
chore: fix testing src
gagik Nov 17, 2025
c3f1a28
chore: use scripts for test-vscode
gagik Nov 17, 2025
52c0478
chore: export getTestCertificatePath
gagik Nov 17, 2025
0d96836
chore: fix setup-env
gagik Nov 18, 2025
a57a1fc
Apply suggestion from @Copilot
gagik Nov 19, 2025
4fcbdd2
chore: move certificates inside
gagik Nov 20, 2025
8b1c261
chore: remove compilation step
gagik Nov 20, 2025
8ca19bc
chore: empty commit
gagik Nov 20, 2025
11615ee
Merge branch 'main' of github.com:mongodb-js/mongosh into gagik/testi…
gagik Dec 3, 2025
e18ce64
chore: adjust testing file directory
gagik Dec 3, 2025
48cec6d
chore: fix global file?
gagik Dec 3, 2025
f10f53f
chore: use 6.0 mongodb-runner
gagik Dec 3, 2025
486e101
chore: sanity check: import directly
gagik Dec 3, 2025
cc857c0
chore: service-provider alignment
gagik Dec 3, 2025
dd4a547
chore: one less ..
gagik Dec 3, 2025
c909d88
chore: empty commit
gagik Dec 4, 2025
1c165af
chore: fixup browser-repl
gagik Dec 5, 2025
03d6f77
Merge branch 'main' of github.com:mongodb-js/mongosh into gagik/testi…
gagik Dec 5, 2025
97e50ce
chore: package-lock
gagik Dec 5, 2025
29ddf23
chore: fix chore, package-lock
gagik Dec 5, 2025
7139b80
chore: setup knip
gagik Nov 13, 2025
cd9fa57
chore: finalize config, fix all non-prod knip issues
gagik Dec 5, 2025
3ae0157
chore: fix knip --production
gagik Dec 5, 2025
0183a87
chore: fix depalign
gagik Dec 5, 2025
cd26c47
Merge branch 'main' of github.com:mongodb-js/mongosh into gagik/adopt…
gagik Dec 5, 2025
4e6d08b
chore: package-lock
gagik Dec 5, 2025
dc52f81
chore: remove depcheck at package level
gagik Dec 5, 2025
21baf75
chore: rename fix
gagik Dec 5, 2025
5c1c479
chore: fix check, get rid of depcheck completely
gagik Dec 5, 2025
197e772
chore: handle sinon update fallout
gagik Dec 5, 2025
231b794
chore: fix depalign, use script for runtime-support-nocov
gagik Dec 5, 2025
a4c2d77
chore: ../lib -> ../
gagik Dec 5, 2025
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
43 changes: 43 additions & 0 deletions .knipignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Knip ignore file - patterns to exclude from analysis

# Build outputs
**/lib/**
**/dist/**
**/build/**

# Coverage and test outputs
**/coverage/**
**/.nyc_output/**

# Generated files
**/tmp/**
**/.sbom/**

# Test fixtures
**/test/fixtures/**
**/test/data/**

# Evergreen CI specific
.evergreen/**

# Async rewriter3 (Rust/WASM project)
packages/async-rewriter3/**

# Lock files and dependencies
**/node_modules/**
package-lock.json
npm-shrinkwrap.json
yarn.lock
pnpm-lock.yaml

# IDE and editor files
**/.vscode/**
**/.idea/**
**/*.swp
**/*.swo
**/*~

# OS files
**/.DS_Store
**/Thumbs.db

235 changes: 235 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
import type { KnipConfig } from "knip";
import fs from "fs";

// Create an empty file to satisfy the knip rule for async-rewriter2
fs.writeFileSync(
"packages/async-rewriter2/src/runtime-support.out.nocov.ts",
""
);

const config: KnipConfig = {
rules: {
// Disable checking for unused exports, unused exported types, and duplicate dependencies.
exports: "off",
types: "off",
duplicates: "off",
},
// Ignore patterns for files that should not be analyzed
ignore: [
// Build outputs
"**/lib/**",
"**/dist/**",
"**/build/**",
"**/coverage/**",
"**/.nyc_output/**",
// Generated files
"**/tmp/**",
"**/.sbom/**",
"**/test/data/**",
// Configuration files
".evergreen/**",
"config/**",
"configs/**",
"**/.eslintrc.js",
],

// Received from @mongodb-js/sbom-tools
ignoreBinaries: ["mongodb-sbom-tools"],

// Workspace-specific configurations
workspaces: {
// Root package (monorepo root, no entry file needed)
".": {
entry: ["scripts/*.ts"],
project: [],
ignoreBinaries: [
// Lerna is listed as an optional dependency.
"lerna",
],
},

// Config packages
"configs/eslint-config-mongosh": {
entry: ["utils.js"],
},

"configs/tsconfig-mongosh": {
entry: ["tsconfig.common.json"],
},

// Special cases for packages with different entry points
"packages/cli-repl": {
project: ["src/**/*.ts!", "bin/**/*.js", "test/**/*.ts"],
ignoreDependencies: [
// Eagerly loaded startup snapshot dependencies
"@mongodb-js/saslprep",
"socks",
"emphasize",
"ipv6-normalize",
"bindings",
"system-ca",
// Used for monkey-patching our s390x fix
"@tootallnate/quickjs-emscripten",
],
},

"packages/shell-api": {
entry: ["src/api.ts!", "scripts/*.ts", "test/*.ts"],
},

"packages/mongosh": {
project: ["bin/**/*.js"],
},

"packages/e2e-tests": {
entry: ["test/**/*.ts", "test/fixtures/**/*"],
ignoreDependencies: [
// This is used for version check. TODO: Consider changing that test.
"@mongosh/cli-repl",
],
},

"scripts/docker": {
ignoreDependencies: [
// Used by build.sh script.
"mongodb-crypt-library-version",
],
},

"packages/service-provider-node-driver": {
ignoreDependencies: [
// Used for MONGODB-AWS auth
// See: https://github.com/mongodb-js/mongosh/pull/1149
// See: https://jira.mongodb.org/browse/NODE-5005
"aws4",
],
},

"packages/node-runtime-worker-thread": {
ignoreDependencies: [
// Used in worker thread context
"system-ca",
],
ignoreFiles: [
// Used in package.json
"tests/register-worker.js",
],
},

"packages/errors": {
entry: ["src/index.ts!", "scripts/*.ts"],
},

"packages/browser-repl": {
entry: ["src/index.tsx!", "config/*.js"],
project: ["src/**/*.{ts,tsx}!"],
ignoreDependencies: [
"@wojtekmaj/enzyme-adapter-react-17",
"enzyme",
// Karma test runner plugins
"karma-chrome-launcher",
"karma-mocha",
"karma-mocha-reporter",
"karma-typescript",
// Resolved as `<depname>/`
"buffer",
"util",
],
},

"packages/java-shell": {
entry: ["src/test/js/run-tests.ts"],
project: ["src/main/js/**/*"],
ignoreDependencies: [
// Used in webpack and build scripts
"bson",
"tr46",
"assert",
"buffer",
"util",
],
},

"packages/connectivity-tests": {
entry: ["scripts/disable-dns-srv.js"],
// This package only contains bash test scripts
ignoreDependencies: [
// Used by test scripts
"mongosh",
],
},

"packages/async-rewriter2": {
entry: [
"src/index.ts!",
"bin/*.js!",
"test/fixtures/**/*",
"scripts/*.js",
"benchmark/index.ts",
],
ignoreFiles: [
// Used by make-runtime-support.js
"src/runtime-support.nocov.js",
],
},

"packages/snippet-manager": {
entry: ["test/fixtures/**/*"],
},

testing: {
entry: ["src/**/*.ts"],
project: ["src/**/*.ts"],
},
},

// Mocha test files configuration
mocha: {
config: ["**/mocharc.{js,json,yml,yaml}", "**/.mocharc.{js,json,yml,yaml}"],
entry: ["**/*.spec.{ts,tsx,js}", "**/*.test.{ts,tsx,js}"],
},

// TypeScript configuration
typescript: {
config: [
"tsconfig.json",
"tsconfig-lint.json",
"**/tsconfig.json",
"**/tsconfig-lint.json",
"configs/tsconfig-mongosh/tsconfig.common.json",
],
},

// Webpack configuration
webpack: {
config: [
"config/webpack.base.config.js",
"**/webpack.config.js",
"**/webpack.config.*.js",
],
},

// ESLint configuration
eslint: {
config: [
"configs/eslint-config-mongosh/index.js",
"**/.eslintrc.{js,json}",
],
},

// Prettier configuration
prettier: {
config: [
".prettierrc",
".prettierrc.{js,json,yml,yaml}",
"prettier.config.js",
],
},

// Nyc (test coverage) configuration
nyc: {
config: [".nycrc", ".nycrc.{json,yml,yaml}", "nyc.config.js"],
},
};

export default config;
8 changes: 4 additions & 4 deletions mongosh.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
"name": "📦 @mongosh/history",
"path": "packages/history"
},
{
"name": "📦 @mongosh/java-shell",
"path": "packages/java-shell"
},
{
"name": "📦 @mongosh/js-multiline-to-singleline",
"path": "packages/js-multiline-to-singleline"
Expand Down Expand Up @@ -64,6 +60,10 @@
"name": "📦 @mongosh/arg-parser",
"path": "packages/arg-parser"
},
{
"name": "📦 @mongosh/java-shell",
"path": "packages/java-shell"
},
{
"name": "📦 @mongosh/service-provider-core",
"path": "packages/service-provider-core"
Expand Down
Loading
Loading