Skip to content

Commit 15b3a38

Browse files
authored
Merge branch 'master' into add-typehint
2 parents 61ad105 + c463e45 commit 15b3a38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1391
-422
lines changed

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
runs-on: ubuntu-20.04
2323
name: Benchmark TypeScript Types
2424
steps:
25-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
25+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626
with:
2727
fetch-depth: 0
2828
- name: Setup node
29-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
29+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
3030
with:
3131
node-version: 16
3232

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
24+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2525

2626
# Initializes the CodeQL tools for scanning.
2727
- name: Initialize CodeQL

.github/workflows/documentation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
runs-on: ubuntu-latest
2929
name: Lint Markdown files
3030
steps:
31-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
31+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3232

3333
- name: Setup node
34-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
34+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
3535
with:
3636
node-version: 16
3737

@@ -48,11 +48,11 @@ jobs:
4848
runs-on: ubuntu-20.04
4949
name: Test Generating Docs
5050
steps:
51-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
51+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5252
- run: git fetch --depth=1 --tags # download all tags for documentation
5353

5454
- name: Setup node
55-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
55+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
5656
with:
5757
node-version: 16
5858

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
runs-on: ubuntu-latest
2323
name: Lint JS-Files
2424
steps:
25-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
25+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626

2727
- name: Setup node
28-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
28+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
2929
with:
3030
node-version: 18
3131

@@ -58,10 +58,10 @@ jobs:
5858
MONGOMS_PREFER_GLOBAL_PATH: 1
5959
FORCE_COLOR: true
6060
steps:
61-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
61+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6262

6363
- name: Setup node
64-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
64+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
6565
with:
6666
node-version: ${{ matrix.node }}
6767

@@ -94,9 +94,9 @@ jobs:
9494
MONGOMS_PREFER_GLOBAL_PATH: 1
9595
FORCE_COLOR: true
9696
steps:
97-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
97+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
9898
- name: Setup node
99-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
99+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
100100
with:
101101
node-version: 16
102102
- name: Load MongoDB binary cache
@@ -122,9 +122,9 @@ jobs:
122122
env:
123123
FORCE_COLOR: true
124124
steps:
125-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
125+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
126126
- name: Setup node
127-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
127+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
128128
with:
129129
node-version: 16
130130
- run: npm install
@@ -139,6 +139,6 @@ jobs:
139139
contents: read
140140
steps:
141141
- name: Check out repo
142-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
142+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
143143
- name: Dependency review
144144
uses: actions/dependency-review-action@v3

.github/workflows/tidelift-alignment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
if: github.repository == 'Automattic/mongoose'
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
18+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1919
- name: Setup node
20-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
20+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
2121
with:
2222
node-version: 16
2323
- name: Alignment

.github/workflows/tsd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
runs-on: ubuntu-latest
2323
name: Lint TS-Files
2424
steps:
25-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
25+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626

2727
- name: Setup node
28-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
28+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
2929
with:
3030
node-version: 18
3131

@@ -40,10 +40,10 @@ jobs:
4040
runs-on: ubuntu-latest
4141
name: Test Typescript Types
4242
steps:
43-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
43+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4444

