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
Regression in .compact? #3350
Comments
In PouchDB 3.2.1, `compact` is returning `undefined` (on success) rather than a compaction response. See pouchdb/pouchdb#3350
Yep, I forgot to mention in the blog post that there is a migration. I'll fix that. As for |
So Changing it to the CouchDB-like |
Thanks for the heads up. 3.2.0 is resolving something like: {
id: '_local/compaction',
ok: true,
rev: '0-2'
} … which makes more sense to me than a straight |
@tlvince @marten-de-vries AFAIK the docs have always been silent about what the promise is supposed to resolve with. So I don't see it as a breaking change; just a bug. BTW I confirmed that
|
.compact returning `undefined` on success is the expected behaviour in PouchDB v3.2.1. Refs: pouchdb/pouchdb#3350 (comment)
@nolanlawson Alright, I see semver as a bit more strict (don't change return values of methods, period.) But on the other hand I can't see this breaking much except my Python-PouchDB tests, so I'm fine with |
Thanks, I would just prefer not to introduce a big version change for something that most people will not care about. 😛 Also my rule of thumb is that undocumented behavior is not something we need to adhere strictly to. :) |
* feature/3.2.1: (125 commits) (pouchdb#3095) - Use selenium-standalone to manage selenium (pouchdb#3364) - Update license, happy new year (pouchdb/express-pouchdb#164) - adds SERVER=express-pouchdb-minimum (pouchdb#3361) - remove PouchDB.extend (pouchdb#2632) - remove browserified Buffer from build (pouchdb#2632) - use bundle collapser to reduce min size (pouchdb#3155) - Replace syncStopped / started with active / paused (pouchdb#3350) - http compact() also returns {ok:true} (pouchdb#3350) - make compact return {ok: true} (pouchdb#136) - Skip "issue pouchdb#2393 update_seq after new_edits + replication" (pouchdb#3350) - add warning about 3.2.1 migration (pouchdb#3279) - update to 3.2.2-prerelease (pouchdb#3279) - 3.2.1 blog post (pouchdb#2632) - remove leveldb from browserify build (pouchdb#3345) - correctly report auto_compaction in info() (pouchdb#136) - Return correct checkpoint for CouchDB 2.x (pouchdb#136) - Fix "Replication since" / CouchDB 2.0 (pouchdb/mapreduce#239) - fix dep dbs with db/prefix option (pouchdb#136) - Fix "Reporting write failures (pouchdb#942)" (pouchdb#3326) - fix blob support in chrome ...
In PouchDB 3.2.1, `compact` is returning `undefined` (on success) rather than a compaction response. See pouchdb/pouchdb#3350
.compact returning `undefined` on success is the expected behaviour in PouchDB v3.2.1. Refs: pouchdb/pouchdb#3350 (comment)
Hi all, I'm not sure how to exactly articulate this, but this breaks existing code of mine completely. Some of you said that this would not be an actual regression but only in tests, so I wanted to let you know this isn't the case. I have my pouch db set to |
@davidpfahler that If you can provide a test case to reproduce, that would be great, although I understand that this kind of migration stuff is tricky. 😛 |
In 3.2.1, given:
… logs
undefined
. Same if I use callbacks. In 3.2.0, this is returning the_local/compaction
response as expected.NB, also note I'm seeing a possible migration error if I run the 3.2.0 test case after 3.2.1:
The text was updated successfully, but these errors were encountered: