Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
231 changes: 117 additions & 114 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@
"@babel/compat-data": "^7.26.8",
"@mongodb-js/monorepo-tools": "^1.1.10",
"@pkgjs/nv": "^0.2.2",
"@types/chai": "^4.2.5",
"@types/chai": "^5.2.3",
"@types/mocha": "^5.2.7",
"@types/node": "^22.15.30",
"@types/rimraf": "^3.0.0",
"@types/semver": "^7.3.4",
"@types/sinon-chai": "^3.2.4",
"@types/sinon-chai": "^4.0.0",
"@types/which": "^1.3.2",
"chai": "^4.2.0",
"chai": "^6.2.1",
"cross-env": "^6.0.3",
"depcheck": "^1.4.7",
"duplexpair": "^1.0.2",
Expand All @@ -124,7 +124,7 @@
"rimraf": "^3.0.2",
"semver": "^7.6.3",
"sinon": "^7.5.0",
"sinon-chai": "^3.5.0",
"sinon-chai": "^4.0.1",
"terser-webpack-plugin": "^5.3.11",
"ts-loader": "^8.0.14",
"ts-node": "^10.9.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/arg-parser/src/arg-mapper.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { CliOptions, ConnectionInfo } from './';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
import { mapCliToDriver } from './arg-mapper';
import type { DevtoolsConnectOptions } from '@mongodb-js/devtools-connect';
Expand Down
3 changes: 2 additions & 1 deletion packages/async-rewriter2/src/async-writer-babel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import path from 'path';
import { promisify } from 'util';
import vm from 'vm';
import sinon from 'sinon';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
chai.use(sinonChai);
const execFile = promisify(childProcess.execFile);
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@types/react": "^16.9.17",
"@types/react-dom": "^18.0.8",
"@types/sinon": "^7.5.1",
"@types/sinon-chai": "^3.2.4",
"@types/sinon-chai": "^4.0.0",
"@types/text-table": "^0.2.1",
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
"babel-loader": "^8.3.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser-repl/testing/chai.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
chai.use(sinonChai);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import type { InterpreterEnvironment } from './';
import { OpenContextRuntime } from './';
import type { MongoshBus } from '@mongosh/types';
import type { ServiceProvider } from '@mongosh/service-provider-core';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
import type { StubbedInstance } from 'ts-sinon';
import { stubInterface } from 'ts-sinon';
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-runtime-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@mongosh/service-provider-node-driver": "^3.17.5",
"@types/sinon": "^7.5.1",
"@types/sinon-chai": "^3.2.4",
"@types/sinon-chai": "^4.0.0",
"bson": "^6.10.4",
"depcheck": "^1.4.7",
"eslint": "^7.25.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { SinonStubbedInstance } from 'sinon';
import sinon from 'sinon';
import chai from 'chai';
import * as chai from 'chai';
import sinonChai from 'sinon-chai';
chai.use(sinonChai);
const { expect } = chai;
Expand Down
2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"depcheck": "^1.4.7",
"eslint": "^7.25.0",
"prettier": "^2.8.8",
"sinon-chai": "^3.5.0",
"sinon-chai": "^4.0.1",
"yaml": "^2.3.1"
},
"dependencies": {
Expand Down
6 changes: 4 additions & 2 deletions packages/build/src/homebrew/generate-formula.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import type { GithubRepo } from '@mongodb-js/devtools-github-repo';
import { generateUpdatedFormula } from './generate-formula';
import sinonChai from 'sinon-chai';

chai.use(require('sinon-chai'));
chai.use(sinonChai);

const VALID_FORMULA = `require "language/node"

Expand Down
6 changes: 4 additions & 2 deletions packages/build/src/homebrew/publish-to-homebrew.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import type { GithubRepo } from '@mongodb-js/devtools-github-repo';
import type { HomebrewPublisherConfig } from './publish-to-homebrew';
import { HomebrewPublisher } from './publish-to-homebrew';
import sinonChai from 'sinon-chai';

chai.use(require('sinon-chai'));
chai.use(sinonChai);

describe('HomebrewPublisher', function () {
let homebrewCore: GithubRepo;
Expand Down
6 changes: 4 additions & 2 deletions packages/build/src/homebrew/update-homebrew-fork.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import { GithubRepo } from '@mongodb-js/devtools-github-repo';
import { updateHomebrewFork } from './update-homebrew-fork';
import sinonChai from 'sinon-chai';

chai.use(require('sinon-chai'));
chai.use(sinonChai);

describe('Homebrew update-homebrew-fork', function () {
let getFileContent: sinon.SinonStub;
Expand Down
6 changes: 4 additions & 2 deletions packages/build/src/publish-mongosh.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import { Barque } from './barque';
import { type Config } from './config';
Expand All @@ -7,8 +8,9 @@ import { HomebrewPublisher } from './homebrew';
import { PackageBumper, PackagePublisher } from './npm-packages';
import { MongoshPublisher } from './publish-mongosh';
import { dummyConfig } from '../test/helpers';
import sinonChai from 'sinon-chai';

chai.use(require('sinon-chai'));
chai.use(sinonChai);

function createStubRepo(overrides?: any): GithubRepo {
return sinon.createStubInstance(
Expand Down
6 changes: 4 additions & 2 deletions packages/build/src/run-draft.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import type { Config } from './config';
import { ALL_PACKAGE_VARIANTS } from './config';
Expand All @@ -12,8 +13,9 @@ import {
} from './run-draft';
import { dummyConfig } from '../test/helpers';
import { PackageBumper } from './npm-packages';
import sinonChai from 'sinon-chai';

chai.use(require('sinon-chai'));
chai.use(sinonChai);

function createStubRepo(overrides?: any): GithubRepo {
return sinon.createStubInstance(
Expand Down
6 changes: 4 additions & 2 deletions packages/build/src/run-upload.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import type { Config } from './config';
import type { uploadArtifactToEvergreen } from './evergreen';
Expand All @@ -7,8 +8,9 @@ import { runUpload } from './run-upload';
import { dummyConfig } from '../test/helpers';
import type { promises as fs } from 'fs';
import path from 'path';
import sinonChai from 'sinon-chai';

chai.use(require('sinon-chai'));
chai.use(sinonChai);

const normalizePathToCurrentOS = (p: string) => path.join(p);

Expand Down
4 changes: 2 additions & 2 deletions packages/cli-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@
"@mongodb-js/sbom-tools": "^0.8.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@types/ansi-escape-sequences": "^4.0.0",
"@types/chai-as-promised": "^7.1.3",
"@types/chai-as-promised": "^8.0.2",
"@types/js-yaml": "^4.0.5",
"@types/node": "^22.15.30",
"@types/numeral": "^2.0.2",
"@types/text-table": "^0.2.1",
"@types/yargs-parser": "^15.0.0",
"chai-as-promised": "^7.1.1",
"chai-as-promised": "^8.0.2",
"depcheck": "^1.4.7",
"eslint": "^7.25.0",
"mongodb": "^6.19.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-repl/src/async-repl.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { Readable, Writable } from 'stream';
import { PassThrough } from 'stream';
import { promisify, inspect } from 'util';
import { once } from 'events';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import { tick } from '../test/repl-helpers';
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-repl/src/config-directory.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ConfigManager, ShellHomeDirectory } from './config-directory';
import path from 'path';
import { promises as fs } from 'fs';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import { EJSON } from 'bson';
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-repl/test/repl-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { promises as fs } from 'fs';
import { promisify } from 'util';
import path from 'path';
import { once } from 'events';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import chaiAsPromised from 'chai-as-promised';
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"@mongodb-js/oidc-mock-provider": "^0.11.3",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@types/chai-as-promised": "^7.1.3",
"@types/chai-as-promised": "^8.0.2",
"@types/node": "^22.15.30",
"@types/rimraf": "^3.0.0",
"bson": "^6.10.4",
"chai-as-promised": "^7.1.1",
"chai-as-promised": "^8.0.2",
"depcheck": "^1.4.7",
"eslint": "^7.25.0",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/test/repl-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { promises as fs } from 'fs';
import { promisify } from 'util';
import path from 'path';
import rimraf from 'rimraf';
import chai from 'chai';
import * as chai from 'chai';
import sinonChai from 'sinon-chai';
import chaiAsPromised from 'chai-as-promised';
import type { MongodSetup } from '../../../testing/integration-testing-hooks';
Expand Down
3 changes: 2 additions & 1 deletion packages/editor/src/editor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as bson from 'bson';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import type { Duplex } from 'stream';
import { PassThrough } from 'stream';
import Nanobus from 'nanobus';
Expand Down
3 changes: 2 additions & 1 deletion packages/node-runtime-worker-thread/src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import type { MongoshBus } from '@mongosh/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import path from 'path';
import { once } from 'events';
import Worker from 'web-worker';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
import sinon from 'sinon';
import { EJSON, ObjectId } from 'bson';
Expand Down
2 changes: 1 addition & 1 deletion packages/service-provider-node-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@types/sinon-chai": "^3.2.4",
"@types/sinon-chai": "^4.0.0",
"depcheck": "^1.4.7",
"eslint": "^7.25.0",
"prettier": "^2.8.8"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CommonErrors } from '@mongosh/errors';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import type { ClientSession, SearchIndexDescription } from 'mongodb';
import { Collection, Db, MongoClient } from 'mongodb';
import sinonChai from 'sinon-chai';
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-api/src/bulk.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import type {
} from '@mongosh/service-provider-core';
import * as bson from 'bson';
import { fail } from 'assert';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
import type { EventEmitter } from 'events';
import type { StubbedInstance } from 'ts-sinon';
Expand Down
5 changes: 2 additions & 3 deletions packages/shell-api/src/collection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ import {
MongoshRuntimeError,
} from '@mongosh/errors';
import type { StringKey } from './helpers';

const sinonChai = require('sinon-chai'); // weird with import

import sinonChai from 'sinon-chai';
use(sinonChai);

describe('Collection', function () {
describe('help', function () {
const apiClass = new Collection({} as any, {} as any, 'name');
Expand Down
2 changes: 1 addition & 1 deletion packages/shell-api/src/cursor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ALL_API_VERSIONS,
ServerVersions,
} from './enums';
import chai from 'chai';
import * as chai from 'chai';
import sinonChai from 'sinon-chai';
import sinon from 'sinon';
import type { StubbedInstance } from 'ts-sinon';
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-api/src/database.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
import sinon from 'sinon';
import type { StubbedInstance } from 'ts-sinon';
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-api/src/helpers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { NodeDriverServiceProvider } from '../../service-provider-node-driver';
import { startSharedTestServer } from '../../../testing/integration-testing-hooks';
import { makeFakeConfigDatabase } from '../test/shard-test-fake-data';
import sinon from 'ts-sinon';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import { EventEmitter } from 'events';
import sinonChai from 'sinon-chai';
import { stub } from 'sinon';
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-api/src/replica-set.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type {
ServiceProvider,
} from '@mongosh/service-provider-core';
import * as bson from 'bson';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import { EventEmitter } from 'events';
import semver from 'semver';
import sinonChai from 'sinon-chai';
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-bson/src/shell-bson.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
serialize as bsonSerialize,
deserialize as bsonDeserialize,
} from 'bson';
import chai, { expect } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinonChai from 'sinon-chai';
import sinon from 'sinon';
import type { BSON, ShellBson } from './';
Expand Down
2 changes: 1 addition & 1 deletion packages/shell-evaluator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
"@mongosh/types": "^3.14.0",
"@types/sinon-chai": "^3.2.4",
"@types/sinon-chai": "^4.0.0",
"depcheck": "^1.4.7",
"eslint": "^7.25.0",
"prettier": "^2.8.8"
Expand Down
9 changes: 5 additions & 4 deletions packages/shell-evaluator/src/shell-evaluator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { expect, use } from 'chai';
import * as chai from 'chai';
import { expect } from 'chai';
import sinon from 'sinon';
const sinonChai = require('sinon-chai'); // weird with import
use(sinonChai);

import sinonChai from 'sinon-chai';
import ShellEvaluator from './index';
import { EventEmitter } from 'events';

chai.use(sinonChai);

describe('ShellEvaluator', function () {
let shellEvaluator: ShellEvaluator;
let busMock: EventEmitter;
Expand Down
Loading
Loading