question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we deprecate this module since importing with `npm:mongodb` is working well with Deno?

See original GitHub issue

npm:mongodb pros:

  • almost all driver features are working for me
  • maintained by mongodb inc
  • universal api style for both node and deno

cons:

  • ~requried --unstable flag~ it’s not compatible with Deno Deploy for now
  • uses node’s Buffer instead of Uint8Array
  • uses node’s Stream instead of async iterator and WebStream
  • is not fast as x/mongo because uses node compat layer

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jtoppinecommented, Nov 26, 2022

Well, since this issue is in question format, might as well give my 2 cents.

It would be sad to see “native” deno mongo driver go, or fall into disrepair. Deno driver has the potential to be cleaner, prettier and faster, and the npm compatibility layer is big, complex and slow-ish to load.

It seems to also be true that there is a lack of maintainers to keep working on the Deno driver. And that it needs nontrivial amount of work to be good enough for widespread production use. Since the userbase is small for now, and the node driver is usable already as-is, it may be unrewarding to work on the Deno driver.

Maybe the best solution for now would be to put a big banner on the readme, with:

  • “call for maintainers”
  • a note about the deno driver being alpha/beta quality, maybe detailing some of the most important missing features (automatic reconnect etc)
  • a note to suggest regular users may want to use the NPM driver (for now)

This way regular users would not be discouraged from using Deno because of frustrating problems with unstable drivers. And there would be hope for the project to gain maintainers in the future, or even some “official” support from Mongo, eventually improving the driver beyond the NPM driver 😃

2reactions
lucsoftcommented, Sep 26, 2022

We can publish a new module on npm like mongodb-webified. It can benfites both worlds

i prefer that it stays here. Else people could be thinking that it’s not really made for Deno.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PermissionDenied error when using npm package #15798
Should we deprecate this module since importing with npm:mongodb is working well with Deno? denodrivers/mongo#380.
Read more >
esm@v100 - Deno
By default, esm.sh will rewrite import specifier based on the package's dependency statement. To specify version of dependencies, you can ...
Read more >
Mongoose - npm
Start using mongoose in your project by running `npm i mongoose`. ... import { createRequire } from "https://deno.land/std/node/module.ts"; ...
Read more >
Hello, Deno - Dan Vega
After you install it you can use the REPL (Read Evaluate Print Loop). This will allow you to test some code right from...
Read more >
What is Deno, and how is it different from Node.js?
When we start the application, Deno downloads all the imported modules and caches them. Once they are cached, Deno will not download them...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found