ohnx / c9-core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
0 stars 0 forks source link

node >= 14 breaks c9 #3

Open ohnx opened 2 years ago

ohnx commented 2 years ago

streams changed somewhere in node 14 [1] [2], breaking c9.

ohnx commented 2 years ago

Changes

writable.end([chunk[, encoding]][, callback]): The callback is invoked if 'finish' or 'error' is emitted.

grep -rin "\.end(" | grep "js:" | grep -v "test" | grep -v "min.js" | grep -v "typescript"


readable.destroy([error]) / writable.destroy([error]) / transform.destroy([error]): Work as a no-op on a stream that has already been destroyed.

grep -rin "\.destroy(" | grep "js:" | grep -v "test" | grep -v ":1:" | grep -v "typescript"


new stream.Readable([options]) / new stream.Writable([options]): Change autoDestroy option default to true. in 12.x this defaulted to false (or nonexistent)


stream.finished(stream[, options], callback): unlikely, feature was added in 10.0.0

The finished(stream, cb) will wait for the 'close' event before invoking the callback. The implementation tries to detect legacy streams and only apply this behavior to streams which are expected to emit 'close'.

Emitting 'close' before 'end' on a Readable stream will cause an ERR_STREAM_PREMATURE_CLOSE error.

Callback will be invoked on streams which have already finished before the call to finished(stream, cb).


stream.pipeline(streams, callback): unlikely, feature was added in 10.0.0

The pipeline(..., cb) will wait for the 'close' event before invoking the callback. The implementation tries to detect legacy streams and only apply this behavior to streams which are expected to emit 'close'.


ohnx commented 2 years ago

for now i just nvm'd back to node 12.x... but long-term, I need to fix this :(