4545
- name: Setup node
46-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
46+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
4747
with:
4848
node-version: 14
4949

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
1+
8.0.2 / 2023-11-28
2+
==================
3+
* fix(populate): set populated docs in correct order when populating virtual underneath doc array with justOne #14105
4+
* fix(populate): fix curPath to update appropriately #14099 #14098 [csy1204](https://github.com/csy1204)
5+
* types: make property names show up in intellisense for UpdateQuery #14123 #14090
6+
* types(document): correct return type for doc.deleteOne() re: Mongoose 8 breaking change #14110 #14081
7+
* types: correct types for when includeResultMetadata: true is set #14078
8+
* types(models): allow specifying timestamps as inline option for bulkWrite() operations #14112 #14072
9+
* docs: fix rendering of 7.x server compatibility #14086 [laupow](https://github.com/laupow)
10+
* docs(source/api): fix "index.js" -> "mongoose.js" rename #14125
11+
* docs(README): update breaking change version #14126
12+
13+
7.6.6 / 2023-11-27
14+
==================
15+
* perf: avoid double-running setter logic when calling `push()` #14120 #11380
16+
* fix(populate): set populated docs in correct order when populating virtual underneath doc array with justOne #14105 #14018
17+
* fix: bump mongodb driver -> 5.9.1 #14084 #13829 [lorand-horvath](https://github.com/lorand-horvath)
18+
* types: allow defining document array using [{ prop: String }] syntax #14095 #13424
19+
* types: correct types for when includeResultMetadata: true is set #14078 #13987 [prathamVaidya](https://github.com/prathamVaidya)
20+
* types(query): base filters and projections off of RawDocType instead of DocType so autocomplete doesn't show populate #14118 #14077
21+
* types: make property names show up in intellisense for UpdateQuery #14123 #14090
22+
* types(model): support calling Model.validate() with pathsToSkip option #14088 #14003
23+
* docs: remove "DEPRECATED" warning mistakenly added to read() tags param #13980
24+
25+
8.0.1 / 2023-11-15
26+
==================
27+
* fix: retain key order with aliases when creating indexes with alias #14042 [meabed](https://github.com/meabed)
28+
* fix: handle nonexistent collection with diffIndexes #14029 #14010
29+
* types(model+query): correctly remove count from TypeScript types to reflect removal of runtime support #14076 #14067 #14062
30+
* types: correct `this` parameter for methods and statics #14028 #14027 [ruxxzebre](https://github.com/ruxxzebre)
31+
* types(model+query): unpack arrays in distinct return type #14047 #14026
32+
* types: add missing Types.UUID typings #14023 #13103 [k725](https://github.com/k725)
33+
* docs: add mongoose 8 to mongodb server compatibility guide #14064
34+
* docs: fix typo in queries.md #14065 [MuhibAhmed](https://github.com/MuhibAhmed)
35+
36+
7.6.5 / 2023-11-14
37+
==================
38+
* fix: handle update validators and single nested doc with numeric paths #14066 #13977
39+
* fix: handle recursive schema array in discriminator definition #14068 #14055
40+
* fix: diffIndexes treats namespace error as empty #14048 #14029
41+
* docs(migrating_to_7): add note about requiring new with ObjectId #14021 #14020
42+
43+
6.12.3 / 2023-11-07
44+
===================
45+
* fix(ChangeStream): correctly handle hydrate option when using change stream as stream instead of iterator #14052
46+
* fix(schema): fix dangling reference to virtual in tree after `removeVirtual()` #14019 #13085
47+
* fix(document): avoid unmarking modified on nested path if no initial value stored and already modified #14053 #14024
48+
* fix(document): consistently avoid marking subpaths of nested paths as modified #14053 #14022
49+
50+
8.0.0 / 2023-10-31
51+
==================
52+
* docs: add version support notes for Mongoose 8, including EOL date for Mongoose 6
53+
54+
7.6.4 / 2023-10-30
55+
==================
56+
* fix(connection): retain modified status for documents created outside a transaction during transaction retries #14017 #13973
57+
* fix(schema): handle recursive schemas in discriminator definitions #14011 #13978
58+
* fix: handle casting $or underneath $elemMatch #14007 #13974
59+
* fix(populate): allow using options: { strictPopulate: false } to disable strict populate #13863
60+
* docs: fix differences between sample codes and documentation #13998 [suzuki](https://github.com/suzuki)
61+
* docs: fix missing import and change wrong variable name #13992 [suzuki](https://github.com/suzuki)
62+
63+
6.12.2 / 2023-10-25
64+
===================
65+
* fix: add fullPath to ValidatorProps #13995 [Freezystem](https://github.com/Freezystem)
66+
167
8.0.0-rc0 / 2023-10-24
268
======================
369
* BREAKING CHANGE: use MongoDB node driver 6, drop support for rawResult option and findOneAndRemove() #13753
@@ -33,6 +99,11 @@
3399
* types(models): add cleaner type definitions for insertMany() with no generics to prevent errors when using insertMany() in generic classes #13964 #13957
34100
* types(schematypes): allow defining map path using type: 'Map' in addition to type: Map #13960 #13755
35101

102+
6.12.1 / 2023-10-12
103+
===================
104+
* fix(mongoose): correctly handle global applyPluginsToChildSchemas option #13945 #13887 [hasezoey](https://github.com/hasezoey)
105+
* fix: Document.prototype.isModified support for a string of keys as first parameter #13940 #13674 [k-chop](https://github.com/k-chop)
106+
36107
7.6.1 / 2023-10-09
37108
==================
38109
* fix: bump bson to match mongodb@5.9.0 exactly #13947 [hasezoey](https://github.com/hasezoey)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ Anyone can file an expense. If the expense makes sense for the development of th
8080
### Contributors
8181

