{"id":18561267,"url":"https://github.com/apostrophecms/emulate-mongo-3-driver","last_synced_at":"2026-02-02T04:08:31.567Z","repository":{"id":233950328,"uuid":"787303692","full_name":"apostrophecms/emulate-mongo-3-driver","owner":"apostrophecms","description":"Emulate the Mongo 3.x nodejs driver on top of the Mongo 6.x nodejs driver, for bc ","archived":false,"fork":false,"pushed_at":"2024-07-19T17:31:31.000Z","size":241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T09:02:02.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apostrophecms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-16T09:14:44.000Z","updated_at":"2024-07-19T17:30:45.000Z","dependencies_parsed_at":"2024-06-28T16:14:36.323Z","dependency_job_id":"c04f1c4f-1112-4137-9425-7d581b60eada","html_url":"https://github.com/apostrophecms/emulate-mongo-3-driver","commit_stats":null,"previous_names":["apostrophecms/emulate-mongo-3-driver"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Femulate-mongo-3-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Femulate-mongo-3-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Femulate-mongo-3-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apostrophecms%2Femulate-mongo-3-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apostrophecms","download_url":"https://codeload.github.com/apostrophecms/emulate-mongo-3-driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243205154,"owners_count":20253420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T22:06:23.234Z","updated_at":"2026-02-02T04:08:31.501Z","avatar_url":"https://github.com/apostrophecms.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @apostrophecms/emulate-mongo-3-driver\n\n## Purpose\n\nYou have legacy code that depends on the 3.x version of the MongoDB Node.js driver.\nYou don't want to upgrade to the 6.x driver because of backwards compability problems in\n[v4](https://github.com/mongodb/node-mongodb-native/blob/v6.0.0/etc/notes/CHANGES_4.0.0.md),\n[v5](https://github.com/mongodb/node-mongodb-native/blob/v6.0.0/etc/notes/CHANGES_5.0.0.md),\n[v6](https://github.com/mongodb/node-mongodb-native/blob/v6.0.0/etc/notes/CHANGES_6.0.0.md)\nbut you don't have a choice because of reported vulnerabilities\nsuch as those detected by `npm audit`.\n\n`@apostrophecms/emulate-mongo-3-driver` aims to be a compatible emulation\nof the 3.x version of the MongoDB Node.js driver,\nimplemented as a wrapper for the 6.x driver.\n\nIt was created for long term support of [ApostropheCMS](https://apostrophecms.com).\nOf course, ApostropheCMS 3.x and 4.x will use the MongoDB 6.x driver directly.\n\n## Usage\n\nIf you are using ApostropheCMS, this is **standard** beginning\nwith versions 3.64.0+ and 4.2.0+. You don't have to do anything.\n\nThe example below is for those who wish to use this driver in non-ApostropheCMS projects.\n\n```sh\nnpm install @apostrophecms/emulate-mongo-3-driver\n```\n\n```javascript\nconst mongo = require('@apostrophecms/emulate-mongo-3-driver');\n\n// Use it here as if it were the 3.x driver\n```\n\n## Goals\n\nThis module aims for partial compatibility with the features mentioned\nas obsolete or changed in\n[v4](https://github.com/mongodb/node-mongodb-native/blob/v6.0.0/etc/notes/CHANGES_4.0.0.md),\n[v5](https://github.com/mongodb/node-mongodb-native/blob/v6.0.0/etc/notes/CHANGES_5.0.0.md),\n[v6](https://github.com/mongodb/node-mongodb-native/blob/v6.0.0/etc/notes/CHANGES_6.0.0.md)\nbut there are omissions.\n\nAn emphasis has been placed on features used by ApostropheCMS\nbut PRs for further compatibility are welcome.\n\n## What about those warnings?\n\n\"What about the warnings re: insert, update and ensureIndex operations being obsolete?\"\n\nAlthough deprecated, some of these operations are still supported by the 6.x driver\nand work just fine.\n\nHowever, since the preferred newer operations were also supported by the 3.x driver,\nthe path forward is clear.\n\nWe will migrate away from using them gradually, and you should do the same.\n\nIt doesn't make sense to provide \"deprecation-free\" wrappers\nwhen doing the right thing is in easy reach.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapostrophecms%2Femulate-mongo-3-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapostrophecms%2Femulate-mongo-3-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapostrophecms%2Femulate-mongo-3-driver/lists"}