node-oracledb icon indicating copy to clipboard operation
node-oracledb copied to clipboard

Please make node-oracledb compatible with bun

Open citron opened this issue 2 years ago • 2 comments

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

citron avatar Sep 16 '22 12:09 citron

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?

cjbj avatar Sep 16 '22 14:09 cjbj

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

pvenkatraman avatar Sep 17 '22 15:09 pvenkatraman

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.

sosoba avatar Sep 23 '22 07:09 sosoba

@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.

cjbj avatar Sep 23 '22 22:09 cjbj

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.

nya1 avatar Oct 01 '22 11:10 nya1

@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.

cjbj avatar Oct 02 '22 23:10 cjbj

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

sharadraju avatar Oct 11 '23 13:10 sharadraju