oracle / node-oracledb

Oracle Database driver for Node.js maintained by Oracle Corp.
http://oracle.github.io/node-oracledb/
Other
2.24k stars 1.07k forks source link

Please make node-oracledb compatible with bun #1519

Closed citron closed 9 months ago

citron commented 1 year ago

BUN is getting traction and is a fast alternative to node.js and deno. Sadly, when invoked with bun instead of node, any code using node-oracledb send an exception : NJS-069: node-oracledb 5.5.0 requires Node.js 8.16 or later Why ? because oracledb.js explicitely reject it. See lines 25-36 in oracledb.js

Please make node-oracledb compatible with BUN

cjbj commented 1 year ago

This sounds like something that would make a perfect community contribution from an expert in BUN. Can you sign the OCA and submit a PR?

pvenkatraman commented 1 year ago

You can modify oracledb.js lines 25-36: You can use process.execPath to see absolute pathname of Node.js process. If this contains "node" you can continue with existing minimum version check, Similarly you can add check for BUN and minimum version check. Remember on Windows it would be NODE.EXE

sosoba commented 1 year ago

By the way. How is the work on the thin driver progressing? Inherently, it will be less related to Node and more appropriate to alternative ES runtimes.

cjbj commented 1 year ago

@sosoba Proof of concept looks fine. We are almost at the stage where we know what internal approvals & signoffs we need. Hopefully this will be smooth since python-oracledb has set a precedent. Cross your fingers.

nya1 commented 1 year ago

Hello, I'm actively working on this, there are some compatibility issues and crashes that I'm reporting to Bun, in the coming days I will open a WIP PR.

cjbj commented 1 year ago

@nya1 Thanks for the contribution. For us, it's very important that you sign the OCA noted in the PR, otherwise we can't merge your changes - which would be a pity.

sharadraju commented 9 months ago

I am closing this issue as the BUN-related PR #1601 has been fixed in node-oracledb 6.2