MongoDB object modeling designed to work in an asynchronous environment.
130 matches across 6 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | test/model.discriminator.test.js | 2120 | assert.equal(Triangle.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12472').length, 2); |
| CRITICAL | test/model.discriminator.test.js | 2121 | assert.equal(Square.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12472').length, 1); |
| CRITICAL | test/model.discriminator.test.js | 2151 | assert.equal(Triangle.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12604').length, 2); |
| CRITICAL | test/model.discriminator.test.js | 2152 | assert.equal(Square.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12604').length, 1); |
| CRITICAL | test/model.populate.test.js | 11734 | assert.deepStrictEqual(obj.rubric.parameters.param1.evaluationPrompts.map(prompt => prompt.name), ['Test Prompt', 'T |
| CRITICAL | test/model.populate.test.js | 11735 | assert.deepStrictEqual(obj.rubric.parameters.param2.evaluationPrompts.map(prompt => prompt.name), ['Test Prompt 3']) |
| CRITICAL | test/document.test.js | 6560 | mongoose.Schema.Types.Boolean.convertToTrue.add('aye'); |
| CRITICAL | test/document.test.js | 6561 | mongoose.Schema.Types.Boolean.convertToFalse.add('nay'); |
| CRITICAL | test/document.test.js | 6573 | mongoose.Schema.Types.Boolean.convertToTrue.delete('aye'); |
| CRITICAL | test/document.test.js | 6574 | mongoose.Schema.Types.Boolean.convertToFalse.delete('nay'); |
| CRITICAL | test/document.test.js | 6582 | mongoose.Schema.Types.Boolean.convertToFalse.add(null); |
| CRITICAL | test/docs/transactions.test.js | 25 | !db.client.topology.s.description.type.includes('ReplicaSet')) { |
| CRITICAL | docs/schematypes.md | 464 | mongoose.Schema.Types.Boolean.convertToFalse.add('nay'); |
| CRITICAL | lib/schema/boolean.js | 177 | * mongoose.Schema.Types.Boolean.convertToTrue.add('affirmative'); |
| CRITICAL | lib/schema/boolean.js | 199 | * mongoose.Schema.Types.Boolean.convertToFalse.add('nay'); |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | types/index.d.ts | 1154 | export function overwriteMiddlewareResult(val: any): Kareem.OverwriteMiddlewareResult; |
| LOW | types/index.d.ts | 1158 | export function overwriteMiddlewareArguments(val: any): Kareem.OverwriteArguments; |
| LOW | test/document.populate.test.js | 846 | beforeEach(function setupVirtualPopulateModels() { |
| LOW | test/document.populate.test.js | 900 | beforeEach(function setupEmbeddedGetterPopulateModels() { |
| LOW | test/model.middleware.test.js | 388 | it('static hooks async stack traces (gh-15317) (gh-5982)', async function staticHookAsyncStackTrace() { |
| LOW | test/model.discriminator.querying.test.js | 155 | async function checkHydratesCorrectModels(fields) { |
| LOW | test/model.discriminator.querying.test.js | 399 | async function checkHydratesCorrectModels(fields, checkUndefinedRevenue) { |
| LOW | test/model.test.js | 10027 | function generateRandomCollectionName() { |
| LOW | test/model.updateOne.test.js | 3273 | function getPaymentWithDotSeparatedPaths() { |
| LOW | test/document.test.js | 15393 | it('works with save() validation errors', async function asyncSaveValidationErrors() { |
| LOW | test/document.test.js | 15561 | it('works with async pre deleteOne errors on subdocuments', async function asyncSubdocPreDeleteOneErrors() { |
| LOW | test/document.test.js | 15659 | it('works with aggregate server errors', async function asyncAggregateServerErrors() { |
| LOW | test/encryptedSchema.test.js | 17 | function schemaHasEncryptedProperty(schema, path) { |
| LOW | test/model.insertMany.test.js | 834 | it('async stack traces with server error (gh-15317)', async function insertManyWithServerError() { |
| LOW | test/types/schema.test.ts | 1998 | function testInferRawDocTypeFromSchema() { |
| LOW | test/types/schema.test.ts | 2020 | function testInferHydratedDocTypeFromSchema() { |
| LOW | test/types/schema.test.ts | 2111 | function testNewSchemaWithMethodsAndVirtuals() { |
| LOW | test/types/schema.test.ts | 2372 | function allowNullFalseInferredTypes() { |
| LOW | test/types/document.test.ts | 200 | function autoTypedDocumentConnection() { |
| LOW | test/types/document.test.ts | 709 | function autoInferredWithCustomVersionKey() { |
| LOW | test/types/document.test.ts | 799 | function testCombinedFlattenOptions() { |
| LOW | test/types/models.test.ts | 334 | async function overwriteBulkWriteContents() { |
| LOW | test/types/models.test.ts | 441 | function schemaInstanceMethodsAndQueryHelpers() { |
| LOW | test/types/models.test.ts | 1065 | async function customModelInstanceWithStatics() { |
| LOW | test/types/base.test.ts | 113 | function baseConnectionAndCollection() { |
| LOW | test/types/create.test.ts | 133 | async function createWithAggregateErrors() { |
| LOW | test/types/connection.test.ts | 115 | function schemaInstanceMethodsAndQueryHelpersOnConnection() { |
| LOW | test/types/schema.create.test.ts | 1890 | function testInferRawDocTypeFromSchema() { |
| LOW | test/types/schema.create.test.ts | 1914 | async function testInferHydratedDocTypeFromSchema() { |
| LOW | test/types/schema.create.test.ts | 2039 | function allowNullFalseInferredTypes() { |
| LOW | docs/js/sidebar-collapse.js | 4 | function scrollActiveSidebarLinkIntoView() { |
| LOW | lib/query.js | 3402 | function prepareDiscriminatorCriteria(query) { |
| LOW | lib/query.js | 3987 | function convertNewToReturnDocument(options) { |
| LOW | lib/queryHelpers.js | 26 | exports.preparePopulationOptionsMQ = function preparePopulationOptionsMQ(query, options) { |
| LOW | lib/connection.js | 1678 | Connection.prototype.authMechanismDoesNotRequirePassword = function authMechanismDoesNotRequirePassword() { |
| LOW | lib/connection.js | 1696 | Connection.prototype.optionsProvideAuthenticationData = function optionsProvideAuthenticationData(options) { |
| LOW | lib/document.js | 4437 | function applySchemaTypeTransforms(self, json) { |
| LOW | lib/plugins/sharding.js | 32 | function shardingPluginPreDeleteOne() { |
| LOW | lib/plugins/sharding.js | 36 | function shardingPluginPreUpdateOne() { |
| LOW | lib/schema/array.js | 634 | function createLogicalQueryOperatorHandler(op) { |
| LOW | lib/schema/array.js | 635 | return function logicalQueryOperatorHandler(val, context) { |
| LOW | lib/schema/string.js | 735 | function formatMaxLengthValidatorMessage(msg) { |
| LOW | lib/schema/documentArrayElement.js | 27 | function SchemaDocumentArrayElement(path, schema, options, parentSchema) { |
| LOW | lib/helpers/getDefaultBulkwriteResult.js | 3 | function getDefaultBulkwriteResult() { |
| LOW | lib/helpers/update/applyTimestampsToChildren.js | 12 | function applyTimestampsToChildren(now, update, schema) { |
| LOW | lib/helpers/update/applyTimestampsToChildren.js | 82 | function applyTimestampsToDocumentArray(arr, schematype, now) { |
| LOW | lib/helpers/update/applyTimestampsToChildren.js | 108 | function applyTimestampsToSingleNested(subdoc, schematype, now) { |
| LOW | lib/helpers/update/applyTimestampsToChildren.js | 127 | function applyTimestampsToUpdateKey(schema, key, update, now) { |
| LOW | lib/helpers/update/decorateUpdateWithVersionKey.js | 8 | module.exports = function decorateUpdateWithVersionKey(update, options, versionKey) { |
| LOW | lib/helpers/update/updatedPathsByArrayFilter.js | 5 | module.exports = function updatedPathsByArrayFilter(update) { |
| LOW | lib/helpers/cursor/eachAsync.js | 219 | function createEachAsyncMultiError(aggregatedErrors) { |
| LOW | lib/helpers/aggregate/prepareDiscriminatorPipeline.js | 3 | module.exports = function prepareDiscriminatorPipeline(pipeline, schema, prefix) { |
| LOW | lib/helpers/aggregate/stringifyFunctionOperators.js | 3 | module.exports = function stringifyFunctionOperators(pipeline) { |
| LOW | lib/helpers/populate/removeDeselectedForeignField.js | 11 | module.exports = function removeDeselectedForeignField(foreignFields, options, docs) { |
| LOW | lib/helpers/populate/markArraySubdocsPopulated.js | 19 | module.exports = function markArraySubdocsPopulated(doc, populated) { |
| LOW | lib/helpers/populate/assignRawDocsToIdStructure.js | 34 | function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, recursed) { |
| LOW | lib/helpers/populate/createPopulateQueryFilter.js | 8 | module.exports = function createPopulateQueryFilter(ids, _match, _foreignField, model, skipInvalidIds) { |
| LOW | lib/helpers/document/applyTimestamps.js | 38 | function applyTimestampsToChildren(schema, res, options) { |
| LOW | lib/helpers/document/getEmbeddedDiscriminatorPath.js | 16 | module.exports = function getEmbeddedDiscriminatorPath(doc, path, options) { |
| LOW | lib/helpers/document/getDeepestSubdocumentForPath.js | 14 | module.exports = function getDeepestSubdocumentForPath(doc, parts, schema) { |
| 11 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | test/document.populate.test.js | 939 | const createdTeam = await Team.create({ captain: 'John Doe', players: [{ player: 'John Doe' }, { player: 'Foo Bar' |
| LOW | test/model.discriminator.test.js | 396 | employee.name.full = 'John Doe'; |
| LOW | test/model.discriminator.test.js | 397 | assert.equal(employee.name.full, 'John Doe'); |
| LOW | test/model.test.js | 7653 | userToUpdate.name = 'John Doe'; |
| LOW | test/model.test.js | 7675 | userToUpdate.name = 'John Doe'; |
| LOW | test/model.test.js | 7697 | userToUpdate.name = 'John Doe'; |
| LOW | test/model.test.js | 8321 | userToUpdate.name = 'John Doe'; |
| LOW | test/model.test.js | 8348 | userToUpdate.name = 'John Doe'; |
| LOW | test/model.test.js | 8370 | userToUpdate.name = 'John Doe'; |
| LOW | test/model.populate.test.js | 6557 | await User.create({ id: 111, name: 'John Doe' }); |
| LOW | test/model.populate.test.js | 6576 | assert.equal(doc.outer.inner.flexible[0].users_$[0].name, 'John Doe'); |
| LOW | test/model.populate.test.js | 8429 | const user = await User.create({ fullName: 'John Doe', companyId: company._id }); |
| LOW | test/model.populate.test.js | 8483 | const user = await User.create({ fullName: 'John Doe', company: 'GitHub' }); |
| LOW | test/model.populate.test.js | 11115 | email: 'admin@example.com', |
| LOW | test/model.populate.test.js | 11343 | await Author.create({ group: 'AUTH1', name: 'John Doe' }); |
| LOW | test/document.test.js | 817 | const post = await Post.create({ owner: savedUser._id, content: 'lorem ipsum' }); |
| LOW | test/document.test.js | 1122 | company: { companyName: 'Acme Inc' } |
| LOW | test/document.test.js | 3136 | username: 'John Doe', |
| LOW | test/document.test.js | 3141 | username: 'John Doe', |
| LOW | test/document.test.js | 5601 | title: 'Lorem Ipsum Dolor', |
| LOW | test/document.test.js | 5709 | title: 'Lorem Ipsum Dolor', |
| LOW | test/document.test.js | 10102 | email: 'foo@bar.com', |
| LOW | test/document.test.js | 12900 | addresses: [{ street: '123 Main St', city: 'Boston', image: { url: 'google.com' } }], |
| LOW | test/document.test.js | 13107 | phones: [{ number: '555-1234' }] |
| LOW | test/document.test.js | 14707 | email: 'test@test.com' |
| LOW | test/types/queries.test.ts | 414 | const update: UpdateQuery<IUser> = { $addToSet: { friendsNames: 'John Doe' } }; |
| LOW | test/types/queries.test.ts | 418 | update.$addToSet.friendsNames = 'Jane Doe'; |
| LOW | test/types/schema.test.ts | 1488 | schema.statics.createWithFullName('John Doe'); |
| LOW | test/types/models.test.ts | 1056 | const data = { name: 'John Doe', age: 30, address: '123 Main St' }; |
| LOW | test/types/models.test.ts | 1056 | const data = { name: 'John Doe', age: 30, address: '123 Main St' }; |
| LOW | test/types/schema.create.test.ts | 1429 | schema.statics.createWithFullName('John Doe'); |
| LOW | lib/schema/string.js | 136 | * new User({ name: ' John Doe ' }).name; // 'John Doe' |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | lib/query.js | 125 | // this is the case where we have a CustomQuery, we need to check if we got |
| LOW | lib/schema.js | 2904 | // Now that we found the array, we need to check if there |
| LOW | lib/schema.js | 3006 | // Now that we found the array, we need to check if there |
| LOW | lib/helpers/populate/getSchemaTypes.js | 83 | // Now that we found the array, we need to check if there |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | index.js | 61 | // The following properties are not exported using ESM because `setDriver()` can mutate these |
| LOW | types/index.d.ts | 1 | /// <reference path="./aggregate.d.ts" /> |
| LOW | test/docs/promises.test.js | 141 | // acquit:ignore:end |
| LOW | test/docs/lean.test.js | 41 | // To enable the `lean` option for a query, use the `lean()` function. |
| LOW | docs/promises.md | 81 | await Band.findOne({ _id: badId }); |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | test/encryptedSchema.test.js | 250 | // Don't forget to add `Int8` to the type registry |
| LOW | test/encryptedSchema.test.js | 280 | // Don't forget to add `Int8` to the type registry |
| LOW | test/docs/schematypes.test.js | 54 | // Don't forget to add `Int8` to the type registry |