Commit 180dde4
committed
- Fix: Ensure return after rejection (in
- Fix: Better type-checking for bad schema objects;
- Fix: Polyfill `newVersion` for PhantomJS
- API change (breaking)/Feature: Add `clearUnusedIndexes` option (defaults to `true`);
- API change (breaking)/Feature: Destroy and rebuild stores or indexes if present with different options;
- API addition: Support a `schemas` object keyed to version with values
as `schema` objects. (Utilizes own `IdbImport` class, relying on own fork of `idb-schema` at least for now.);
idb-schema callbacks will be passed db.js `Server` as second argument
- API addition: Support a `schemaBuilder` callback which accepts an
[idb-schema](http://github.com/treojs/idb-schema) object for incremental,
versioned schema building and whose `addCallback` method will be
passed an enhanced `upgradeneeded` event object with a `Server` object
as a second argument for making db.js-style queries
(e.g., to modify store content), albeit with certain limitations.
Along with `schemas`, addresses issues #84/#109
- API addition: Support a `clearUnusedStores` property to conditionally avoid deleting old stores.
- API addition: Add `db.del` alias of `db.delete`
- API addition: Add `del()` alias on `Server` for parity with `idb-batch` (likely to use or adapt for multiple change transactions);
- Feature: Change schema (and allow for `schemas`) to differentiate between "mixed", "whole", "idb-schema", and "merge" types with `schemaType` option (defaulting to `mixed` for `schema` and `whole` for `schemas`, maintaining prior behavior in backward-compatible manner);
- Docs: Update `version` and `schema` to take `schemaBuilder` into account
(and document `schemaBuilder`).
- Docs: Expand on key behavior examples;
- Docs: Indicate that `key` is optional too
- Docs: Add mention of missing `limit` on `modify`
- Refactoring: Use `const` where possible;
- Refactoring: Change variable placement including reordering static variables according to type (built-in alias, IDB, immutables, cache)
- Refactoring: Avoid try-catch for brevity if will throw in sync body of Promise (but denote which lines may throw)
- Refactoring: simplify transaction building
- Refactoring: Add `lang` attribute for Atom linter-jade package;
- Code comment: `preventDefault` not only for Firefox.
- Code comment: Clarify how old connections may be closed
- Testing: Schema building tests
- Testing: Add tests for caching
- Testing: Add test:local and phantom on package.json scripts
- Testing: Fix server-handler test (expect specific error)
- Testing: Fix test-worker to deal with multiple babel-polyfill instances
- Testing: Remove redundant bad-args test
- Testing: Unregister service workerget and count);1 parent 11b4b07 commit 180dde4
25 files changed
Lines changed: 17033 additions & 843 deletions
File tree
- dist
- src
- tests
- specs
- views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
3 | 38 | | |
4 | 39 | | |
5 | 40 | | |
| |||
10 | 45 | | |
11 | 46 | | |
12 | 47 | | |
13 | | - | |
| 48 | + | |
| 49 | + | |
14 | 50 | | |
15 | 51 | | |
16 | 52 | | |
17 | 53 | | |
18 | 54 | | |
19 | 55 | | |
20 | 56 | | |
21 | | - | |
| 57 | + | |
22 | 58 | | |
23 | 59 | | |
24 | 60 | | |
25 | 61 | | |
26 | 62 | | |
27 | 63 | | |
28 | 64 | | |
29 | | - | |
| 65 | + | |
30 | 66 | | |
31 | 67 | | |
32 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
120 | 134 | | |
121 | 135 | | |
122 | 136 | | |
| |||
0 commit comments