-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
new release? #301
Comments
This is causing too much pain for everyone, including me. I'm going to abort on the remove-writestream changes that are currently blocking and we'll do a levelup@1.0.0 with what's currently in that branch I think, I'll try and propose a tip for that today and we can get agreement on release. |
I'm trying out |
For some reason this doesn't throw exception (in assert.exception(this.batch.put.bind(this.batch, 'foo1'), function (err) {
console.log('err.name', err.name, 'err.message', err.message)
if (err.name != 'WriteError')
return false
if ('value cannot be `null` or `undefined`' != err.message)
return false
return true
}) But this clearly does: var levelup = require('./')
var db = levelup('dbb')
var batch = db.batch()
batch.put.bind(batch, 'foo1')() |
Oh, I suspect this is related to abstract-leveldown not throwing an error if the value is not defined in a batch.put operation. I'm sure @rvagg knows exactly why this is happening. |
Think I understand why this is happening now. Feel free to correct me. In AbstractChainedBatch.prototype.put = function (key, value) {
this._checkWritten()
var err = this._db._checkKey(key, 'key', this._db._isBuffer)
if (err)
throw err
if (!this._db._isBuffer(key)) key = String(key)
if (!this._db._isBuffer(value)) value = String(value)
if (typeof this._put == 'function' )
this._put(key, value)
else
this._operations.push({ type: 'put', key: key, value: value })
return this
} We no longer throw an exception if value is @rvagg Should these failing tests in |
Updated |
Do we need to change anything in
node-levelup
in order to make it work withnode-leveldown@1.0.1
?It would be nice to release a new version of
node-levelup
-> solevel-packager
can be updated -> solevel
can be updated as well./cc @rvagg
The text was updated successfully, but these errors were encountered: