-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fresh version schema #20
base: master
Are you sure you want to change the base?
Conversation
…allow a sequence of upgrades which can support promises returned by `addCallback` callbacks (and add docs and tests for multiple promise-based callbacks on different versions); Commenting: Indicate specific Safari bug within code; Refactoring: Use ES6 `Array.from`; add `Number.isInteger` and ES7 `Object.values()` in place of npm modules (requires babel-polyfill); Testing: Split off local testing from Sauce; prevent blocking; increase timeout for Firefox; add test to throw with previous version
…ted `addCallback` ones, can themselves use idb-schema methods (e.g., to convert from JSON to idb-schema) though, since they execute within `upgradeneeded` cannot support Promises (as can the callbacks within `addCallback` when `schema.open` or `schema.upgrade` are used); document
… added previously) - If `delStore` does throw later (or if there is any other upgrade error), the error can be caught by `callback` or `open`/`upgrade` - Feature: Support `errBack` to `callback` - Expand callback, delStore docs
… at run-time); Fix: Allow stores and indexes to be an empty string; Fix: allow empty-string key path (unless with autoIncrement); Fix: disallow autoIncrement with array keyPath but enable for non-empty strings (as permitted by spec--keys overridable on put()/add()) Testing: Add tests for above
…n so that one can delete old stores or indexes and recreate them if desired (add tests); - Refactoring: Put schema.open/schema.upgrade tests in own "describe" section
… order, but the getter will continue to get the highest version. To get the current rather than highest version, the method `lastEnteredVersion()` has been added. - Refactoring: better default behavior for getJSONStorage internal method
`copyFrom` option to `addStore`)
…eeded) callback iteration (so they can operate on their version); - Iterate over versions rather than objects (to ensure not working on a stale object) - Update babel-polyfill version
afb593f
to
67462bc
Compare
Hi--when do you think you might get to taking a look at these PRs (as well as the PRs for idb-batch and idb-factory)? |
Hey Brett, |
Hi Aleksey, No worries, you've saved me a lot of time with such excellent work. I'm particularly intrigued now by idb-polyfill which I had not really taken a good look at before (interestingly, I have just been refactoring IndexedDBShim to use ES6 modules as I see you did a while ago with idb-polyfill--maybe I'll finish my PR with it and see how it compares to idb-polyfill.) |
Thank you Brett for good words! |
My main interest now is I've noticed some issues in the tests which I've been fixing along the way, but I'm afraid it may be too time-consuming for me to return the changes to you. You're of course welcome to track them or if you prefer, join us on |
This builds on top of the previous PRs with a single commit to:
setCurrentVersion
method and use it upon each (upgradeneeded) callback iteration (so they can operate on their version);I've tried to rebase all of the previous PRs to incorporate fixes, but I hope you can accept this fix without me rebasing all of the other PRs, as this one would be time-consuming and error-prone to incorporate backwards.
FYI, I am ready with my
idb-import
project for JSON-based imports (at least a functional first version of it). Let me know if you would like it undertreojs
. I'm eager to start on adding that repo, so, assuming you wanted to house it, I'd appreciate it if you could set that up even before reviewing these PRs.