sqlanywhere / node-sqlanywhere

SAP SQL Anywhere Database Client for Node
Apache License 2.0
39 stars 36 forks source link

fix: made to work with node 14+ #43

Open pkeuter opened 2 years ago

pkeuter commented 2 years ago

Updated to also work with node 16. Please note that this MR will drop support for Node versions below 14. Additionally, it might be a good idea to migrate to node-addon-api eventually. Node 12 and 14 are currently in maintenance mode and maintenance for 12 will end in April next year (https://nodejs.org/en/about/releases/)

pkeuter commented 2 years ago

Supersedes https://github.com/sqlanywhere/node-sqlanywhere/pull/39

DanCummins-SAP commented 2 years ago

Updated to also work with node 16. Please note that this MR will drop support for Node versions below 14. Additionally, it might be a good idea to migrate to node-addon-api eventually. Node 12 and 14 are currently in maintenance mode and maintenance for 12 will end in April next year (https://nodejs.org/en/about/releases/)

Hi Peter,

Thanks for the work. Am I to understand that this change will break node 10, node 12, node 14 ? I discussed with my team and we don't want to merge changes to master that affect our compatibility matrix. We want to wait a longer time after a node version is EOL before making incompatible changes.

In the meantime I am glad that you are sharing this work.

Kind regards, Dan

pkeuter commented 2 years ago

Hi @DanCummins-SAP! I have tested this on node 14 and 16 and this is known to work. It might also build perfectly fine on node 12 and 10, but I don't know since I have not tested. Node 10 support has ended already (it is not even on the compatibility-matrix anymore) and node 12 support will end in april of 2022.

I mean I understand that you don't want to break the compatibility-matrix, but currently most of the supported node versions (14, 16 and 17) are not supported by this library (see https://nodejs.org/en/about/releases/).

If you were to release this as a major version bump, users still have an option (they can use the old major version) and, more importantly, are still able to use your databases with the more actual versions of nodejs.

fanjian5i5i commented 2 years ago

Hi, I had really successful dev times with the 39 pull request. But recently decided to try upgrade node and install the 43 pull request. It looks like npm is having hard time finding the git repo. I run "npm install sqlanywhere/node-sqlanywhere#pull/43/head" and the error I'm getting is "npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno ENOENT npm ERR! enoent Error while executing: npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/sqlanywhere/node-sqlanywhere.git npm ERR! enoent npm ERR! enoent npm ERR! enoent spawn git ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent"

Please help out.

pkeuter commented 2 years ago

@fanjian5i5i It looks like your npm installation is having a hard time finding the git binary. I would look into my npm config if I were you. Doesn't seem to have anything to do with the PR.

fanjian5i5i commented 2 years ago

@fanjian5i5i It looks like your npm installation is having a hard time finding the git binary. I would look into my npm config if I were you. Doesn't seem to have anything to do with the PR.

Thanks so much for your response. I updated node to 16 and npm to 8 and it did find the git repo and install the pull request

Megapixel99 commented 10 months ago

Are there any plans to merge this PR or update this repo to work on the current versions of NodeJS? Node 14 has been EOL since April 2023 and Node 16 was marked as EOL a few months ago in September 2023. As far as I can tell this PR works for Node 16, 18, and 20, though I did not test thoroughly.

For a full list of EOL dates please see: https://github.com/nodejs/Release#end-of-life-releases