indexeddbshim 7.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.md DELETED
@@ -1,1202 +0,0 @@
1
- # CHANGES for indexeddbshim
2
-
3
- ## 7.1.0
4
-
5
- ### User-facing
6
-
7
- - Build: Update
8
- - npm: Update `typeson`, `typeson-registry` deps.
9
- - npm: Remove `regenerator-runtime` dep.
10
- - npm: Update `unicode-10.0.0` to `@unicode/unicode-13.0.0`
11
-
12
- ### Dev-facing
13
-
14
- - Linting (ESLint): As per latest ash-nazg
15
- - Build: Set `preventAssignment: true` in `@rollup/plugin-replace`
16
- - Refactoring: Switch to native `padStart` given minimum Node version
17
- - Refactoring: Switch to copy RegExp constructor now that Babel should have
18
- fixed (see #311)
19
- - Testing: Switch to stable version of `mocha-multi-reporters`
20
- - npm: Change from deprecated `request`/`request-promise-native` to `got`
21
- - npm: Remove `remark`
22
- - npm: Update devDeps. and package-lock
23
-
24
- # 7.0.0
25
-
26
- - Breaking change: Require Node >= 10
27
- - Enhancement: By way of `typeson-registry`, support `CryptoKey`
28
- - Docs: Update dev. license badge per latest
29
- - Linting: As per latest ash-nazg
30
- - npm: Update deps. (`regenerator-runtime`, `typeson-registry`) devDeps.
31
-
32
- ## 6.6.0 (releasing again as `indexeddbshim` and deprecating `@indexeddbshim/indexeddbshim`)
33
-
34
- - Incorporate previous relevant updates made to `@indexeddbshim/indexeddbshim`
35
- - Linting: As per latest ash-nazg
36
- - npm: Add `lint` to `test`
37
- - npm: Update devDeps. (and bundled mocha copy)
38
-
39
- ## 6.5.0 (was published to `@indexeddbshim/indexeddbshim` only)
40
-
41
- - Linting: As per latest ash-nazg
42
- - Build: Update mocha copy
43
- - Testing: Switch to stable version of `cypress-multi-reporters`
44
- - npm: Add `prepublishOnly` script
45
- - npm: Update `typeson-registry`
46
- - npm: Update devDeps.
47
-
48
- ## 6.4.0 (was published to `@indexeddbshim/indexeddbshim` only)
49
-
50
- - Build: Update per latest devDeps.
51
- - Build: Report compared to last build size
52
- - Linting: As per latest ash-nazg
53
- - Testing: Update tests to continue working per latest Node/jsdom
54
- - Testing: Switch to `cmrOutput`-supporting `cypres-multi-reporters` fork
55
- (no need for Promise-based mocha-multi-reporters fork with proper
56
- implementation)
57
- - Docs: Switch to mocha-badge-generator fork for proper async behavior
58
- - Docs: Update license badges
59
- - npm: Switch from deprecated rollup-plugin-babel to rollup/plugin-babel
60
- - npm: Update typeson-registry dep.
61
- - npm: Update devDeps (related to Babel, Rollup, ESLint, core-js,
62
- jsdom, badges, mocha/nyc, sinon, source-map-support, ws)
63
-
64
- ## 6.3.0 (was published to `@indexeddbshim/indexeddbshim` only)
65
-
66
- - Build: Fix per current fork
67
- - Docs: Update coverage badge per latest coveradge
68
- - Linting (ESLint): As per latest ash-nazg
69
- - npm: Point to now merged `mocha-badge-generator`
70
- - npm: Update devDeps
71
-
72
- ## 6.2.1 (was published to `@indexeddbshim/indexeddbshim` only)
73
-
74
- - Docs: Fix badges
75
-
76
- ## 6.2.0 (was published to `@indexeddbshim/indexeddbshim` only)
77
-
78
- - Fork from <https://github.com/axemclion/IndexedDBShim>.
79
- - Project: Add Github Sponors button to be able to accept funding
80
- - Project: Restore demo via Github Pages
81
- - Fix (React Native/Webpack): Add CFG item `fs` (which the Node
82
- files automatically set) to allow removal of database files
83
- without disturbing non-Node environments that do their own
84
- special handling of `require` statements
85
- - Fix (Android): Overcome apparent Android SQLite mishandling of
86
- boolean (convert to `Number`)
87
- - Build: Drop Grunt in favor of equivalent npm scripts
88
- - Testing (W3C): Update per latest wpt
89
- - npm: Update devDeps/package-lock.json
90
-
91
- ## 6.1.0
92
-
93
- - Build (change/optimization): Remove `browersify`/`babelify`/
94
- `mapstraction` process in favor of `grunt-rollup` with plugins;
95
- reduces minified build size and expands non-minfiied size (so that
96
- the source incorporated from `typeson`/`typeson-registry` is not
97
- minified)
98
- - `indexeddbshim-noninvasive.min.js` (182 KB -> 154 KB)
99
- - `indexeddbshim.min.js` (165 KB -> 137 KB)
100
- - `indexeddbshim-Key.min.js` (27.7 KB -> 16 KB)
101
- - Enhancement: Check that `navigator.userAgent` even exists (avoid erring
102
- in React Native)
103
- - Fix: `__forceClose` method with nullish value as name was not closing
104
- all connections
105
- - Linting (ESLint): Add file extensions; lint `.eslintrc` file itself;
106
- enable other disabled rules
107
- - Docs: Add license badges (with `license-badger` routine)
108
- - Testing: Remove `grunt-qunit-puppeteer` devDep. (slow to install)
109
- - Testing (Mocha): Allow Firefox tests to pass
110
- - Testing (W3C): Bump memory so tests can complete
111
- - npm: Update dep. `typeson-registry` (for `module` importing)
112
- - npm: Add `package-lock.json` (needed by `npm audit`)
113
- - npm: Update devDeps
114
- - yarn: Remove `yarn.lock` (having some difficulties installing everything)
115
-
116
- ## 6.0.1
117
-
118
- - Note that the typeson updates include some important fixes for accurately
119
- storing certain types or combinations of types
120
- - Fix: For `CFG.fullIDLSupport`, revert setting of prototypes of
121
- `IDBCursor`, `IDBKeyRange`, `IDBIndex`, `IDBObjectStore`,
122
- `IDBFactory` to objects that serialize to
123
- `[object ObjectPrototype]`
124
- - Linting (ESLint): Latest as per ash-nazg
125
- - Travis: Change to 10 and 12
126
- - Testing (W3C): Update web-platform-tests
127
- - Testing (W3C): Shim objects that are only checked for exposure
128
- - Testing (W3C): Avoid reporting known failures as unexpected
129
- - Testing (W3C): Update test counts
130
- - npm: Add script for updating submodules
131
- - npm: Update deps (typeson and typeson-registry)
132
- - npm: Update devDeps
133
-
134
- ## 6.0.0
135
-
136
- - npm (BREAKING CHANGE): Move core-js-bundle out of deps; user to install
137
- if needed for supported environments
138
- - Fix: For `CFG.fullIDLSupport`, ensure prototypes of `IDBCursor`,
139
- `IDBKeyRange`, `IDBIndex`, `IDBObjectStore`, `IDBFactory` are
140
- objects that serialize to `[object ObjectPrototype]`
141
- - Linting (ESLint): Apply latest updates
142
- - Testing (W3C): Avoid hack in test to deal with missing prototype;
143
- do not inject `Object` on full IDL tests
144
- - Testing (W3C): Add `structured-clone.any.js` to known `badFiles` list
145
- - Testing (W3C): Add `MessageChannel`
146
- - Testing (W3C): Add canvas for `ImageData`
147
- - Docs: Link to TrialTool
148
- - npm: Remove `package-lock.json` in favor of `yarn.lock`
149
- - npm: Bump `typeson-registry` (Cause `Event` and `MessageChannel` to
150
- throw upon attempted cloning); update `typeson`; bump devDeps and
151
- local copies
152
-
153
- ## 5.0.0
154
-
155
- - Breaking change: Move from deprecated `@babel/polyfill` to
156
- recommended replacements `core-js-bundle` /
157
- `regenerator-runtime`
158
- - Fix: For unescaping unmatched surrogates preceded by carets, we need to
159
- restore the carets
160
- - Fix: Avoid erring in some instances with not-yet-added name key
161
- for `cacheDatabaseInstances` or `memoryDatabase`
162
- - Fix (Missing API): Add new `IDBCursor.request`
163
- - Fix (example): Paths in `IDBKeyUtils.html` examples file
164
- - Optimization (build): Avoid `build` step as bundling `dist` files anyways;
165
- avoid linting step as it has problem in grunt
166
- - Refactoring: Change private `__closed` flag to match spec
167
- terminology, `__closePending`.
168
- - Refactoring: Add `__done` flag to match spec, with `readyState`
169
- getter using this flag
170
- - Linting (ESLint): Update for `eslint-config-ash-nazg` (prefer
171
- `for...of` and `includes`, etc.)
172
- - Linting (ESLint): Lint HTML and Markdown
173
- - Docs (JSDoc): Add returns and some additional docs
174
- - Docs (Code): Better toward `max-len`
175
- - Docs (README): Use paths more consistent with installing
176
- indexeddbshim as dep.
177
- - Docs (README): Indicate ESM usage; fix broken link
178
- - Docs (TESTING): Info on individual tests
179
- - Testing (W3C): Update wpt; test results; fix regression
180
- - Testing (W3C): Exclude tests causing undue timeouts in other files; update
181
- test counts
182
- - Testing (W3C): Avoid excluding non-breaking test
183
- - Testing (W3C): Support new "any" files (and support future ones) and
184
- fix for `location`; report reason for new test file failing; update
185
- `web-platform-tests`; avoid excluded files in list of failed;
186
- add scripts to list files in test folder which are not in goodBad
187
- listing
188
- - Grunt: Avoid eslint task for main build as having problems with lint config
189
- - npm: Update `typeson`/`typeson-registry`, `eventtargeter`
190
- - npm: Update devDeps; package-lock
191
-
192
- ## 4.1.0
193
-
194
- - Optimization: Update `typeson-registry` to return to more space-optimal
195
- array format when arrays do not have non-index keys (while still
196
- supporting arrays with non-index keys) and `undefined` and
197
- sparse arrays formats (though all are backward-compatible with
198
- old data).
199
- - Docs (README): Update note on typeson-registry-sca-reverter
200
- - npm: Add `request` peer dep
201
- - npm: Bump devDeps and adjust linting accordingly
202
-
203
- ## 4.0.1
204
-
205
- - Build fix: Apply `browserslist` to `@babel/env`; update typeson-registry
206
- to get its `browserslist` fix
207
-
208
- ## 4.0.0
209
-
210
- - Breaking change: **WARNING**: If you need 4.0.0 to work with data stored
211
- under 3.\*, you need to add a callback as the value of the new
212
- `CFG.registerSCA` config with a value set to the function exported from
213
- [typeson-registry-sca-reverter](https://github.com/brettz9/typeson-registry-sca-reverter),
214
- and do so before you make your `indexedDB` calls. This code was part of
215
- IndexedDBShim, but is no longer bundled with it, as IndexedDBShim, as of
216
- version 4.0.0 is now using the new typeson-registry Structured Cloning
217
- Algorithm format by default for representing cloneable data as JSON.
218
- - Breaking fix: Representation of Arrays to allow storage of non-index
219
- properties (courtesy of updated typeson-registry)
220
- - Breaking fix: Representation of Blobs as binary to avoid UTF16 representation
221
- dropping unpaired surrogates (courtesy of updated typeson-registry); also assumes
222
- XHR has `overrideMimeType`
223
- - Breaking change: `webkitGetDatabaseNames` removed in favor of now-standard
224
- `databases` (see <https://github.com/w3c/IndexedDB/pull/240/files>)
225
- - Breaking change; Remove Bower completely (service was deprecated);
226
- use npm or yarn
227
- - Breaking change: Switch from `babel-polyfill` to `@babel/polyfill`
228
- (script tag paths for polyfill will need to be updated)
229
- - Breaking change: Remove support for previously deprecated numeric
230
- constants as second arguments to `IDBDatabase.prototype.transaction`
231
- (to use `readonly`/`readwrite` instead).
232
- - Breaking change: Remove our non-standard `IDBFactory.modules`
233
- (non-IDB shims or polyfills available through `CFG.addNonIDBGlobals`
234
- or `CFG.replaceNonIDBGlobals`, respectively, with shims prefixing
235
- class names with "Shim")
236
- - Breaking change: Remove our non-standard `IDBFactory.utils` and move its
237
- test utility `createDOMException` to named export of `setGlobalVars.js`
238
- - Fix: If stored data had an even number of caret characters (`^`) followed
239
- by a `0`, the final caret would mistakenly be interpreted with the
240
- `0` as a NUL character as part of unescaping (which could in turn cause
241
- errors)
242
- - Fix: Compile to target 100% coverage (including e.g., iOS)
243
- - Enhancement: Support `BigInt()` and `Object(BigInt())`
244
- - Optimization: Import all of single typeson-registry to reduce file size
245
- from two versions
246
- - Refactoring: Add empty favicon to avoid extra console messages; load after
247
- title
248
- - Linting (ESLint): Switch Node-11-deprecated url methods
249
- - Linting (ESLint): Add and apply eslint-plugin-qunit-recommended rules; add
250
- checks for browser support using eslint-plugin-compat; apply
251
- `eslint-config-ash-nazg` rules; use `.js` for linting file
252
- - Testing (W3C): Instructions and results for using `wpt run`; wrap
253
- dynamic files
254
- - Testing (W3C): Update worker BSON per new BSON API; use new
255
- `XMLHttpRequest` partial polyfill; update wpt
256
- - Testing (Puppeteer QUnit): Avoid build step
257
- - Testing (QUnit): Ensure deleting database before testing version
258
- - Demo: Update copy of sinon
259
- - Docs: Max-length
260
- - Docs: Add "versions" section for migration info; note in code on
261
- deprecating old typeson names
262
- - npm: Add `yarn` to `prepublishOnly` script
263
- - npm: Add "wpt" as alias script for "web-platform-tests"; add "lint"
264
- script to test non-Grunt eslint
265
- - npm: Update eventtargeter and typeson/typeson-registry deps and devDeps
266
- - npm: Update devDeps (and their local copies); avoid `js-polyfills`
267
- in favor of Node `URL`/`URLSearchParams`
268
-
269
- [typeson-registry-sca-reverter](https://github.com/brettz9/typeson-registry-sca-reverter)
270
-
271
- ## 3.10.0
272
-
273
- - Fix: Ensure multiEntry sorts address possibility of nested array
274
- keys (Courtesy lgtm)
275
- - Fix: For interface tests, ensure properties are getter based
276
- - Refactoring: Factor out common interface code (making
277
- `IDBRequest` and `IDBOpenRequest` listeners `enumerable` too)
278
- - Testing (W3C): Update web-platform-tests (including repo location)
279
- - Testing (W3C): Use new `idlharness.any.html` over `interfaces.any.html`
280
- - Travis: Update Node version (having issues with Yarn)
281
- - Docs: Remove Bower badge
282
-
283
- ## 3.9.0
284
-
285
- - Fix: Upon converting value to key range, avoid creating new
286
- `IDBKeyRange` instance when already existing (flagged by LGTM.com)
287
- - Refactoring: Avoid useless assignment (flagged by LGTM.com); object
288
- destructuring
289
- - npm: Update devDeps
290
- - Linting (ESLint): Override new "standard" ESLint to prevent spacing
291
- around object curly quotes; deprecated assert APIs
292
-
293
- ## 3.8.0
294
-
295
- - npm: Update devDeps
296
- - npm: With updates to node-pre-gyp, rebuild `package-lock.json`; fixes #321
297
- - yarn: Update `yarn.lock`
298
- - Testing: Update `web-platform-tests`
299
- - Demo site: Update sinon version to work on rawgit.com
300
-
301
- ## 3.7.0
302
-
303
- - npm: Update websql fork dep. (which updates sqlite3 to 4.0.0)
304
- - npm: Switch unicode-10.0.0 to devDep (with copy routine);
305
- Fixes #323
306
- - npm: Update devDeps and `package-lock.json` (surface dependency
307
- security fixes) (Temporary fix for #321 until Grunt
308
- and node-pre-gyp->sqlite3(->websql) update)
309
- - Refactoring: Remove unnecessary `type=text/css`
310
- - Testing (Grunt): Fix clean-polyfill task (fixes #322)
311
- - Testing (Grunt): Replace phantom-qunit with puppeteer-qunit
312
- - Testing (QUnit): Fix issue with QUnit 2 (move sample data into test
313
- starting file); see https://stackoverflow.com/a/38791824/271577
314
- (fixes #324)
315
- - Testing: Update `web-platform-tests`
316
-
317
- ## 3.6.2
318
-
319
- - Fix (Node): Respect the `databaseBasePath` setting for database
320
- deletions (#319); test courtesy @mikelehen
321
- - Fix (Node): Error (and warning) in cleaning up memory database
322
- resources (#320); test and fix courtesy @mikelehen
323
- - Fix/optimization (Node): Don't remove cache after success, but if using
324
- cache, ensure getting last version and ensure async before
325
- dispatching any version error
326
- - Refactoring: Avoid redundant `function` on object literals
327
- - npm: Fix web-platform-tests script
328
-
329
- ## 3.6.1
330
-
331
- - Critical fix (Please upgrade from any previous 3.0.0 version):
332
- Ensure unescaping done in SQL responses (and database names) always adds
333
- back any literal `^` sequences. This loss could more easily happen for
334
- database names (whenever the name had a sequence of 1 or more literal `^`
335
- followed by a single `A` to `Z` (or `[\u0000-\u001F\u007F"*/:<>?\\|]`
336
- or characters expanding on NFD normalization), but it could also happen
337
- in general SQL responses (or database names) where there was a sequence
338
- of 1 or more literal `^` followed by an unmatched surrogate (though this
339
- should admittedly be unlikely for most users); this unescaping was meant
340
- to build back unmatched surrogates (which are allowed in IndexedDB)
341
- and the like which were unsafe for the SQLite engine used internally or
342
- for the file system used for Node, but we were failing to add back the
343
- `^` escape in such cases (which was used as an escape character).
344
-
345
- ## 3.6.0
346
-
347
- - Refactoring/Fix: For default `escapeNFDForDatabaseNames` check, temporarily
348
- circumvent current limitations in Babel until
349
- <https://github.com/babel/babel/issues/5978> addressed; (see also
350
- <https://github.com/axemclion/IndexedDBShim/issues/311#issuecomment-316090147>);
351
- fixes #311
352
- - Linting: Expand ESLint file coverage and apply minor linting fix to test file
353
- - Testing: Update web-platform-tests and our tests accordingly
354
- - npm: Update `eventtargeter` to avoid automatic `Object.setPrototypeOf`
355
- calls (make conditional on `CFG.fullIDLSupport`); fixes #313
356
-
357
- ## 3.5.1
358
-
359
- - npm: Update `package-lock.json`
360
- - npm: Resume allowing Node versions 8.93 - 9.0.0
361
- - Docs: Put message in README about failure of one test as a known
362
- issue for the above Node versions
363
-
364
- ## 3.5.0
365
-
366
- - Breaking fix (through npm): Update typeson and typeson-registry
367
- (ArrayBuffer, DataView, and typed arrays were not properly
368
- preserving entire underlying buffer when only a portion used;
369
- were also not restoring when buffers were reused cyclically
370
- across an object)
371
- - npm: Update dev deps
372
- - Install: Update `yarn.lock`/`package-lock.json`
373
- - Testing (W3C): Update web-platform-tests
374
-
375
- ## 3.4.0
376
-
377
- - Fix (minor): Return proper `indexedDB` object descriptor
378
- - npm: Update devDeps
379
- - npm: Update dep to unicode-10.0.0 (no practical difference)
380
- - Testing (W3C): Remove need for cheerio in build (use jsdom instead)
381
- - Testing (W3C): Update `web-platform-tests`
382
-
383
- ## Version 3.3.1
384
-
385
- - Build: Switch from `devDependencies` to `dependencies` the following which
386
- Node or custom rollups may require: eventtargeter, sync-promise,
387
- typeson, typeson-registry, unicode-9.0.0
388
-
389
- ## Version 3.3.0
390
-
391
- - Build: More complete `.npmignore` to exclude more files at root that we
392
- don't need in distributions
393
- - Build: Amend `.npmignore` to allow for `src` inclusion (for those who
394
- wish to rollup own (complete or partial) versions)
395
- - Build: Update file copies out of `node_modules` needed for Rawgit demo
396
-
397
- ## Version 3.2.0
398
-
399
- - Fix: Deal with issue with Chrome/Node and `Number.MIN_VALUE` converting
400
- to string
401
- - npm: Add `module` to `package.json` for potential use by Webpack/Rollup
402
- - npm: Limit engines to exclude Node 8.9.3 as having problems with Mocha
403
- IDBIndex/openCursor-spec.js test
404
- "should query multi-entry indexes with hundreds of records"; may be
405
- other problematic versions but 7.7.4 and 9.2.1 are ok
406
- - npm (Build): Update devDeps including versioned `eventtargeter`, `typeson`,
407
- and `typeson-registry`
408
- - npm (Build/Testing): Add missing `babel-core` devDep
409
- - npm (Build): Preserve LICENSE info in `npmignore` (and avoid redundant items)
410
- - npm (Testing): Add `web-platform-tests` and `sqlite-rebuild` scripts
411
- - npm (Testing): Update W3C test script to clean before beginning as well
412
- - Build: For Babel, use env over deprecated es2015; rebuild
413
- - Build: Add `yarn.lock`
414
- - Docs: Remove outdated polyfill info in README (babel-polyfill should cover)
415
- - Demo: Add example of IDBKeyUtils usage (not documented yet)
416
- - License: Rename files to include file extensions for Windows
417
-
418
- ## Version 3.1.0
419
-
420
- - Fix: `update` and `delete` were invalidating the cache and thus
421
- mistakenly incrementing cursor index; no longer invalidating the
422
- (read-only) cache
423
- - Enhancement: As part of #283 on export improvements, provide build
424
- process for `Key.js` file to function as standalone file (currently
425
- targeted for Chrome)
426
- - Refactoring: In order to minimize build size for standalone `Key.js`,
427
- move `cmp` out of `IDBFactory` and reference it.
428
- - npm: Update dev deps (including using harmony branch of
429
- grunt-contrib-uglify for correct ES6 support)
430
-
431
- ## Version 3.0.4
432
-
433
- - Fix (Edge case): For `IDBDatabase.transaction()` (`storeNames` arg),
434
- `IDBDatabase.createObjectStore` (`keyPath` parameter), and
435
- `IDBObjectStore.createIndex` (`keyPath` argument), ensure
436
- conversion to DOMString (`ToString`) is being called per WebIDL
437
- (e.g., passing `true` would produce a valid `"true"`) while still
438
- throwing upon missing argument
439
- - Optimize: We didn't actually need structured cloning for keypaths as
440
- keypaths are valid JSON (but we did need the edge cases handled
441
- per the accompanying fix and the Typeson encoded as of 3.0.0 should
442
- remain compatible with this reversion to JSON)
443
- - Refactoring (minor): Use ES6 object property name shorthand
444
- - npm: Update dev deps
445
- - Demo: Update copies of test files
446
-
447
- ## Version 3.0.3
448
-
449
- - Fix: Avoid allowing (open-ended) escaped Unicode escape sequences
450
- for key paths (JavaScript handles the escape sequences!).
451
- - Fix: Avoid double-escaping zero-width joiners/non-joiner in key
452
- path check.
453
- - npm: Update dev deps
454
-
455
- ## Version 3.0.2
456
-
457
- - Fix: Incorporate `typeson` library fix for periods within
458
- property names; could create cloning issues
459
- - Linting: Update per linting software updates (indents)
460
- though avoid `no-mulit-spaces` reporting (frequent in tests)
461
- - Linting: Update and apply ESLint compat plugin linting
462
- - npm: Update dev deps
463
- - npm: Avoid shrinkwrap for now, pending
464
- <https://github.com/benmosher/eslint-plugin-import/pull/871>
465
- - Testing (W3C): Update `web-platform-tests`
466
- - Testing (W3C): Exclude new `large-nesting-cloning.js` file as preventing
467
- some other tests from running; also remove `parallel-cursors.uprade.js`
468
- from good tests as in timeouts (since it sometimes times out)
469
- - Docs (Testing): Update note on running W3C Node tests
470
- - Docs (README): Fixed first hyperlink not working (courtesy @Erwin)
471
-
472
- ## Version 3.0.1
473
-
474
- - Update in case lagging `npm shrinkwrap` version causing any issues
475
- - Docs (README): Update version number and remove completed to-do
476
- - Testing: Update copies of Mocha/Chai/Sinon (for rawgit.com)
477
- - Testing (Grunt): Comment out cumbersome minified version updater
478
- - Testing (W3C): Revert from apparently problematic `cheerio` RC
479
-
480
- ## Version 3.0.0
481
-
482
- Though we have tried to keep this accurate, some changes listed below might
483
- have been mistakenly ascribed to changes since the previous release whereas
484
- they were actually changes since a more recent version on `master`.
485
-
486
- - License: Add back missing MIT license
487
- - Security fix: Avoid SQL injection potential--ensure database, store and
488
- index names are prefixed as SQLite columns to avoid conflict with built-in
489
- columns; add test
490
- - Security fix: Ensure `LIKE` clauses escape special characters
491
- - Security fix: Escape SQLite-disallowed-for-column-names NUL characters from
492
- database, store, and index names
493
- - Security fix: Escape/unescape NUL for safety with
494
- node-websql->node-sqlite3 (part of fix for #274)
495
- - Security fix: Ensure quoting (for column names) escapes double quotes
496
- - Security fix: As per new requirements, ensure `IDBFactory` methods `open`,
497
- `deleteDatabase` (and we do it for the non-standard
498
- `webkitGetDatabaseNames` as well as it could relate to privacy) throw a
499
- `SecurityError` `DOMException` if run from a `"null"` origin (unless the
500
- new config `checkOrigin` is set to `false`); for Node, requires
501
- `location` to be defined globally (could have some applications in Node,
502
- too, e.g., if jsdom sets the origin for iframes)
503
- - Breaking refactoring with consequences for old data: prefix store/index
504
- names with "S_" instead of "s_" and "I_" instead of "_" (consistent
505
- with casing of "D_" though SQLite insensitive with ASCII while file
506
- systems may be sensitive; more future-compatible)
507
- - Breaking change: Avoid encoding `keyPath` internally as JSON--needs
508
- Sca encoding; ~breaks all tables but important to fix!~
509
- _Shouldn't have broken tables as supplied keypaths should only have
510
- produced Typeson that is JSON; other breaking db changes were needed
511
- in this version, however_
512
- - Breaking change/Fix: Remove `IDBTransaction` mode constants and tests since
513
- now being removed from IndexedDB
514
- - Breaking change: Remove old `polyfill.js` code for incrementally
515
- plugging browsers with incomplete support (has not been tested for a long
516
- time and had perhaps not been properly kept up to date anyways); one
517
- can still use IndexedDBShim to replace the whole implementation, however.
518
- - Breaking change: Throw if database name is too long, defaulting to 254 (part
519
- of fix for #274) (enforcing compatibility with Node, given our mapping it to
520
- file naming on common file systems)
521
- - Breaking change: If you were overriding/monkey-patching globals, these are
522
- no longer available with a shift to ES6 modules (see below). The `CFG.js`
523
- module can be imported in its place to change the default values, however.
524
- - Breaking fix for existing data: Give comparisons/storage of arrays
525
- higher priority over binary (arrays already existing in storage
526
- will not benefit from this until re-encoded, however)
527
- - Breaking fix for existing data: Change encoding of key types so any future
528
- key types can be fitted into the proper place for sorting precedence
529
- - Breaking change (minor): Change "modules" property of `IDBFactory` to only
530
- expose `DOMException`, `Event`, and `IDBFactory` (replacing the former
531
- use of `idbModules` with ES6 modules and a CFG module for the globals:
532
- see below)
533
- - Breaking change (minor): Change "eval" to "evaluate" in exception message
534
- for bad key from `keyPath`
535
- - Breaking change (minor): Remove unneeded `DOMError` methods
536
- - Breaking change (minor): As moved away from SQL offsets for `IDBCursor`
537
- retrieval, remove `__lastKeyContinued` property (we can use `__key`);
538
- also remove unused `__multiEntryOffset`
539
- - Deprecate: Numeric constants as second arguments to
540
- `IDBDatabase.prototype.transaction` (use `readonly`/`readwrite` instead).
541
- - Enhancement: Add config to allow user to override `escapeDatabaseName`
542
- function (and for convenience, `unescapeDatabaseName`) or to keep
543
- it but configure its new config subcomponents,
544
- `databaseCharacterBlacklist` and/or `databaseNameLengthLimit`
545
- (part of fix for #274)
546
- - Enhancement: Throw upon receiving bad config property in config methods
547
- - Enhancement: Allow initial config object to `setGlobalVars`
548
- (e.g., for setting an early `CFG.win` value)
549
- - Enhancement: Allow non-invasive browser build (inspired
550
- by @bolasblack's fork)
551
- - Enhancement: Add non-standard `webkitGetDatabaseNames` and test file (issue #223)
552
- - Enhancement: Allow `DEFAULT_DB_SIZE` to be set via `CFG.js`;
553
- - Enhancement: `IDBIndex` methods, `get`, `getKey`, `count` to allow obtaining
554
- first record of an `IDBKeyRange` (or `IDBKeyRange`-like range) and change
555
- error messages to indicate "key or range"
556
- - Enhancement: Support Node cleanly via `websql` SQLite3 library including
557
- customization of SQLite `busyTimeout`, `trace` and `profile`
558
- - Enhancement: Add `IDBObjectStore.openKeyCursor`
559
- - Enhancement: Add `IDBKeyRange.includes()` with test
560
- - Enhancement: Allow ranges to be passed to `IDBObjectStore.get` and
561
- `IDBObjectStore.delete()`
562
- - Enhancement: Allow key argument with `IDBCursor.continue`.
563
- - Enhancement: Key value retrieval: Allow "length" type key
564
- - Enhancement: Add ".sqlite" extension to database name for sake of (Windows)
565
- file type identification
566
- - Enhancement: Expose `__setConfig(prop, val)` method for setting pseudo-global
567
- property used internally for config and `shimIndexedDB.__getConfig()`
568
- to read
569
- - Enhancement: Expose `__setUnicodeIdentifiers()` for setting Unicode
570
- regular expression strings for full key path validation compliance (could
571
- slow loading/performance as depends on large regular expressions)
572
- - Enhancement: Implement `IDBTransaction.objectStoreNames`
573
- - Enhancement: Add `IDBObjectStore.name` and `IDBIndex.name` setters
574
- - Enhancement: Add various missing lesser event properties (`NONE`,
575
- `CAPTURING_PHASE`, `AT_TARGET`, `BUBBLING_PHASE`) and initialize readonly
576
- `target`, `currentTarget`, `defaultPrevented`, `isTrusted`.
577
- - Enhancement: Utilize `EventTarget` to invoke `dispatchEvent` to allow
578
- invocation of multiple listeners as by `addEventListener` (not
579
- yet treating bubbling or `preventDefault`); change `ShimEvent` to utilize
580
- polyfill from `eventtarget`
581
- - Enhancement: Expose `ShimDOMStringList` on `indexedDB.modules` for
582
- sake of tests (the former also renamed internally for interfaces
583
- testing); we may deprecate `indexedDB.modules` however, as
584
- `CFG.addNonIDBGlobals` is now allowing export
585
- - Enhancement: Add new `CFG` property, `addNonIDBGlobals`, to allow
586
- polyfilling non-IndexedDB interfaces used internally (and needed
587
- potentially for testing); `ShimDOMStringList`, `ShimDOMException`,
588
- `ShimEvent`, `ShimCustomEvent`, and `ShimEventTarget`
589
- - Enhancement: Add non-standard `sqlError` property to `DOMException`
590
- for facilitating debugging
591
- - Enhancement: Export `ShimCustomEvent` and `ShimEventTarget` shims we
592
- are using on `IDBFactory.modules` for sake of testing checks
593
- - Enhancement: Add `addSQLiteExtension` config to add ".sqlite" to user
594
- databases, taking it into account when throwing against any file
595
- length limits
596
- - Enhancement: Add `deleteDatabaseFiles` config to allow file itself to
597
- be deleted in Node; will throw `UnknownError` if there are any errors
598
- removing file (besides a missing file)
599
- - Enhancement: Make addition of `.sqlite` extension to `__sysdb__` conditional
600
- on `CFG.addSQLiteExtension` setting
601
- - Enhancement: Support `autoName` config to interpret empty string name as a
602
- cue for creating a database name automatically (introspect on
603
- `IDBDatabase.name` to get the actual name used) (untested)
604
- - Enhancement: Support `memoryDatabase` config to cause all opening, deleting,
605
- and listing to be of SQLite in-memory databases (for Node); name supplied
606
- by user is still used (including to automatically build a cache since
607
- SQLite does not allow naming of in-memory databases); the name is also
608
- accessible to `IDBFactory.webkitGetDatabaseNames()`; causes database
609
- name/version tracking to also be within an in-memory database; part of
610
- #278 (untested); builds on work by @ThomasGreiner)
611
- - Enhancement: Support `cacheDatabaseInstances` config to ensure that any
612
- repeat `IDBFactory.open` call to the same name and version (assuming
613
- no deletes or aborts causing rollbacks) will reuse the same SQLite
614
- `openDatabase` instance
615
- - Enhancement: Add `useSQLiteIndexes` option to add (and drop) SQLite
616
- indexes where utilized (#210)
617
- - Enhancement: Provide `avoidAutoShim` option (#270)
618
- - Enhancement: Provide `shimIndexedDB.__setConnectionQueueOrigin()` utility
619
- - Add missing API: Add `IDBCursor.continuePrimaryKey`
620
- - Add missing API: Implement `IDBObjectStore.getKey`
621
- - Add missing APIs: Implement `IDBIndex.getAll/getAllKeys`
622
- - Add missing APIs: Implement `IDBObjectStore.getAll`,
623
- `IDBObjectStore.getAllKeys`
624
- - Add missing API: Binary keys
625
- - Add missing API: `versionchange` and `blocked` events (currently assumes
626
- single process)
627
- - Fix: Ensure `IDBKeyRange`'s `lower` and `upper` get round-tripped
628
- key-encoded (e.g., to ensure a `DataView` gets converted into
629
- an `ArrayBuffer`)
630
- - Fix: Avoid `continue` errors upon multiEntry checks with open-ended ranges
631
- - Fix: Ensure `deleteDatabase` SQLite execution errors (not only
632
- its transaction errors) are properly surfaced (probably shouldn't
633
- occur once we implement blocking transactions anyways, but
634
- should resolve in case such errors may occur)
635
- - Fix: Add error codes on `DOMException`'s for sake of
636
- web-platform-tests' testharness.js even though new spec does not
637
- list the codes and `code` is listed on MDN as no longer being set
638
- on new exceptions
639
- - Fix: Ensure `AbortError` sent to `IDBOpenDBRequest.onerror` upon a
640
- transaction aborting or a connection being closed within an upgrade
641
- transaction
642
- - Fix: Set `IDBOpenDBRequest.transaction` to `null` upon `AbortError` due to
643
- closed connection
644
- - Fix: Set `error` property of `IDBTransaction` for certain tx aborts
645
- - Fix: 'error' and 'abort' bubbling events
646
- ((`IDBRequest`->) `IDBTransaction`->`IDBDatabase`),
647
- including reuse of same event object upon propagation and potential
648
- for cancellation as appropriate; used within `IDBTransaction` and
649
- potentially within `IDBFactory`
650
- - Fix: Set `readyState` to "done", `result` to `undefined`, and `error`
651
- to a new `AbortError` on each request when aborting a transaction
652
- - Fix: Set transaction active flag on while dispatching success/error
653
- events
654
- - Fix: Abort transaction upon request "success" handler throwing or
655
- "error" handler throwing or "error" event not being prevented
656
- - Fix: Trigger queue of "error"-type events on all unfinished
657
- requests during transaction abort (then "abort" type event on
658
- transaction)
659
- - Fix: Avoid adding `DOMException` class when error not found (should
660
- not occur?)
661
- - Fix (minor): Avoid defaulting to `DOMException` class for error
662
- instances in `IDBFactory`
663
- - Fix: Unknown problems creating/deleting object stores or indexes
664
- should have `UnknownError` `DOMException` name (and fail through events)
665
- - Fix: Report `ConstraintError` if attempting to add a unique index when
666
- existing values are not unique
667
- - Fix: Ensure IndexedDB `DOMException` is returned for `IDBFactory`
668
- method errors instead of WebSQL errors
669
- - Fix: Use `AbortError` as `IDBTransaction.error` property when
670
- "error" handler throws
671
- - Fix: If transaction already aborted, avoid potential for
672
- request errors firing
673
- - Fix: If transaction already aborted, avoid running further
674
- request callbacks or success/error events
675
- - Fix: Throw for `IDBRequest` or `IDBOpenDBRequest` with `result`
676
- and `error` getters if request not yet done
677
- - Fix: Ensure `IDBOpenDBRequest` `result` is set to `undefined` upon
678
- erring
679
- - Fix: Ensure `IDBOpenDBRequest` `transaction` is set to `null` upon
680
- completing or aborting
681
- - Fix: Add duck-typing `instanceof` mechanism for `ShimEvent`
682
- - Fix: Change type to "abort" for transaction abort events
683
- - Fix: Set `readyState` for successful `IDBFactory.deleteDatabase`
684
- and `IDBFactory.webkitGetDatabaseNames`
685
- - Fix: If calling `deleteDatabase` on non-existing database,
686
- ensure `oldVersion` is 0 (not `null`)
687
- - Fix: Set `readyState` to 'pending' for `IDBCursor` `continue`/`advance`
688
- - Fix: Avoid adding requests with success events for
689
- `createObjectStore`/`deleteObjectStore`/`createIndex`/`deleteIndex`
690
- and store/index renaming
691
- - Fix: Avoid firing multiple `success` events with `IDBFactory.open`
692
- - Fix: Return appropriate IndexedDB error object instead of WebSQL error
693
- object; fixes #27
694
- - Fix: For `IDBCursor`, move from SQL offsets to utilization of last key as
695
- per spec (and as needed for discovering any db modifications)
696
- - Fix: In conjunction with `IDBCursor` `continue` and `advance` caching,
697
- trigger cache resets/changes (for `IDBCursor`: `delete`, `update`
698
- and for `IDBObjectStore`: `add`, `put`, `delete`, `clear`);
699
- - Fix: Cause `IDBCursor.advance` to properly handle unique values (and also
700
- take advantage of caching)
701
- - Fix: `IDBCursor` key-based `continue` to be direction-sensitive
702
- - Fix: `IDBCursor` request source should be store or index, not cursor
703
- - Fix: stores cursor
704
- - Fix: Avoid `cursor.update` always getting next key
705
- - (Fix: Avoid storing cursor (for `IDBObjectStore.count`) if will be no cache)
706
- - Fix: In Safari, default DEFAULT_DB_SIZE to a higher value
707
- (25 * 1024 * 1024); fixes #115
708
- - Fix: Properly implement and utilize `IDBCursorWithValue`
709
- - Fix: Use latest draft spec's (and implementations') use of `DOMException`
710
- instead of `DOMError`
711
- - Fix: Replace `instanceof` checks with `Array.isArray()` for arrays and
712
- with duck-typing otherwise (for reliability with cross-window/module data)
713
- - Fix: For `advance`/`continue`, throw if the cursor source or effective
714
- object store has been deleted
715
- - Fix: Ensure will throw when "got value flag" is unset during call to
716
- `continue` or `advance`
717
- - Fix: Ensure "prev" cursor will iterate in descending order on primary key
718
- (sort by keyPath-indicated value then primary key)
719
- - Fix: Allow empty string keyPath for index to return value as is (for
720
- handling non-object values as keys)
721
- - Fix: For `IDBCursor.advance`, better range enforcement
722
- - Fix: Ensure the error thrown for a count `<=0` to `advance()` is a genuine
723
- `TypeError`
724
- - Fix: Ensure other bad counts passed to `advance()` (non-numbers or non-finite
725
- numbers) throw `TypeError` as per W3C tests (even though the spec is
726
- silent on bad counts except for count=0)
727
- - Fix: Add transaction to `IDBCursor` request
728
- - Fix: Update keyRange behavior and tests to reflect draft spec
729
- - Fix: Allow `__versionTransaction` not to exist (if user calling it wrong)
730
- for `create/deleteObjectStore` and test it so it will return an
731
- `InvalidStateError`
732
- - Fix: Avoid `LIKE` check on auto-increment sequence check (could be store
733
- name inside another store name);
734
- - Fix: Ensure numeric keys passed to `add()` or `put()` on an auto-increment
735
- store which are greater or equal to the "current number" will update
736
- the auto-increment counter
737
- - Fix: Ensure a keyPath added numeric auto-increment key will update the
738
- auto-increment counter
739
- - Fix: Avoid potential problem with data insertion if an index were named "key"
740
- - Fix: Throw `TypeError` on `IDBKeyRange` methods with inadequate
741
- arguments and `DataError`-type `DOMException` with explicit
742
- `undefined`
743
- - Fix: If `lower` is greater than the `upper` argument to `IDBKeyRange.bound`,
744
- throw a `DataError`
745
- - Fix: Throw `DataError` upon continuing the cursor in an unexpected direction
746
- - Fix: Key validation: Avoid circular arrays
747
- - Fix: Key validation: Disallow Dates with NaN as \[\[DateValue]]
748
- - Fix: Ensure validation occurs for indexes before storage
749
- - Fix: Implement `IDBVersionChangeEvent` properly and utilize to allow
750
- `instanceof` checks
751
- - Fix: Sort properly for next/prev(unique) (potentially by key,
752
- primary key, (position,) obj. store position)
753
- - Fix: Be safe in quoting "key" column (reserved SQLite word)
754
- - Fix: For all public methods, seek to ensure error checking occurs in
755
- spec order and add missing checks
756
- - Fix: Throw for `IDBCursor.update/delete` if transaction not active,
757
- if source or effective object store deleted, if got value not set,
758
- or if a key method has been invoked
759
- - Fix: Throw `DataCloneError` if `IDBCursor.update` value is not
760
- clonable by the Structured Cloning Algorithm
761
- - Fix: Improve structured cloning checking by using cyclonejs (not
762
- currently used for cloning though could be used elsewhere where
763
- not needed to be encoded); also avoid use of JSON.stringify
764
- which only works on a subset of SCA
765
- - Fix: Throw `TypeError` if call to `update()` has no arguments
766
- - Fix: Allow empty string key path to be utilized when validating
767
- `add`/`put` input
768
- - Fix: Avoid iterating duplicate key values for unique iterations
769
- - Fix: Ensure `IDBRequest.error` returns `null` rather than `undefined` upon
770
- success event
771
- - Fix: Readonly
772
- - Make `indexedDB` readonly
773
- - Make `IDBCursor` properties, `key`, `primaryKey`, `direction`,
774
- `source`, `value` readonly
775
- - Make `IDBRequest` properties (`result`, `error`, `source`,
776
- `transaction`, `readyState`) readonly
777
- - Make `IDBDatabase` properties, `name`, `version`, and
778
- `objectStoreNames` readonly
779
- - Make `IDBKeyRange` properties, `lower`, `upper`, `lowerOpen`, and
780
- `upperOpen` readonly, renaming cached range attributes
781
- - Make `IDBTransaction` properties, `objectStoreNames`, `mode`, `db`,
782
- and `error` readonly
783
- - Make `IDBIndex` properties, `objectStore`, `keyPath`, `multiEntry`,
784
- `unique` readonly
785
- - Make `IDBObjectStore` properties, `keyPath`, `indexNames`,
786
- `transaction`, `autoIncrement` readonly
787
- - Ensure `keyPath` does not return same instance as passed in (if
788
- an array)
789
- - Make `ShimEvent` properties, `type`, `bubbles`, `cancelable`,
790
- `eventPhase`, `timeStamp` readonly (and for native events, stop
791
- making `target` writable)
792
- - Fix: Ensure `IDBIndex` properties, `multiEntry`, `unique` are always boolean
793
- - Fix: Ensure an `IDBTransaction.objectStore` call always returns the
794
- same instance if for the same transaction
795
- - Fix: For `IDBTransaction.abort()`, throw `InvalidStateError` if
796
- transaction not active
797
- - Fix: Ensure `IDBIndex` retrieval methods throw upon index or store being
798
- deleted, upon transaction inactive
799
- - Fix: Allow `IDBIndex.count` to pass `null` as key
800
- - Fix: Throw if not in versionchange transaction when calling
801
- `IDBDatabase.transaction`
802
- - Fix: Ensure `DOMException` variant of `SyntaxError` is thrown for
803
- bad key paths
804
- - Fix: Handle (mistaken) arguments > 2 to `IDBFactory.open()`
805
- - Fix: In `IDBObjectStore` methods, throw upon transaction inactive;
806
- fix checking error
807
- - Fix: In `IDBObjectStore.count`, allow `null` (as with `undefined`) to
808
- indicate unbounded range
809
- - Fix: Correct `IDBRequest.source` to reflect `IDBCursor`, `IDBIndex`,
810
- or `IDBObjectStore` as appropriate
811
- - Fix: Prevent race condition error if attempting to find indexes during
812
- insertion when index creation has begun but not yet completed
813
- - Fix: Validate keyPath supplied to `createObjectStore`
814
- - Fix: Allow for empty string keyPath to `createObjectStore`
815
- - Fix: Clone options object passed to `createObjectStore`
816
- - Fix: Overcome lone surrogate limitation in
817
- node-sqlite3/Python (see <http://bugs.python.org/issue12569> and
818
- <http://stackoverflow.com/a/6701665/271577>)
819
- - Fix: For `createObjectStore`, throw if transaction is not active, or
820
- if auto-increment with empty string or array key path
821
- - Fix: Ensure `__versionTransaction` set to `null` and set before `oncomplete`
822
- so that `versionchange` checks inside `e.target.transaction.oncomplete`
823
- within `onupgradeneeded` or inside `onsuccess` will fail (and thus will
824
- attempts to create or delete object stores)
825
- - Fix: Throw InvalidStateError if store deleted (for `IDBObjectStore`
826
- methods: `add`, `put`, `get`, `delete`, `clear`, `count`, `openCursor`,
827
- `openKeyCursor`, `index`, `createIndex`, `deleteeIndex`)
828
- - Fix: For `IDBObjectStore.deleteIndex`, throw if not in upgrade
829
- transaction or if transaction is inactive
830
- - Fix: For `IDBObjectStore.createIndex`, throw `SyntaxError` if not a
831
- valid keyPath given
832
- - Fix: For `IDBObjectStore.createIndex`, throw if transaction not active
833
- - Fix: Apply `toString()` (and convert from sparse to dense) for
834
- validation and utilization within key path arrays
835
- - Fix: Validate `IDBKeyRange`-like objects (e.g., passed to cursor methods)
836
- - Fix: Properly ensure with multiEntry conversions that array members which
837
- fail validation as keys are ignored (and avoid adding duplicate members
838
- - Fix: Ensure `success` event does not fire if database has already been
839
- closed (in `upgradeneeded`)
840
- - Fix: Make `length` on `DOMStringList` non-enumerable (impacts W3C tests
841
- and also how implemented in Chrome)
842
- - Fix: Error checking for `DOMStringList` methods
843
- - Fix: Prevent non-numeric and `<= 1` keys from auto-incrementing current number
844
- - Fix: For generators, as per new requirements, ensure numbers
845
- higher than the max (including non-finite) have the effect of
846
- setting the current number to the max
847
- - Fix: For generators, handle numbers just beyond the max allowed by
848
- ES since confusable if only incrementing by one
849
- - Fix: Default to `global` for IDB exports where no `window` or `self` is defined
850
- - Fix: Prevent incrementing if nevertheless valid key is lower than current
851
- number
852
- - Fix: Ensure sorting of `StringList` (for `IDBDatabase.objectStoreNames`,
853
- `IDBObjectStore.indexNames`)
854
- - Fix: Escape upper-case letters as table/column names case-insensitive in
855
- SQLite, but db/store/index names not case-insensitive in IndexedDB
856
- - Fix: Add default option `escapeNFDForDatabaseNames` to
857
- escape characters that expand on NFD normalization so as to avoid
858
- accidental loss of precise Unicode code points and thus potential name
859
- clashes on the Mac which does NFD normalization on the file system (user
860
- should normalize themselves if they want normalization); part of #278
861
- - Fix: Stringify calls to `IDBDatabase.createObjectStore` and
862
- `IDBObjectstore.createIndex` as per W3C tests
863
- - Fix: Avoid setting `source` for `open` request, as, per new spec, it is
864
- to always be `null`
865
- - Fix: Ensure cloning value before as well as after key evaluated (otherwise,
866
- original object will be modified)
867
- - Fix: Check for array on range within multiEntry cursor iteration; fixes
868
- issue #222
869
- - Fix: Copy SQLite row `item` object properties (for Safari); fixes issue #261
870
- - Fix: Genuinely rollback version in Node
871
- - Wrap all possible `openDatabase` operations, including version changes
872
- into an effectively single transaction;
873
- - Revert `IDBDatabase` `version` and `objectStoreNames`; `IDBObjectStore`
874
- `name` and `indexNames`; `IDBTransaction` `objectStoreNames`, and
875
- `IDBIndex` `name` properties after aborted transactions;
876
- - Allow `dbVersions` table insert to be undone in one transaction
877
- (also avoids second query);
878
- - If connection closed or errs, rollback; otherwise, commit only after
879
- transaction finished;
880
- - Reimplement `deleteDatabase` to delete from `dbVersions` first and
881
- rollback everything if there is a failure
882
- - Fix: In browser, only version can be consistently rolled back since we
883
- can't extend WebSQL transaction expiration (and thus force an error to
884
- get auto-rollback given that ROLLBACK is not supported)
885
- - Fix: Destroy index entries from index set upon store deletion and
886
- still allow recreation of store handles (but not removing whole
887
- clone record, allowing its properties to still be examined)
888
- - Fix: Ensure `createObjectStore`/`createIndex` return same handles as
889
- `objectStore`/`index` methods
890
- - Fix: Avoid resetting store name if the store already existed before an
891
- upgrade transaction (per W3C test `idbobjectstore-rename-abort.html`)
892
- - Fix: Ensure `IDBTransaction.objectStoreNames` is always a `DOMStringList`
893
- even when user supplies arrays
894
- - Fix: As per spec, `DELETE` then `INSERT` rather than `UPDATE` for
895
- `IDBCursor.update`
896
- - Fix: Add support for new "closed" event via a custom
897
- `IDBFactory.__forceClose()` method (untested)
898
- - Fix: Do not set got value flag if end of iteration (and also avoid
899
- setting irrelevant got value flag on count cursors)
900
- - Fix: Closing the database in an upgrade transaction should not
901
- prevent execution of the `oncomplete` handler (though an `AbortError`
902
- will subsequently occur)
903
- - Fix: Allow `IDBFactory.open()` to accept explicit `undefined` version
904
- - Fix: Round down version in `IDBFactory.open()`
905
- - Fix: Ensure store names passed into `IDBDatabase.transaction` are stored
906
- as unique names and are sorted
907
- - Fix: Add `Symbol.toStringTag` (or `toString`) to `IDB*` classes for proper
908
- `Object.prototype.toString.call`-type invocations checked in
909
- W3C interface tests)
910
- - Fix: Throw precise and better ordered exceptions upon
911
- non-strings or non-iterable objects or non-string sequences being
912
- supplied as `storeNames` argument to `IDBDatabase.transaction` (as
913
- should occur per WebIDL when converting to a
914
- "DOMString or sequence\<DOMString\>");
915
- see <https://heycam.github.io/webidl/#es-sequence>
916
- - Fix: Add iterator to `DOMStringList` as it should be convertable
917
- to sequence\<DOMStringList\> per
918
- <https://html.spec.whatwg.org/multipage/infrastructure.html#domstringlist>
919
- and <https://infra.spec.whatwg.org/#list-iterate>
920
- - Fix: Make `DOMStringList` non-enumerable but configurable
921
- - Fix: Interface changes for `DOMStringList`: illegal constructor, length
922
- enumerable, `instanceof` override
923
- - Fix: WebIDL-based changes, including:
924
- - new `CFG` option `fullIDLSupport` to avoid expensive
925
- `setPrototypeOf` by default;
926
- - Illegal constructor and `prototype` invocation (while allowing
927
- normal access)
928
- - Make `prototype` non-writable as appropriate
929
- - Ensure `constructor` set on `prototype` as appropriate
930
- - Proper `Symbol.toStringTag` and `toString` exposure on
931
- classes and prototypes
932
- - Use `arguments` object in place of some function parameters
933
- to get proper function lengths
934
- - Set properties to appropriate `enumerable`/`configurable`
935
- - Set proper inheritance hierarchy, including to `EventTarget` or
936
- `Event`
937
- - Fix: Properly report global shimming errors when setting a readonly
938
- failed and `Object.defineProperty` is not present
939
- - Fix: As per spec, check whether transaction is finished for
940
- `IDBDatabase` (`createObjectStore`, `deleteObjectStore`),
941
- `IDBObjectStore.index`, `IDBTransaction` (`objectStore`, `abort`),
942
- and not merely whether it is active
943
- - Fix: Improve evaluate key path splitting of identifier algorithm
944
- - Fix: Ensure extraction of key value from value using key path algorithm
945
- is applied during ignoring of bad indexes of storage and during
946
- checks for storing operations
947
- - Fix: Better `IDBIndex` (`openCursor`, `openKeyCursor`, `count`,
948
- `get*`) range validation
949
- - Fix: Disallow invocation of `webkitGetDatabaseNames` on
950
- `IDBFactory.prototype`
951
- - Fix: Throw synchronously if won't be able to inject into a value (thereby
952
- avoiding the need to check during the injection); assumes
953
- PR https://github.com/w3c/IndexedDB/pull/146
954
- - Fix: Make `DataError` message more accurate for cursor key path
955
- resolution failures
956
- - Fix: Ensure non-numeric/non-finite or `< 1` keys can be stored as
957
- per spec even though not changing the current number
958
- - Fix: Allow iterables where `sequence<DOMString>` is accepted
959
- (`IDBDatabase.createObjectStore`, `IDBObjectStore.createIndex`,
960
- `IDBDatabase.transaction`)
961
- - Fix: Avoid modifying the supplied `createObjectStore` `createOptions`
962
- object when `keyPath` is `undefined`
963
- - Fix: For `IDBDatabase.transaction`, allow `ToString` to occur on
964
- iterables
965
- - Fix: Tighten up `DOMException` shim to support legacy constants per
966
- W3C tests and better follow W3C interface expectations
967
- - Fix: Improve precision of `util.isFile` and have
968
- `util.isBlob` fail with files but support non-file Blobs
969
- - Fix: Clone before checking against key path (`IDBObjectStore`
970
- (`put`, `add`) and `IDBCursor.update`)
971
- - Fix: Avoid `eval()` in cloning (issue #211, #236)
972
- - Fix: Support cyclic values via typeson/typeson-registry (#267)
973
- - Fix: Distinguish deleted and pending deleted stores and indexes;
974
- for insertion operations, do index checks independent of
975
- `indexNames` in case subsequently deleted by `deleteIndex` (#276)
976
- - Fix: Ensure same index instance object returned for same store object and
977
- index name
978
- - Fix: Better error reporting for `IDBRequest.error` or `IDBRequest.result`
979
- errors.
980
- - Fix: Throw `InvalidStateError` `DOMException` upon deleted object store or index for:
981
- 1. cursor-related operations
982
- 1. index and store name setters
983
- 1. index and store get or manipulation operations
984
- 1. index creation, deletion, or retrieval operations
985
- - Fix: Ensure will throw `InvalidStateError` `DOMException` as with deleted
986
- object stores or indexes for access after an aborted transaction when
987
- there were pending object stores or indexes to be created
988
- - Fix: Cause not finished assertions to fire even if at beginning of abort except for
989
- `IDBDatabase` `createObjectStore`/`deleteObjectStore` which per corrected
990
- spec throw different error upon (incompletely) finished check
991
- - Fix `IDBDatabase.createObjectStore` exception order fix (object store
992
- `ConstraintError` check follows key path `SyntaxError` check)
993
- - Fix `IDBDatabase.transaction` exception order fixes (`InvalidAccessError`
994
- follows `InvalidStateError` version change check, `InvalidStateError`
995
- closed check, and `NotFoundError` object store check); `TypeError` mode
996
- check per newly corrected spec behavior, to follow all other exception
997
- checks
998
- - Fix: Close connection on abort (setting closed flag)
999
- - Fix: Have `deleteDatabase` empty relevant `connections` (relevant
1000
- for `__forceClose` as well as `open`)
1001
- - Fix: Change `VARCHAR(255)` to `BLOB` for database and store name
1002
- fields as may be longer (for db names, if
1003
- `databaseNameLengthLimit` is higher than default)
1004
- - Fix: Upon upgrade transaction abort, attempt to clean up other resources
1005
- (remove memory database or remove/empty database file if no prior versions)
1006
- - Fix: Ensure escaping of unmatched surrogates occurs in all SQLite statements
1007
- as needed by Chrome (but not Node) (noted in failed dropping of tables)
1008
- - Fix: Revert current number if operation fails (even if not aborting)
1009
- - Fix: Avoid reporting abort errors on duplicates of same request in
1010
- transaction queue (ensures subsequent unsetting of cursor request done
1011
- flag does not return additional error results in an abort error)
1012
- - Repo files: Rename test folders for ease in distinguishing
1013
- - Optimize: Only retrieve required SQLite columns
1014
- - Optimize: Have `IDBObjectStore` and `IDBIndex`'s `get` and
1015
- `getKey` only retrieve one record from SQLite
1016
- - Optimize: use WebSQL `readTransaction` as possible/when in `readonly` mode
1017
- - Optimize: Run SELECT only on columns we need
1018
- - Optimize: Avoid caching and other processing in `IDBCursor` multiEntry
1019
- finds (used by `IDBObjectStore` or `IDBIndex` `count` with key range)
1020
- - Optimize: Switch to `SyncPromise` for faster execution
1021
- - Optimize: Avoid redundant key->value checks and redundant cloning
1022
- - Optimize: Avoid cloning key when already a primitive
1023
- - Refactoring: Replace Node-deprecated `GLOBAL` with `global`
1024
- - Refactoring: Rename internal escaping/unescaping functions to semantic
1025
- names and add further documentation
1026
- - Refactoring (Avoid globals): Change from using window global to a CFG module
1027
- for better maintainability
1028
- - Refactoring (Avoid deprecated): Avoid deprecated `unescape`
1029
- - Refactoring (ES6): Add Babel with ES6 module support for imports and add
1030
- to ESLint
1031
- - Refactoring (ES6): Move to ES6 modules with babel/browserify (for
1032
- immediately clear semantics and cruft removal), removing 'use strict'
1033
- (redundant for modules) and remove build.js
1034
- - Refactoring (ES6): Use `const` where possible, and `let` otherwise and
1035
- add as ESLint rules, other minor changes
1036
- - Refactoring (ESLint): Move from JSHint to ESLint and to "standard" config,
1037
- with a few exceptions
1038
- - Refactoring (spec parity): Use same naming/return of methods in spec
1039
- - Refactoring (spec parity): Implement `convertKeyToValue` (not in use internally)
1040
- - Refactoring (spec parity): Extract steps for storing a record (affecting
1041
- `IDBCursor.update` and `IDBObjectStore`'s `put`/`add`)
1042
- - Refactoring (spec parity): Perform auto-increment in spec order (should be of
1043
- no consequence to the user, however)
1044
- - Refactoring (spec parity): Rename `Key.getValue` to `Key.evaluateKeyPathOnValue`
1045
- - Refactoring (spec parity): Rename and repurpose `Key.validate` to
1046
- `Key.convertValueToKey` (also paralleling terminology in the spec),
1047
- also supporting multiEntry argument
1048
- - Refactoring (spec parity): Make current number retrieval routines more closely
1049
- parallel spec
1050
- - Refactoring (spec parity): Mirror recent minor spec changes re:
1051
- bubbling/cancelable `IDBFactory` error events
1052
- - Refactoring (SQL): Quoting columns consistently for SQLite
1053
- - Refactoring (SQL): Make SQL-relationship clearer for method names (escaping)
1054
- - Refactoring (SQL): upper-case SQL keywords for greater visual distinction
1055
- - Refactoring: Where safe, switch from `typeof ... === 'undefined'` to
1056
- check against undefined (safe for strict mode implicit in modules)
1057
- - Refactoring: Use spread operator in place of `arguments` where named
1058
- args not needed (also may be more future-proof)
1059
- - Refactoring: Have `setSQLForRange` handle key encoding
1060
- - Refactoring: `isObj` utility, further use of `Array.isArray()`
1061
- - Refactoring: Key value retrieval: Avoid `eval()` (#211, #236)
1062
- - Refactoring: Use ES6 classes for cleaner inheritance
1063
- - Refactoring: Avoid JSON methods upon each `objectStore`/`createObjectStore`
1064
- call in favor of one-time in `IDBDatabase`
1065
- - Refactoring: Replace SQLite auto-increment with our own table since
1066
- SQLite's own apparently cannot be decremented successfully;
1067
- also rename to spec "current number"
1068
- - Refactoring: Avoid using native events, as we need to let `EventTarget`
1069
- alter its readonly `target`, `currentTarget`, etc. properties
1070
- - Refactoring: Throw count 0 error differently from negative count in
1071
- `IDBCursor.advance`
1072
- - Refactoring: Put `DOMStringList` and `IDBVersionChangeEvent` into own
1073
- files
1074
- - Updating: Bump various `devDependency` min versions
1075
- - Docs: List known issues on README
1076
- - Docs: Notice on deprecation for transaction mode constants
1077
- - Docs: Update summarization of npm testing info
1078
- - Docs: Distinguish `dependencies`/`devDependencies` display on README
1079
- - npm: Update packages
1080
- - Testing: Update tests per current spec and behavior
1081
- - Testing: Ensure db closes after each test to allow non-blocking `open()`
1082
- (was affecting testing)
1083
- - Testing: Work on Node tests and for Firefox (including increasing timeouts
1084
- as needed)
1085
- - Testing: Rely on `node_modules` paths for testing framework files
1086
- - Testing (browser index): Update links to test cases
1087
- - Testing (ESLint): Add compat plugin for browser feature testing
1088
- - Testing (fakeIndexedDB.js): Comment out non-standard property checks
1089
- - Testing (mock): Update IndexedDBMock tests
1090
- - Testing (mock): Expect `InvalidStateError` instead of `ConstraintError`
1091
- when not in an upgrade transaction calling `createObjectStore`
1092
- - Testing (mock): Fix for `blocked` event's expected `newVersion` (submitted
1093
- fix as <https://github.com/kristofdegrave/indexedDBmock/pull/2>)
1094
- - Testing (W3C Old): Fix global
1095
- - Testing (W3C Old): Bump timeout for browser key validity tests
1096
- - Testing (W3C Old): `IDBFactory.open` tests to do more flexible
1097
- `instanceof` checks;
1098
- - Testing (W3C Old): Fix test to reflect latest draft spec -- see <https://github.com/brettz9/web-platform-tests/pull/1>
1099
- - Testing (W3C Old): Cause recursive value test not to be skipped
1100
- - Testing (W3C Old): Change example to expect `ConstraintError` (since object
1101
- store already existing per test)--though perhaps should ensure it is
1102
- not yet existing
1103
- - Testing (W3C Old): Ensure `DOMException` variant of `SyntaxError` is checked
1104
- - Testing (W3C Old): Increase timeout for Node testing `createObjectStore`'s
1105
- `IDBObjectStoreParameters` test and IDBCursorBehavior's
1106
- `IDBCursor.direction`
1107
- - Testing (W3C Old): Utilize Unicode in `KeyPath.js` test
1108
- - Testing (W3C Old): Update w3c-old to work with browser
1109
- - Testing (W3C Old): Fix a few globals, increase test timeouts for
1110
- browser, allow array-like properties as per original tests
1111
- - Testing (W3C Old): Update tests per latest behavior as far as throwing
1112
- `InvalidStateError` for deleted object stores or indexes
1113
- - Test scaffolding (W3C Old): Fix args to `initionalSituation()`
1114
- - Test scaffolding (W3C Old): Fix test ok condition, typo
1115
- - Test scaffolding (W3C Old): Fix assertions
1116
- - Testing (W3C): Add new preliminary testing framework (mostly complete)
1117
- - Testing (W3C): Add separate tests for events and workers; also
1118
- incorporate tests for `DOMStringList` and `DOMException`
1119
- - Testing (W3C Old): Fix `DOMStringList` API usage (failing on Safari)
1120
- - Testing (W3C Old): Partly update `TransactionBehavior.js` tests to
1121
- ensure `objectStoreNames` are compared as arrays
1122
- - (Testing)
1123
- (Unless stated otherwise, "Browser" below refers to Safari 10.1 and
1124
- Chrome 57.0.2987.133 (64-bit); note that both browsers (especially
1125
- Safari may require re-running tests or running the tests as individual
1126
- groups)
1127
-
1128
- From tests-qunit (Node and browser), all tests are now passing.
1129
-
1130
- From tests-mocha (Node), all tests are now passing.
1131
- From tests-mocha (Browser), all tests are now passing except:
1132
- 1. in Chrome: `IDBFactory.cmp` `simple keys->should compare two numbers` due to an apparent `Number.MIN_VALUE` problem as [described here](http://stackoverflow.com/questions/43305403/number-min-value-and-tostring).
1133
- (Note: This is no longer occurring at least as of Chrome 69.)
1134
-
1135
- From fakeIndexedDB (Node), all tests now passing.
1136
- From fakeIndexedDB (Browser), only the first test is
1137
- passing (as expected due to rollback limitations);
1138
-
1139
- From indexedDBmock (Node and browser), all tests are now passing.
1140
- (see <https://github.com/kristofdegrave/indexedDBmock/compare/f6cdf451769827e13c746984b820096b0de3ac6d...master>
1141
- for any new changes to add to tests).
1142
-
1143
- From old W3C (Node and browser), all tests are now passing.
1144
-
1145
- From new W3C (Node):
1146
- See [`/test-support/node-good-bad-files.js`](test-support/node-good-bad-files.js)
1147
- for the current test status on these tests.
1148
-
1149
- From new W3C (Browser):
1150
- Individual tests can be run as per [TESTING](docs/TESTING.md).
1151
- See [node-good-bad-files.js](test-support/node-good-bad-files.js)
1152
- for the current test status on these tests.
1153
-
1154
- - Testing (Grunt): Force ESLint (since "standard" currently causing a warning)
1155
- - Testing (Grunt): More granular uglification, add build-browser,
1156
- dev-browser, Unicode watching
1157
- - Testing (Grunt): Add Node-specific, Unicode-specific build/dev commands
1158
- - Testing (Grunt): Clarify Grunt tasks, expand tasks for cleaning, make tests
1159
- more granular
1160
- - Testing (Grunt): Remove now redundant `sourceMappingURL`, use
1161
- `sourceMapName` per current specs
1162
- - Testing (Grunt): Add `uglify` to grunt watch task
1163
- - Testing (Grunt): Allow use of own sauce access key
1164
- - Testing (Grunt): Add task to avoid Saucelabs when running PhantomJS
1165
- - Testing (Grunt): Add assorted testing tasks
1166
- - Testing (Grunt): Update grunt-node-qunit to support latest QUnit
1167
- - Testing (Grunt): Get Saucelabs working (for Chrome and most of Firefox)
1168
- - Testing (Grunt): Log Saucelabs results
1169
- - Testing (Grunt): Work toward fixing source maps
1170
- - Testing (Grunt): Avoid missing grunt-cli message
1171
- - Testing (PhantomJS): Deal with PhantomJS error
1172
- - Testing (npm): Streamline test names; add convenience scripts
1173
- - Testing (QUnit): Upgrade QUnit refs
1174
- - Testing (QUnit): Minimize chances for QUnit random integer failure
1175
- - Testing (QUnit): Allow QUnit tests to pass when "Check for globals" enabled
1176
- (put certain test code blocks in closures)
1177
- - Testing (QUnit): Separate out QUnit for sake of choosing between browser
1178
- or Node testing, supporting node-qunit for Node testing
1179
- - Testing (QUnit): Upgrade to QUnit 2.0 API, lint test files
1180
- - Testing (QUnit): Add local copies of QUnit files
1181
- - Testing (QUnit): Allow `noanalytics=true` string in QUnit URL
1182
- (slows down testing in China where Google is blocked)
1183
- - Testing (Mocha): Conditionally check for `indexedDB.modules` in case we
1184
- are running tests without shim
1185
- - Testing improvement: Shim `Event` in Unicode test for parity (even
1186
- if not needed in current tests)
1187
- - Testing (Mocha): Add missing `IDBKeyRange/includes-spec.js` to browser
1188
- tests
1189
- - Testing (Mocha): Add Mocha tests to Grunt (along with clean-up) and add
1190
- node-qunit for Node mocha testing
1191
- - Testing (Mocha): Allow passing in specific test files to mocha tests
1192
- - Testing (Mocha): Add test to ensure unique index checks are safely ignored
1193
- with bad index keys
1194
- - Testing (Mocha): Rename test sets for distinguishing
1195
- - Testing (Mocha): Change fakeIndexedDB and indexedDBmock to Mocha tests
1196
- - Testing (Mocha): Increase default Mocha timeout to 5000ms (Chrome failing
1197
- some at 2000ms as was Node occasionally); tweak as needed
1198
- - Testing (Mocha): Safari currently problematic with (old) Sinon code; avoid on
1199
- error checks for Safari too
1200
- - Testing (Mocha): Fall back to genuine `Event`/`DOMException` when shims not
1201
- present (if testing native)
1202
- - Testing (Cordova): Update Cordova testing (untested)