File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11# bedrock-vc-status ChangeLog
22
3+ ## 1.1.1 - 2025-mm-dd
4+
5+ ### Fixed
6+ - Use ` result.modifiedCount ` to enable newer mongodb driver.
7+
38## 1.1.0 - 2025-02-27
49
510### Changed
Original file line number Diff line number Diff line change 11/*!
2- * Copyright (c) 2020-2024 Digital Bazaar, Inc. All rights reserved.
2+ * Copyright (c) 2020-2025 Digital Bazaar, Inc. All rights reserved.
33 */
44import * as bedrock from '@bedrock/core' ;
55import * as database from '@bedrock/mongodb' ;
@@ -76,7 +76,7 @@ export async function set({
7676 }
7777 } , { upsert : true } ) ;
7878
79- if ( result . result . n > 0 ) {
79+ if ( result . modifiedCount > 0 || result . upsertedCount > 0 ) {
8080 // document upserted or modified
8181 return true ;
8282 }
Original file line number Diff line number Diff line change 11/*!
2- * Copyright (c) 2020-2024 Digital Bazaar, Inc. All rights reserved.
2+ * Copyright (c) 2020-2025 Digital Bazaar, Inc. All rights reserved.
33 */
44import * as bedrock from '@bedrock/core' ;
55import * as database from '@bedrock/mongodb' ;
@@ -155,7 +155,7 @@ export async function set({
155155 $setOnInsert : { statusListId, indexAllocator, 'meta.created' : now }
156156 } , { upsert : true } ) ;
157157
158- if ( result . result . n > 0 ) {
158+ if ( result . modifiedCount > 0 || result . upsertedCount > 0 ) {
159159 // document upserted or modified: success; clear cache
160160 SLC_CACHE . delete ( statusListId ) ;
161161 return true ;
You can’t perform that action at this time.
0 commit comments