-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Support node v13 #189
Comments
Would love to @pqvst but I didn't have time to track down what's causing the break! Attention All: Help WantedI need some help tracking down what's causing various tests to fail under Node v13! Whoever figures this one out gets my undying gratitude (and obviously mentions in the docs) ❤️ Contributing
|
I spent some time today looking at this, tests are broken on v13.0.0 as well as v13.8.0 (latest at time of writing). I'm mostly getting timeout errors from Mocha, suggesting that supertest is not resolving. I didn't have any luck hacking around that though (increasing mocha timeout to 30 seconds, manually calling I focused on |
It might be a problem with superagent. Some of their tests fail in very similar ways to the ones here on v13. Opened an issue there. I'm not sure if the above is responsible for all the fails, but wanted to share back what I've learned. |
I looked into this a bit... was able to get it (mostly) working by modifying these lines to be: if (requestEtag && cachedEtag === requestEtag) {
response.status(304)
response.set(headers)
// writehead needed for possible overrides by restify
response.writeHead(304)
return response.end()
}
response.status(cacheObject.status || 200)
response.set(headers)
// writehead needed for possible overrides by restify
response.writeHead(cacheObject.status || 200) Not sure why though, it seems like something goes weird with passing the headers in to writeHead. However, the restify+gzip test suite still fails, it seems like it's trying to parse the gzipped response as JSON, but I'm not entirely sure. Get errors like:
|
Since EOL for |
Thanks! I added the following debug lines to
And got the following output when running properly caches a request test:
|
#228 should fix this issue |
It would be great if the current latest release of node (v13) wasn't disallowed. What's blocking?
https://github.com/kwhitley/apicache/blob/master/package.json#L13
The text was updated successfully, but these errors were encountered: