-
Notifications
You must be signed in to change notification settings - Fork 102
Description
This module seems not to be compatible with Node versions >= 9.
Executing npm run test with node version 9.2.0 results in various errors:
(Part of npm run test)
root@b80709335c29:/pngjs# node_modules/tape/bin/tape test/convert-images-spec.js
Converting images
TAP version 13
# convert sync - PngSuite.png
/usr/local/bin/node[730]: ../src/node_zlib.cc:189:static void node::{anonymous}::ZCtx::Write(const v8::FunctionCallbackInfo<v8::Value>&) [with bool async = false]: Assertion `Buffer::HasInstance(args[4])' failed.
1: node::Abort() [node]
2: node::Assert(char const* const (*) [4]) [node]
3: 0x1258860 [node]
4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
5: 0xb77f9c [node]
6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [node]
7: 0x15e5b77042fd
Aborted (core dumped)
For me they seem to be related to nodejs/node#13322 and therefore with this commit: nodejs/node@add4b0a
There the interface used in lib/sync-inflate.js changes, therefore the first line failing is line 106 (on current master).
By changing line 110 and 111 to use the new internal variable names it is at least possible to circumvent the program exception (by breaking backward compatibility). But then there are several other errors which are not as easy to fix (as far as I have seen).
I'm not sure how to fix this issue by maintaining backward compatibility because there does not seem to exists an "easy" fix to support the new interface. I'm also not sure whether it is necessary to work with the internal state of zlib and not using the official API (which did not change I believe).
Probably someone of the project maintainers could take a look into it or could just shortly write how they plan to make the module ready for Node 9. Probably I am just overlooking something.