winstonjs / winston-mongodb

A MongoDB transport for winston
https://github.com/winstonjs/winston-mongodb
295 stars 124 forks source link

[FIX]:NodeJS 20 Deprecation Warning DEP0170 #218 #296

Open Sakibdevlekar opened 4 months ago

Sakibdevlekar commented 4 months ago

Fix Deprecation Warning for MongoDB URL Parsing in winston-mongodb

Issue The recent Node.js version 20 and MongoDB driver updates have introduced a deprecation warning in winston-mongodb due to the use of deprecated APIs in the MongoDB driver.

Changes Made Updated the MongoDB URL parsing in winston-mongodb to resolve the deprecation warning. Used the latest MongoDB driver version to ensure compatibility and compliance with Node.js updates.

Additional Notes Tested the changes locally with Node.js version 20 and verified that the deprecation warning is no longer triggered. Ensured backward compatibility with previous Node.js and MongoDB versions. Updated dependencies and added necessary documentation or comments related to the fix.

Reviewer Instructions: Please review the changes and ensure compatibility with different Node.js and MongoDB versions. Verify that the deprecation warning is resolved and no new issues are introduced. Any feedback or suggestions are highly appreciated. @DABH