Closed vweevers closed 6 years ago
Would it be a breaking change, or rather a long outstanding bug fix? 🤔
It's a breaking change per semver because implementations would have to change their function signature to _write(options, callback)
.
Hmm I think I've seen an issue on this before, but can't remember where. leveldown
would not be affected though:
I guess the c++ code must check for this.
@ralphtheninja hmm wait, if leveldown's signature is already _write(options, callback)
.. why does that work?
Ah, the C++ takes the first argument as a callback. So it would break leveldown.
Discovered in https://github.com/Level/abstract-leveldown/issues/193#issuecomment-359369932. If
_write
is defined, it does not receive theoptions
, unlike_batch
:https://github.com/Level/abstract-leveldown/blob/0d942fd45df5c9915269ded6f0f76fdfade11575/abstract-chained-batch.js#L79-L83
Fixing this would be a breaking change. WDYT @ralphtheninja @juliangruber?