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

[DEP0096] DeprecationWarning #2003

Closed
anotherhope opened this issue Apr 24, 2018 · 16 comments
Closed

[DEP0096] DeprecationWarning #2003

anotherhope opened this issue Apr 24, 2018 · 16 comments

Comments

@anotherhope
Copy link

@anotherhope anotherhope commented Apr 24, 2018

[DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
on mysql/lib/protocol/Protocol.js: Timers.unenroll(sequence);

NodeJS 10

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Apr 24, 2018

This module doesn't yet officially support Node.js 10, but if yourself or someone wants to volunteer to make the necessary changes, definitely welcome and the best way to move forward 👍

@dougwilson
Copy link
Member

@dougwilson dougwilson commented May 2, 2018

Unless someone knows another way, it's not really fixable in Node.js 10.0. The PR in Node.js nodejs/node#20298 is rolling and so we'll then have a non-deprecated API to use hopefully in some future 10.x release.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented May 9, 2018

Node.js 10.1 came out but not with the API we need, so we're still waiting for a Node.js release.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented May 23, 2018

To update this: the needed API has been merged into Node.js 10.x branch now, and so it will be available with Node.js 10.2 I presume. The code still needs to be changed in this module to use the new APIs. I'm going to take a look, but if anyone is inclined to do so, you're also welcome to open a pull request with Node.js 10.x compat 👍

@coreyfarrell
Copy link
Contributor

@coreyfarrell coreyfarrell commented May 25, 2018

@florenthagard not sure if github would have sent a notice so I'll comment here, I've created a PR that addresses nodejs 10 compatibility. semver 10.0 | 10.1 will still produce the deprecation warning as the new API is unavailable, the new API will be used by default for >=10.2. Compatibility is accomplished by creating a setTimeout and clearTimeout ponyfill. Both directly use the built-in nodejs functions if .refresh() is supported, otherwise both are re-implemented based on the deprecated API's.

I also fixed the error on test/unit/connection/test-connection-ssl-ciphers.js in nodejs 10. When I ran the test locally (using nvm on Fedora 28) RC4-SHA was not an available cipher so the test failed.

@yashwp
Copy link

@yashwp yashwp commented Jun 26, 2018

I facing the same issue.. Please tell me, when can I expect this to be updated??

@AlexanderProd
Copy link

@AlexanderProd AlexanderProd commented Jun 26, 2018

Same issue here, I'm wondering why the issue was closed.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jun 26, 2018

The PR was merged, which closed related issues automatically. I was mainly hoping someone would test it out. Would you be willing to test the fix to validate before release? Install instructions in the last section of https://github.com/mysqljs/mysql#install

@emirpalm
Copy link

@emirpalm emirpalm commented Jun 28, 2018

@dougwilson run npm console install mysqljs / mysql and correct the problem

@jediborre
Copy link

@jediborre jediborre commented Jul 18, 2018

Still In Node v10.6.0

(node:25325) [DEP0095] DeprecationWarning: timers.enroll() is deprecated. Please use setTimeout instead.
(node:25325) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jul 18, 2018

What version of this module are you using?

@jediborre
Copy link

@jediborre jediborre commented Jul 18, 2018

v2.15.0

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Jul 18, 2018

So 2.15.0 was published before Node.js 10 existed, let alone when this was fixed :) You just need to install the current version of this module to get the Node.js 10 support 👍

@jediborre
Copy link

@jediborre jediborre commented Jul 18, 2018

Working mysql@2.16.0

au5ton added a commit to au5ton/hatsume that referenced this issue Jul 25, 2018
@dragonfriend0013
Copy link

@dragonfriend0013 dragonfriend0013 commented Aug 6, 2018

I have updated to node v10.8.0 and mysql version 2.16.0 and i am still getting this warning. any thoughts?

@dougwilson
Copy link
Member

@dougwilson dougwilson commented Aug 6, 2018

Open a new issue with full code and steps to reproduce.

@mysqljs mysqljs locked as resolved and limited conversation to collaborators Aug 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

8 participants