8282
Thank you to all the people who have already contributed to mongoose!
83-
<a href="https://github.com/Automattic/mongoose/graphs/contributors"><img src="https://opencollective.com/mongoose/contributors.svg?width=890" /></a>
83+
<a href="https://github.com/Automattic/mongoose/graphs/contributors"><img src="https://opencollective.com/mongoose/contributors.svg?width=890" alt="Mongoose contributors" /></a>
8484

8585
### Backers
8686

8787
Thank you to all our backers! [[Become a backer](https://opencollective.com/mongoose#backer)]
8888

89-
<a href="https://opencollective.com/mongoose#backers" target="_blank"><img src="https://opencollective.com/mongoose/backers.svg?width=890"></a>
89+
<a href="https://opencollective.com/mongoose#backers" target="_blank"><img src="https://opencollective.com/mongoose/backers.svg?width=890" alt="Mongoose backers"></a>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Mongoose is a [MongoDB](https://www.mongodb.org/) object modeling tool designed
1313

1414
The official documentation website is [mongoosejs.com](http://mongoosejs.com/).
1515

16-
Mongoose 7.0.0 was released on February 27, 2023. You can find more details on [backwards breaking changes in 7.0.0 on our docs site](https://mongoosejs.com/docs/migrating_to_7.html).
16+
Mongoose 8.0.0 was released on October 31, 2023. You can find more details on [backwards breaking changes in 8.0.0 on our docs site](https://mongoosejs.com/docs/migrating_to_8.html).
1717

1818
## Support
1919

docs/compatibility.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ You can refer to [this table](https://www.mongodb.com/docs/drivers/node/current/
1616

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

19-
| MongoDB Server | Mongoose |
20-
| :------------: | :---------------------------: |
21-
| `7.x` | `^7.4.0` |
22-
| `6.x` | `^6.5.0 \| ^7.0.0` |
23-
| `5.x` | `^6.0.0 \| ^7.0.0` |
24-
| `4.4.x` | `^5.10.0 \| ^6.0.0 \| ^7.0.0` |
25-
| `4.2.x` | `^5.7.0 \| ^6.0.0 \| ^7.0.0` |
26-
| `4.0.x` | `^5.2.0 \| ^6.0.0 \| ^7.0.0` |
27-
| `3.6.x` | `^5.0.0 \| ^6.0.0 \| ^7.0.0` |
28-
| `3.4.x` | `^4.7.3 \| ^5.0.0` |
29-
| `3.2.x` | `^4.3.0 \| ^5.0.0` |
30-
| `3.0.x` | `^3.8.22 \| ^4.0.0 \| ^5.0.0` |
31-
| `2.6.x` | `^3.8.8 \| ^4.0.0 \| ^5.0.0` |
32-
| `2.4.x` | `^3.8.0 \| ^4.0.0` |
19+
| MongoDB Server | Mongoose |
20+
| :------------: | :-------------------------------------: |
21+
| `7.x` | `^7.4.0 \| ^8.0.0` |
22+
| `6.x` | `^6.5.0 \| ^7.0.0 \| ^8.0.0` |
23+
| `5.x` | `^6.0.0 \| ^7.0.0 \| ^8.0.0` |
24+
| `4.4.x` | `^5.10.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` |
25+
| `4.2.x` | `^5.7.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` |
26+
| `4.0.x` | `^5.2.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` |
27+
| `3.6.x` | `^5.0.0 \| ^6.0.0 \| ^7.0.0 \| ^8.0.0` |
28+
| `3.4.x` | `^4.7.3 \| ^5.0.0` |
29+
| `3.2.x` | `^4.3.0 \| ^5.0.0` |
30+
| `3.0.x` | `^3.8.22 \| ^4.0.0 \| ^5.0.0` |
31+
| `2.6.x` | `^3.8.8 \| ^4.0.0 \| ^5.0.0` |
32+
| `2.4.x` | `^3.8.0 \| ^4.0.0` |
3333

3434
Note that Mongoose `5.x` dropped support for all versions of MongoDB before `3.0.0`. If you need to use MongoDB `2.6` or older, use Mongoose `4.x`.

0 commit comments

Comments
 (0)