apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
MIT License
4.36k stars 591 forks source link

3.5: MongoDb driver deprecation warning #3474

Open myovchev opened 3 years ago

myovchev commented 3 years ago

To Reproduce

Start the application. The warning isConnected is deprecated and will be removed in the next major version is printed out in the console output.

Expected behavior

No deprecation warning.

Describe the bug

From the documentation of the currently used driver, isConnected method is deprecated and will be removed in the next major version.

If --trace-warnings is used when starting the app, it's seen the problem is caused by the direct apostrophe dependency connect-mongo@3.2.0 module used by Apostrophe. The isConnected use is removed in v4 of the module.

The migration to v4 of the module seems painless according to their migration guide

Details

Version of Node.js: v12.21.0

Apostrophe: apostrophe@3.5.0 (against main branch)

MongoDB driver: mongodb@3.7.2 (as reported by npm ls)

boutell commented 3 years ago

Yes just started seeing this too. Should be fine to upgrade in Apostrophe 3.x.

On Sun, Oct 10, 2021 at 7:11 AM Miro Yovchev @.***> wrote:

To Reproduce

Start the application. The warning isConnected is deprecated and will be removed in the next major version is printed out in the console output. Expected behavior

No deprecation warning. Describe the bug

From the documentation of the currently used driver https://mongodb.github.io/node-mongodb-native/3.6/reference/unified-topology/#mongoclient-connect-isconnected, isConnected method is deprecated and will be removed in the next major version.

If --trace-warnings is used when starting the app, it's seen the problem is caused by the direct apostrophe dependency @.*** module used by Apostrophe. The isConnected use is removed in v4 of the module.

The migration to v4 of the module seems painless according to their migration guide https://github.com/jdesboeufs/connect-mongo/blob/master/MIGRATION_V4.md Details

Version of Node.js: v12.21.0

Apostrophe: @.*** (against main branch)

MongoDB driver: @.*** (as reported by npm ls)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/3474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27IQ43I4XBVGPEWRFQLUGFYHTANCNFSM5FWLLTCA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--

THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his