Skip to content

Commit

Permalink
Merge branch 'master' into denoToMMS
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Feb 7, 2023
2 parents d9a6de7 + cad5d19 commit 7900274
Show file tree
Hide file tree
Showing 95 changed files with 1,460 additions and 965 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
runs-on: ubuntu-20.04
name: Benchmark TypeScript Types
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 16

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
runs-on: ubuntu-20.04
name: Test Generating Docs
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 16

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
name: Lint JS-Files
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 14

Expand Down Expand Up @@ -59,10 +59,10 @@ jobs:
MONGOMS_VERSION: ${{ matrix.mongodb }}
MONGOMS_PREFER_GLOBAL_PATH: 1
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -94,9 +94,9 @@ jobs:
MONGOMS_VERSION: 6.0.0
MONGOMS_PREFER_GLOBAL_PATH: 1
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.0.2
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 16
- name: Load MongoDB binary cache
Expand All @@ -120,9 +120,9 @@ jobs:
runs-on: ubuntu-latest
name: Replica Set tests
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 16
- run: npm install
Expand All @@ -137,6 +137,6 @@ jobs:
contents: read
steps:
- name: Check out repo
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Dependency review
uses: actions/dependency-review-action@v3
4 changes: 2 additions & 2 deletions .github/workflows/tidelift-alignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
if: github.repository == 'Automattic/mongoose'
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 16
- name: Alignment
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
name: Lint TS-Files
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 14

Expand All @@ -40,10 +40,10 @@ jobs:
runs-on: ubuntu-latest
name: Test Typescript Types
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Setup node
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 12

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ coverage
npm-debug.log
data/
.nyc_output/

.env
tools/31*

# Visual Studio
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
6.9.1 / 2023-02-06
==================
* fix(document): isModified should not be triggered when setting a nested boolean to the same value as previously #12994 [lpizzinidev](https://github.com/lpizzinidev)
* fix(document): save newly set defaults underneath single nested subdocuments #13002 #12905
* fix(update): handle custom discriminator model name when casting update #12947 [wassil](https://github.com/wassil)
* fix(connection): handles unique autoincrement ID for connections #12990 [lpizzinidev](https://github.com/lpizzinidev)
* fix(types): fix type of options of Model.aggregate #12933 [ghost91-](https://github.com/ghost91-)
* fix(types): fix "near" aggregation operator input type #12954 [Jokero](https://github.com/Jokero)
* fix(types): add missing Top operator to AccumulatorOperator type declaration #12952 [lpizzinidev](https://github.com/lpizzinidev)
* docs(transactions): added example for Connection.transaction() method #12943 #12934 [lpizzinidev](https://github.com/lpizzinidev)
* docs(populate): fix out of date comment referencing onModel property #13000
* docs(transactions): fix typo in transactions.md #12995 [Parth86](https://github.com/Parth86)

6.9.0 / 2023-01-25
==================
* feat(schema): add removeVirtual(path) function to schema #12920 [IslandRhythms](https://github.com/IslandRhythms)
* fix(cast): remove empty `$or` conditions after strict applied #12898 [0x0a0d](https://github.com/0x0a0d)
* docs: fixed typo #12946 [Gbengstar](https://github.com/Gbengstar)

6.8.5 / 2023-01-23
==================
* fix(query): correctly pass context when casting $elemMatch #12915 #12909 #12902 [MohOraby](https://github.com/MohOraby)

6.8.4 / 2023-01-17
==================
* fix(collection): handle creating model when connection disconnected with bufferCommands = false #12889
* fix(populate): merge instead of overwrite when match is on _id #12891
* fix: add guard to stop loadClass copying Document if Document is used as base of loaded class (same hack as implemented for Model already) #12820 [sgpinkus](https://github.com/sgpinkus)
* fix(types): correctly infer types on document arrays #12884 #12882 [JavaScriptBach](https://github.com/JavaScriptBach)
* fix(types): added omit for ArraySubdocument type in LeanType declaration #12903 [piyushk96](https://github.com/piyushk96)
* fix(types): add returnDocument type safety #12906 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
* docs(typescript): add notes about virtual context to Mongoose 6 migration and TypeScript virtuals docs #12912 #12806
* docs(schematypes): removed dead link and fixed formatting #12897 #12885 [lpizzinidev](https://github.com/lpizzinidev)
* docs: fix link to lean api #12910 [manniL](https://github.com/manniL)
* docs: list all possible strings for schema.pre in one place #12868
* docs: add list of known incompatible npm packages #12892 [IslandRhythms](https://github.com/IslandRhythms)

6.8.3 / 2023-01-06
==================
* perf: improve performance of assignRawDocsToIdStructure for faster populate on large docs #12867 [Uzlopak](https://github.com/Uzlopak)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Mongoose 6.0.0 was released on August 24, 2021. You can find more details on [ba
- [Bug Reports](https://github.com/Automattic/mongoose/issues/)
- [Mongoose Slack Channel](http://slack.mongoosejs.io/)
- [Help Forum](http://groups.google.com/group/mongoose-orm)
- [MongoDB Support](https://docs.mongodb.org/manual/support/)
- [MongoDB Support](https://www.mongodb.com/docs/manual/support/)

## Plugins

Expand Down Expand Up @@ -96,7 +96,7 @@ await mongoose.connect('mongodb://127.0.0.1/my_database');

Once connected, the `open` event is fired on the `Connection` instance. If you're using `mongoose.connect`, the `Connection` is `mongoose.connection`. Otherwise, `mongoose.createConnection` return value is a `Connection`.
**Note:** _If the local connection fails then try using 127.0.0.1 instead of 127.0.0.1. Sometimes issues may arise when the local hostname has been changed._
**Note:** _If the local connection fails then try using 127.0.0.1 instead of localhost. Sometimes issues may arise when the local hostname has been changed._
**Important!** Mongoose buffers all the commands until it's connected to the database. This means that you don't have to wait until it connects to MongoDB in order to define models, run queries, etc.
Expand Down
4 changes: 2 additions & 2 deletions docs/change-streams.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Change Streams

[Change streams](https://www.mongodb.com/developer/quickstart/nodejs-change-streams-triggers/) let you listen for updates to documents in a given model's collection, or even documents in an entire database.
[Change streams](https://www.mongodb.com/developer/languages/javascript/nodejs-change-streams-triggers/) let you listen for updates to documents in a given model's collection, or even documents in an entire database.
Unlike [middleware](middleware.html), change streams are a MongoDB server construct, which means they pick up changes from anywhere.
Even if you update a document from a MongoDB GUI, your Mongoose change stream will be notified.

Expand Down Expand Up @@ -81,4 +81,4 @@ exports.handler = async (event, context) => {
resumeAfter = changeStream.resumeToken;
await changeStream.close();
};
```
```
2 changes: 1 addition & 1 deletion docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</style>

Mongoose relies on the [MongoDB Node.js Driver](http://mongodb.github.io/node-mongodb-native/) to talk to MongoDB.
You can refer to [this table](https://docs.mongodb.com/drivers/node/current/compatibility/) for up-to-date information as to which version of the MongoDB driver supports which version of MongoDB.
You can refer to [this table](https://www.mongodb.com/docs/drivers/node/current/compatibility/) for up-to-date information as to which version of the MongoDB driver supports which version of MongoDB.

Below are the [semver](http://semver.org/) ranges representing which versions of mongoose are compatible with the listed versions of MongoDB server.

Expand Down
Loading

0 comments on commit 7900274

Please sign in to comment.