-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Doesn't work with weak
on Node 12
#8397
Comments
Very much open to switching! |
FWIW I flagged this here: nodejs/node#25060 (comment) |
👋 FWIW I continue to have a good experience with |
Wanted to add node 12 to our test matrix, and it fails due to being unable to install |
@SimenB Hi, I have a question about we can require the package based Node version? |
sure |
Thank you @SimenB , I waiting to try Jest run in the new Node version. |
I tried this here: https://github.com/SimenB/jest/tree/weak-napi But the tests fail... Not sure if it's a bug in the napi implementation or not |
It's also possible to solve this by replacing "weak": "github:lxe/node-weak#node-12" |
That can probably be done using the resolutions field if using yarn as well |
Solved by #8686, which will be available in Jest 25 (at some point, hope to get an alpha out soonish, though) |
The choice I could probably get the permission(s) required, but I'd rather not go through that process. Is there an alternative to |
I opened up a PR 2 minutes ago which makes it optional. 😅 #8869. It means you won't be able to use
AFAIK, not really - at least not in a way that'll allow you to use it without compilation - it's a C++ API so we have to build a native addon for it |
In which version of Jest is it available after all? Latest release was on Aug 15, so looks like this fix has not been released yet? |
Are there any news? I still don't see any releases since August. |
I'm trying jest@25.0.0 available from npm, and it seems to work with node v12 but when I use the |
can you provide a mini repo to reproduce? |
@lamhieu-vk https://github.com/dylanwulf/jest-25-detect-leak When using jsdom or jest-environment-jsdom-sixteen it reports a memory leak even though the only thing in the test is a console log. When using the node environment, it does not report a leak. |
@dylanwulf mind opening up a new issue with that? Seems like we're doing something the the globals in jsdom that we don't clean up properly 🙂 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Jest has
--detectLeaks
amazing feature that is powered byweak
npm package.The problem is that
weak
doesn't work with Node 12 (I've opened an issue there: TooTallNate/node-weak#99).The best way would be for them to fix it. But, it looks not very maintained ATM.
At the same time I found that @danfuzz there suggesting to use other package as API-compatible replacement for weak that is using a sustainable NAPI: https://github.com/node-ffi-napi/weak-napi
Should we consider to try it and if it works to switch Jest to use that package instead?
The text was updated successfully, but these errors were encountered: