Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno Compatability #1246

Open
tracker1 opened this issue Apr 22, 2021 · 12 comments
Open

Deno Compatability #1246

tracker1 opened this issue Apr 22, 2021 · 12 comments

Comments

@tracker1
Copy link
Contributor

Just curious if there's been any consideration or research done to what would be needed to make this library work for Deno.

There's a stack overflow question[1] regarding this, that seems to be related to missing node crypto shims. Not sure if this is even realistically approachable currently, but would be cool if it were.

Mainly looking because I thought it would be nice if nessie[2] could support mssql for migrations.

[1] https://stackoverflow.com/questions/65762593/error-when-connecting-to-sql-server-in-deno-cannot-find-module-crypto
[2] https://github.com/halvardssm/deno-nessie

@tracker1
Copy link
Contributor Author

Aside, I've been doing a simple project, with version scripts via Node.js for database versions/migrarions, but being able to roll a standalone executable for this would be a really nice feature for me, that deno readily supports.

@IanChokS
Copy link
Member

I don't think we've ever considered providing support for Deno at the moment. If there's a lot of interest in the future, then perhaps? 🤷‍♂️

@sdesalas
Copy link

@coreybutler
Copy link

I think there is greater demand for this than may be apparent. I consistently hear things like "if Deno supported SQL Server, I'd drop Node for Deno right now". The challenge is many people in the Deno community don't think to look for "tedious"... they think to look for "mssql" or just "sql server". They simply aren't aware there is a project like this one, so you won't hear from them.

Anyhow, I'd be interested in Deno support.

@josh-hemphill
Copy link

josh-hemphill commented Aug 8, 2022

ESM.js does a lot of automatic conversions if you import from there, but it can't polyfill Node's dgram module which is where it gets hung up right now (gets much farther and just blocks on dns module if you use the unstable and compat flags).
Deno's FFI is really solid now. I wonder if in the meantime it would be possible to use system libs (.dll/.so) to access ODBC connections.

@josh-hemphill
Copy link

I just explored using denoify to create builds for Deno from the existing codebase.
You can check it out on my fork: https://github.com/josh-hemphill/tedious/tree/deno-testing
There's still a couple of libraries/ployfills that are missing a few properties, but I think that's all not too hard to overcome.
Though there's a lot of incompatibility in some of the older or deprecated Node APIs. I think it would help a lot to migrate to some of Node's newer more web-compliant APIs and change the TSC compiler settings to the more ESM-first ones.

@tracker1
Copy link
Contributor Author

tracker1 commented Aug 23, 2022

@josh-hemphill I've been thinking that a wasm target, or ffi bridge library to a binary built with rust might be the shortest path... Not sure how good the story is for that... would be nice to see some effort from MS on this, similar for a lot of the Azure client libraries at this point.

edit: https://github.com/prisma/tiberius

@josh-hemphill
Copy link

Yeah, I might look at that.
Deno recently said they're committing to making the Nodejs compat libraries cover most node packages, so we might eventually get the few remaining things resolved for using denoify, but there's still some incompatibility in the usage of deprecated APIs, so maybe a later version of Node may make this Deno compatible just by forcing the removal of deprecated APIs and moving to ESM-first in a lot of things.

@mikerobi
Copy link

mikerobi commented Jun 1, 2023

Here is the Deno issue for this: denoland/deno#18303

@tracker1
Copy link
Contributor Author

tracker1 commented Jun 2, 2023

@mikerobi thanks for the link to the upstream issue... I knew I was finally able to import the npm:mssql module without issue... looks like the starttls for npm compat still needs some work.

I find working with Deno a lot nicer than Node in general, but there's a lot of ground to move to get there for a lot of things. Fortunately, I'm not working with MS-SQL regularly in my current job.

@v1d3rm3
Copy link

v1d3rm3 commented May 24, 2024

I think there is greater demand for this than may be apparent. I consistently hear things like "if Deno supported SQL Server, I'd drop Node for Deno right now". The challenge is many people in the Deno community don't think to look for "tedious"... they think to look for "mssql" or just "sql server". They simply aren't aware there is a project like this one, so you won't hear from them.

Anyhow, I'd be interested in Deno support.

Totally agree! Ecosystem is fundamental. Look at Java, there're a lot of better/modern languages, but Java has the best ecosystem, so, a lot of companies use it.

@lroal
Copy link

lroal commented Dec 10, 2024

Does anyone know the status of Deno support ?
As a maintainer of Orange ORM, clients asks me to make it Deno compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants