Skip to content

Commit 1ae58b7

Browse files
authoredOct 25, 2023
Merge pull request #18 from contentstack/staging
Merge staging to master
2 parents 9259e1b + 554b08f commit 1ae58b7

File tree

5 files changed

+38
-34
lines changed

5 files changed

+38
-34
lines changed
 

‎package-lock.json

+34-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@contentstack/datasync-content-store-mongodb",
33
"author": "Contentstack Ecosystem <ecosystem@contentstack.com>",
4-
"version": "1.0.5",
4+
"version": "1.0.6",
55
"description": "Contentstack datasync's mongodb library. Helps to store contents in mongodb",
66
"main": "dist/index.js",
77
"dependencies": {
88
"debug": "^4.3.4",
99
"lodash": "^4.17.15",
10-
"mongodb": "^5.8.0"
10+
"mongodb": "^6.0.0"
1111
},
1212
"devDependencies": {
1313
"@types/debug": "0.0.31",

‎src/config.ts

-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ export const config = {
3333
// http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html
3434
options: {
3535
connectTimeoutMS: 15000,
36-
keepAlive: true,
3736
noDelay: true,
38-
useNewUrlParser: true,
3937
},
4038
unwantedKeys: {
4139
asset: {

‎src/mongodb.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export class Mongodb {
325325
})
326326
.then((result) => {
327327
debug(`Asset unpublish status: ${JSON.stringify(result)}`)
328-
if (result.value === null) {
328+
if (result === null) {
329329
return resolve(asset)
330330
}
331331

@@ -337,7 +337,7 @@ export class Mongodb {
337337
},
338338
locale: asset.locale,
339339
uid: asset.uid,
340-
url: result.value.url,
340+
url: result.url,
341341
})
342342
.toArray()
343343
.then((assets) => {

‎typings/config.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export declare const config: {
1313
dbName: string;
1414
options: {
1515
connectTimeoutMS: number;
16-
keepAlive: boolean;
1716
noDelay: boolean;
18-
useNewUrlParser: boolean;
1917
};
2018
unwantedKeys: {
2119
asset: {

0 commit comments

Comments
 (0)
Please sign in to comment.