Skip to content

Commit

Permalink
docs: fix markdown lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Dec 18, 2024
1 parent 3b594a6 commit 4317850
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/migrating_to_6.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ However, this behavior was a source of confusion in some cases, so in Mongoose 7
```javascript
mongoose.set('strictQuery', false);
```

In a test suite, it may be useful to set `strictQuery` to `throw`, which will throw exceptions any time a query references schema that doesn't exist, which could help identify a bug in your tests or code.

Here's an example of the effect of `strictQuery`:
Expand Down Expand Up @@ -520,7 +521,7 @@ The `reconnectTries` and `reconnectInterval` options have been removed since the
The MongoDB node driver will always attempt to retry any operation for up to `serverSelectionTimeoutMS`, even if MongoDB is down for a long period of time.
So, it will never run out of retries or try to reconnect to MongoDB.

## Lodash `.isEmpty()` returns true for ObjectIds #{lodash-object-id}
## Lodash `.isEmpty()` returns true for ObjectIds {#lodash-object-id}

Lodash's `isEmpty()` function returns true for primitives and primitive wrappers.
`ObjectId()` is an object wrapper that is treated as a primitive by Mongoose.
Expand All @@ -534,7 +535,7 @@ if (!(val instanceof Types.ObjectId) && _.isEmpty(val)) {
}
```

## Removed `mongoose.modelSchemas` #{model-schemas}
## Removed `mongoose.modelSchemas` {#model-schemas}

The `mongoose.modelSchemas` property was removed. This may have been used to delete a model schema.

Expand All @@ -546,7 +547,6 @@ delete mongoose.modelSchemas.User;
delete mongoose.deleteModel('User');
```


## TypeScript changes

The `Schema` class now takes 3 generic params instead of 4. The 3rd generic param, `SchemaDefinitionType`, is now the same as the 1st generic param `DocType`. Replace `new Schema<UserDocument, UserModel, User>(schemaDefinition)` with `new Schema<UserDocument, UserModel>(schemaDefinition)`
Expand Down
2 changes: 1 addition & 1 deletion docs/migrating_to_7.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ If you want to use Bluebird for all promises globally, you can do the following:
global.Promise = require('bluebird');
```

## Deprecated `keepAlive` #{deprecated-keepalive}
## Deprecated `keepAlive` {#deprecated-keepalive}

Before Mongoose 5.2.0, you needed to enable the `keepAlive` option to initiate [TCP keepalive](https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html) to prevent `"connection closed"` errors.
However, `keepAlive` has been `true` by default since Mongoose 5.2.0, and the `keepAlive` is deprecated as of Mongoose 7.2.0.
Expand Down

0 comments on commit 4317850

Please sign in to comment.