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