Update dependency indexeddbshim to v7 #3694
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
6.6.0
->7.0.0
Release Notes
indexeddbshim/IndexedDBShim
v7.0.0
Compare Source
typeson-registry
, supportCryptoKey
regenerator-runtime
,typeson-registry
) devDeps.6.6.0 (releasing again as
indexeddbshim
and deprecating@indexeddbshim/indexeddbshim
)@indexeddbshim/indexeddbshim
lint
totest
6.5.0 (was published to
@indexeddbshim/indexeddbshim
only)cypress-multi-reporters
prepublishOnly
scripttypeson-registry
6.4.0 (was published to
@indexeddbshim/indexeddbshim
only)cmrOutput
-supportingcypres-multi-reporters
fork(no need for Promise-based mocha-multi-reporters fork with proper
implementation)
jsdom, badges, mocha/nyc, sinon, source-map-support, ws)
6.3.0 (was published to
@indexeddbshim/indexeddbshim
only)mocha-badge-generator
6.2.1 (was published to
@indexeddbshim/indexeddbshim
only)6.2.0 (was published to
@indexeddbshim/indexeddbshim
only)fs
(which the Nodefiles automatically set) to allow removal of database files
without disturbing non-Node environments that do their own
special handling of
require
statementsboolean (convert to
Number
)6.1.0
browersify
/babelify
/mapstraction
process in favor ofgrunt-rollup
with plugins;reduces minified build size and expands non-minfiied size (so that
the source incorporated from
typeson
/typeson-registry
is notminified)
indexeddbshim-noninvasive.min.js
(182 KB -> 154 KB)indexeddbshim.min.js
(165 KB -> 137 KB)indexeddbshim-Key.min.js
(27.7 KB -> 16 KB)navigator.userAgent
even exists (avoid erringin React Native)
__forceClose
method with nullish value as name was not closingall connections
.eslintrc
file itself;enable other disabled rules
license-badger
routine)grunt-qunit-puppeteer
devDep. (slow to install)typeson-registry
(formodule
importing)package-lock.json
(needed bynpm audit
)yarn.lock
(having some difficulties installing everything)6.0.1
storing certain types or combinations of types
CFG.fullIDLSupport
, revert setting of prototypes ofIDBCursor
,IDBKeyRange
,IDBIndex
,IDBObjectStore
,IDBFactory
to objects that serialize to[object ObjectPrototype]
6.0.0
if needed for supported environments
CFG.fullIDLSupport
, ensure prototypes ofIDBCursor
,IDBKeyRange
,IDBIndex
,IDBObjectStore
,IDBFactory
areobjects that serialize to
[object ObjectPrototype]
do not inject
Object
on full IDL testsstructured-clone.any.js
to knownbadFiles
listMessageChannel
ImageData
package-lock.json
in favor ofyarn.lock
typeson-registry
(CauseEvent
andMessageChannel
tothrow upon attempted cloning); update
typeson
; bump devDeps andlocal copies
5.0.0
@babel/polyfill
torecommended replacements
core-js-bundle
/regenerator-runtime
restore the carets
for
cacheDatabaseInstances
ormemoryDatabase
IDBCursor.request
IDBKeyUtils.html
examples filebuild
step as bundlingdist
files anyways;avoid linting step as it has problem in grunt
__closed
flag to match specterminology,
__closePending
.__done
flag to match spec, withreadyState
getter using this flag
eslint-config-ash-nazg
(preferfor...of
andincludes
, etc.)max-len
indexeddbshim as dep.
test counts
fix for
location
; report reason for new test file failing; updateweb-platform-tests
; avoid excluded files in list of failed;add scripts to list files in test folder which are not in goodBad
listing
typeson
/typeson-registry
,eventtargeter
4.1.0
typeson-registry
to return to more space-optimalarray format when arrays do not have non-index keys (while still
supporting arrays with non-index keys) and
undefined
andsparse arrays formats (though all are backward-compatible with
old data).
request
peer dep4.0.1
browserslist
to@babel/env
; update typeson-registryto get its
browserslist
fix4.0.0
under 3.*, you need to add a callback as the value of the new
CFG.registerSCA
config with a value set to the function exported fromtypeson-registry-sca-reverter,
and do so before you make your
indexedDB
calls. This code was part ofIndexedDBShim, but is no longer bundled with it, as IndexedDBShim, as of
version 4.0.0 is now using the new typeson-registry Structured Cloning
Algorithm format by default for representing cloneable data as JSON.
properties (courtesy of updated typeson-registry)
dropping unpaired surrogates (courtesy of updated typeson-registry); also assumes
XHR has
overrideMimeType
webkitGetDatabaseNames
removed in favor of now-standarddatabases
(see w3c/IndexedDB#240)use npm or yarn
babel-polyfill
to@babel/polyfill
(script tag paths for polyfill will need to be updated)
constants as second arguments to
IDBDatabase.prototype.transaction
(to use
readonly
/readwrite
instead).IDBFactory.modules
(non-IDB shims or polyfills available through
CFG.addNonIDBGlobals
or
CFG.replaceNonIDBGlobals
, respectively, with shims prefixingclass names with "Shim")
IDBFactory.utils
and move itstest utility
createDOMException
to named export ofsetGlobalVars.js
^
) followedby a
0
, the final caret would mistakenly be interpreted with the0
as a NUL character as part of unescaping (which could in turn causeerrors)
BigInt()
andObject(BigInt())
from two versions
title
checks for browser support using eslint-plugin-compat; apply
eslint-config-ash-nazg
rules; use.js
for linting filewpt run
; wrapdynamic files
XMLHttpRequest
partial polyfill; update wptdeprecating old typeson names
yarn
toprepublishOnly
scriptscript to test non-Grunt eslint
js-polyfills
in favor of Node
URL
/URLSearchParams
typeson-registry-sca-reverter
3.10.0
keys (Courtesy lgtm)
IDBRequest
andIDBOpenRequest
listenersenumerable
too)idlharness.any.html
overinterfaces.any.html
3.9.0
IDBKeyRange
instance when already existing (flagged by LGTM.com)destructuring
around object curly quotes; deprecated assert APIs
3.8.0
package-lock.json
; fixes #321yarn.lock
web-platform-tests
3.7.0
Fixes #323
package-lock.json
(surface dependencysecurity fixes) (Temporary fix for #321 until Grunt
and node-pre-gyp->sqlite3(->websql) update)
type=text/css
starting file); see https://stackoverflow.com/a/38791824/271577
(fixes #324)
web-platform-tests
3.6.2
databaseBasePath
setting for databasedeletions (#319); test courtesy @mikelehen
resources (#320); test and fix courtesy @mikelehen
cache, ensure getting last version and ensure async before
dispatching any version error
function
on object literals3.6.1
Ensure unescaping done in SQL responses (and database names) always adds
back any literal
^
sequences. This loss could more easily happen fordatabase names (whenever the name had a sequence of 1 or more literal
^
followed by a single
A
toZ
(or[\u0000-\u001F\u007F"*/:<>?\\|]
or characters expanding on NFD normalization), but it could also happen
in general SQL responses (or database names) where there was a sequence
of 1 or more literal
^
followed by an unmatched surrogate (though thisshould admittedly be unlikely for most users); this unescaping was meant
to build back unmatched surrogates (which are allowed in IndexedDB)
and the like which were unsafe for the SQLite engine used internally or
for the file system used for Node, but we were failing to add back the
^
escape in such cases (which was used as an escape character).3.6.0
escapeNFDForDatabaseNames
check, temporarilycircumvent current limitations in Babel until
babel/babel#5978 addressed; (see also
axemclion#311 (comment));
fixes #311
eventtargeter
to avoid automaticObject.setPrototypeOf
calls (make conditional on
CFG.fullIDLSupport
); fixes #3133.5.1
package-lock.json
issue for the above Node versions
3.5.0
(ArrayBuffer, DataView, and typed arrays were not properly
preserving entire underlying buffer when only a portion used;
were also not restoring when buffers were reused cyclically
across an object)
yarn.lock
/package-lock.json
3.4.0
indexedDB
object descriptorweb-platform-tests
Version 3.3.1
devDependencies
todependencies
the following whichNode or custom rollups may require: eventtargeter, sync-promise,
typeson, typeson-registry, unicode-9.0.0
Version 3.3.0
.npmignore
to exclude more files at root that wedon't need in distributions
.npmignore
to allow forsrc
inclusion (for those whowish to rollup own (complete or partial) versions)
node_modules
needed for Rawgit demoVersion 3.2.0
Number.MIN_VALUE
convertingto string
module
topackage.json
for potential use by Webpack/RollupIDBIndex/openCursor-spec.js test
"should query multi-entry indexes with hundreds of records"; may be
other problematic versions but 7.7.4 and 9.2.1 are ok
eventtargeter
,typeson
,and
typeson-registry
babel-core
devDepnpmignore
(and avoid redundant items)web-platform-tests
andsqlite-rebuild
scriptsyarn.lock
Version 3.1.0
update
anddelete
were invalidating the cache and thusmistakenly incrementing cursor index; no longer invalidating the
(read-only) cache
process for
Key.js
file to function as standalone file (currentlytargeted for Chrome)
Key.js
,move
cmp
out ofIDBFactory
and reference it.grunt-contrib-uglify for correct ES6 support)
Version 3.0.4
IDBDatabase.transaction()
(storeNames
arg),IDBDatabase.createObjectStore
(keyPath
parameter), andIDBObjectStore.createIndex
(keyPath
argument), ensureconversion to DOMString (
ToString
) is being called per WebIDL(e.g., passing
true
would produce a valid"true"
) while stillthrowing upon missing argument
keypaths are valid JSON (but we did need the edge cases handled
per the accompanying fix and the Typeson encoded as of 3.0.0 should
remain compatible with this reversion to JSON)
Version 3.0.3
for key paths (JavaScript handles the escape sequences!).
path check.
Version 3.0.2
typeson
library fix for periods withinproperty names; could create cloning issues
though avoid
no-mulit-spaces
reporting (frequent in tests)benmosher/eslint-plugin-import#871
web-platform-tests
large-nesting-cloning.js
file as preventingsome other tests from running; also remove
parallel-cursors.uprade.js
from good tests as in timeouts (since it sometimes times out)
Version 3.0.1
npm shrinkwrap
version causing any issuescheerio
RCVersion 3.0.0
Though we have tried to keep this accurate, some changes listed below might
have been mistakenly ascribed to changes since the previous release whereas
they were actually changes since a more recent version on
master
.index names are prefixed as SQLite columns to avoid conflict with built-in
columns; add test
LIKE
clauses escape special charactersdatabase, store, and index names
node-websql->node-sqlite3 (part of fix for #274)
IDBFactory
methodsopen
,deleteDatabase
(and we do it for the non-standardwebkitGetDatabaseNames
as well as it could relate to privacy) throw aSecurityError
DOMException
if run from a"null"
origin (unless thenew config
checkOrigin
is set tofalse
); for Node, requireslocation
to be defined globally (could have some applications in Node,too, e.g., if jsdom sets the origin for iframes)
names with "S_" instead of "s_" and "I_" instead of "_" (consistent
with casing of "D_" though SQLite insensitive with ASCII while file
systems may be sensitive; more future-compatible)
keyPath
internally as JSON--needsSca encoding;
breaks all tables but important to fix!Shouldn't have broken tables as supplied keypaths should only have
produced Typeson that is JSON; other breaking db changes were needed
in this version, however
IDBTransaction
mode constants and tests sincenow being removed from IndexedDB
polyfill.js
code for incrementallyplugging browsers with incomplete support (has not been tested for a long
time and had perhaps not been properly kept up to date anyways); one
can still use IndexedDBShim to replace the whole implementation, however.
of fix for #274) (enforcing compatibility with Node, given our mapping it to
file naming on common file systems)
no longer available with a shift to ES6 modules (see below). The
CFG.js
module can be imported in its place to change the default values, however.
higher priority over binary (arrays already existing in storage
will not benefit from this until re-encoded, however)
key types can be fitted into the proper place for sorting precedence
IDBFactory
to onlyexpose
DOMException
,Event
, andIDBFactory
(replacing the formeruse of
idbModules
with ES6 modules and a CFG module for the globals:see below)
for bad key from
keyPath
DOMError
methodsIDBCursor
retrieval, remove
__lastKeyContinued
property (we can use__key
);also remove unused
__multiEntryOffset
IDBDatabase.prototype.transaction
(usereadonly
/readwrite
instead).escapeDatabaseName
function (and for convenience,
unescapeDatabaseName
) or to keepit but configure its new config subcomponents,
databaseCharacterBlacklist
and/ordatabaseNameLengthLimit
(part of fix for #274)
setGlobalVars
(e.g., for setting an early
CFG.win
value)by @bolasblack's fork)
webkitGetDatabaseNames
and test file (issue #223)DEFAULT_DB_SIZE
to be set viaCFG.js
;IDBIndex
methods,get
,getKey
,count
to allow obtainingfirst record of an
IDBKeyRange
(orIDBKeyRange
-like range) and changeerror messages to indicate "key or range"
websql
SQLite3 library includingcustomization of SQLite
busyTimeout
,trace
andprofile
IDBObjectStore.openKeyCursor
IDBKeyRange.includes()
with testIDBObjectStore.get
andIDBObjectStore.delete()
IDBCursor.continue
.file type identification
__setConfig(prop, val)
method for setting pseudo-globalproperty used internally for config and
shimIndexedDB.__getConfig()
to read
__setUnicodeIdentifiers()
for setting Unicoderegular expression strings for full key path validation compliance (could
slow loading/performance as depends on large regular expressions)
IDBTransaction.objectStoreNames
IDBObjectStore.name
andIDBIndex.name
settersNONE
,CAPTURING_PHASE
,AT_TARGET
,BUBBLING_PHASE
) and initialize readonlytarget
,currentTarget
,defaultPrevented
,isTrusted
.EventTarget
to invokedispatchEvent
to allowinvocation of multiple listeners as by
addEventListener
(notyet treating bubbling or
preventDefault
); changeShimEvent
to utilizepolyfill from
eventtarget
ShimDOMStringList
onindexedDB.modules
forsake of tests (the former also renamed internally for interfaces
testing); we may deprecate
indexedDB.modules
however, asCFG.addNonIDBGlobals
is now allowing exportCFG
property,addNonIDBGlobals
, to allowpolyfilling non-IndexedDB interfaces used internally (and needed
potentially for testing);
ShimDOMStringList
,ShimDOMException
,ShimEvent
,ShimCustomEvent
, andShimEventTarget
sqlError
property toDOMException
for facilitating debugging
ShimCustomEvent
andShimEventTarget
shims weare using on
IDBFactory.modules
for sake of testing checksaddSQLiteExtension
config to add ".sqlite" to userdatabases, taking it into account when throwing against any file
length limits
deleteDatabaseFiles
config to allow file itself tobe deleted in Node; will throw
UnknownError
if there are any errorsremoving file (besides a missing file)
.sqlite
extension to__sysdb__
conditionalon
CFG.addSQLiteExtension
settingautoName
config to interpret empty string name as acue for creating a database name automatically (introspect on
IDBDatabase.name
to get the actual name used) (untested)memoryDatabase
config to cause all opening, deleting,and listing to be of SQLite in-memory databases (for Node); name supplied
by user is still used (including to automatically build a cache since
SQLite does not allow naming of in-memory databases); the name is also
accessible to
IDBFactory.webkitGetDatabaseNames()
; causes databasename/version tracking to also be within an in-memory database; part of
#278 (untested); builds on work by @ThomasGreiner)
cacheDatabaseInstances
config to ensure that anyrepeat
IDBFactory.open
call to the same name and version (assumingno deletes or aborts causing rollbacks) will reuse the same SQLite
openDatabase
instanceuseSQLiteIndexes
option to add (and drop) SQLiteindexes where utilized (#210)
avoidAutoShim
option (#270)shimIndexedDB.__setConnectionQueueOrigin()
utilityIDBCursor.continuePrimaryKey
IDBObjectStore.getKey
IDBIndex.getAll/getAllKeys
IDBObjectStore.getAll
,IDBObjectStore.getAllKeys
versionchange
andblocked
events (currently assumessingle process)
IDBKeyRange
'slower
andupper
get round-trippedkey-encoded (e.g., to ensure a
DataView
gets converted intoan
ArrayBuffer
)continue
errors upon multiEntry checks with open-ended rangesdeleteDatabase
SQLite execution errors (not onlyits transaction errors) are properly surfaced (probably shouldn't
occur once we implement blocking transactions anyways, but
should resolve in case such errors may occur)
DOMException
's for sake ofweb-platform-tests' testharness.js even though new spec does not
list the codes and
code
is listed on MDN as no longer being seton new exceptions
AbortError
sent toIDBOpenDBRequest.onerror
upon atransaction aborting or a connection being closed within an upgrade
transaction
IDBOpenDBRequest.transaction
tonull
uponAbortError
due toclosed connection
error
property ofIDBTransaction
for certain tx aborts((
IDBRequest
->)IDBTransaction
->IDBDatabase
),including reuse of same event object upon propagation and potential
for cancellation as appropriate; used within
IDBTransaction
andpotentially within
IDBFactory
readyState
to "done",result
toundefined
, anderror
to a new
AbortError
on each request when aborting a transactionevents
"error" handler throwing or "error" event not being prevented
requests during transaction abort (then "abort" type event on
transaction)
DOMException
class when error not found (shouldnot occur?)
DOMException
class for errorinstances in
IDBFactory
should have
UnknownError
DOMException
name (and fail through events)ConstraintError
if attempting to add a unique index whenexisting values are not unique
DOMException
is returned forIDBFactory
method errors instead of WebSQL errors
AbortError
asIDBTransaction.error
property when"error" handler throws
request errors firing
request callbacks or success/error events
IDBRequest
orIDBOpenDBRequest
withresult
and
error
getters if request not yet doneIDBOpenDBRequest
result
is set toundefined
uponerring
IDBOpenDBRequest
transaction
is set tonull
uponcompleting or aborting
instanceof
mechanism forShimEvent
readyState
for successfulIDBFactory.deleteDatabase
and
IDBFactory.webkitGetDatabaseNames
deleteDatabase
on non-existing database,ensure
oldVersion
is 0 (notnull
)readyState
to 'pending' forIDBCursor
continue
/advance
createObjectStore
/deleteObjectStore
/createIndex
/deleteIndex
and store/index renaming
success
events withIDBFactory.open
object; fixes #27
IDBCursor
, move from SQL offsets to utilization of last key asper spec (and as needed for discovering any db modifications)
IDBCursor
continue
andadvance
caching,trigger cache resets/changes (for
IDBCursor
:delete
,update
and for
IDBObjectStore
:add
,put
,delete
,clear
);IDBCursor.advance
to properly handle unique values (and alsotake advantage of caching)
IDBCursor
key-basedcontinue
to be direction-sensitiveIDBCursor
request source should be store or index, not cursorcursor.update
always getting next keyIDBObjectStore.count
) if will be no cache)(25 _ 1024 _ 1024); fixes #115
IDBCursorWithValue
DOMException
instead of
DOMError
instanceof
checks withArray.isArray()
for arrays andwith duck-typing otherwise (for reliability with cross-window/module data)
advance
/continue
, throw if the cursor source or effectiveobject store has been deleted
continue
oradvance
(sort by keyPath-indicated value then primary key)
handling non-object values as keys)
IDBCursor.advance
, better range enforcement<=0
toadvance()
is a genuineTypeError
advance()
(non-numbers or non-finitenumbers) throw
TypeError
as per W3C tests (even though the spec issilent on bad counts except for count=0)
IDBCursor
request__versionTransaction
not to exist (if user calling it wrong)for
create/deleteObjectStore
and test it so it will return anInvalidStateError
LIKE
check on auto-increment sequence check (could be storename inside another store name);
add()
orput()
on an auto-incrementstore which are greater or equal to the "current number" will update
the auto-increment counter
auto-increment counter
TypeError
onIDBKeyRange
methods with inadequatearguments and
DataError
-typeDOMException
with explicitundefined
lower
is greater than theupper
argument toIDBKeyRange.bound
,throw a
DataError
DataError
upon continuing the cursor in an unexpected directionIDBVersionChangeEvent
properly and utilize to allowinstanceof
checksprimary key, (position,) obj. store position)
spec order and add missing checks
IDBCursor.update/delete
if transaction not active,if source or effective object store deleted, if got value not set,
or if a key method has been invoked
DataCloneError
ifIDBCursor.update
value is notclonable by the Structured Cloning Algorithm
currently used for cloning though could be used elsewhere where
not needed to be encoded); also avoid use of JSON.stringify
which only works on a subset of SCA
TypeError
if call toupdate()
has no argumentsadd
/put
inputIDBRequest.error
returnsnull
rather thanundefined
uponsuccess event
indexedDB
readonlyIDBCursor
properties,key
,primaryKey
,direction
,source
,value
readonlyIDBRequest
properties (result
,error
,source
,transaction
,readyState
) readonlyIDBDatabase
properties,name
,version
, andobjectStoreNames
readonlyIDBKeyRange
properties,lower
,upper
,lowerOpen
, andupperOpen
readonly, renaming cached range attributesIDBTransaction
properties,objectStoreNames
,mode
,db
,and
error
readonlyIDBIndex
properties,objectStore
,keyPath
,multiEntry
,unique
readonlyIDBObjectStore
properties,keyPath
,indexNames
,transaction
,autoIncrement
readonlykeyPath
does not return same instance as passed in (ifan array)
ShimEvent
properties,type
,bubbles
,cancelable
,eventPhase
,timeStamp
readonly (and for native events, stopmaking
target
writable)IDBIndex
properties,multiEntry
,unique
are always booleanIDBTransaction.objectStore
call always returns thesame instance if for the same transaction
IDBTransaction.abort()
, throwInvalidStateError
iftransaction not active
IDBIndex
retrieval methods throw upon index or store beingdeleted, upon transaction inactive
IDBIndex.count
to passnull
as keyIDBDatabase.transaction
DOMException
variant ofSyntaxError
is thrown forbad key paths
IDBFactory.open()
IDBObjectStore
methods, throw upon transaction inactive;fix checking error
IDBObjectStore.count
, allownull
(as withundefined
) toindicate unbounded range
IDBRequest.source
to reflectIDBCursor
,IDBIndex
,or
IDBObjectStore
as appropriateinsertion when index creation has begun but not yet completed
createObjectStore
createObjectStore
createObjectStore
node-sqlite3/Python (see http://bugs.python.org/issue12569 and
http://stackoverflow.com/a/6701665/271577)
createObjectStore
, throw if transaction is not active, orif auto-increment with empty string or array key path
__versionTransaction
set tonull
and set beforeoncomplete
so that
versionchange
checks insidee.target.transaction.oncomplete
within
onupgradeneeded
or insideonsuccess
will fail (and thus willattempts to create or delete object stores)
IDBObjectStore
methods:
add
,put
,get
,delete
,clear
,count
,openCursor
,openKeyCursor
,index
,createIndex
,deleteeIndex
)IDBObjectStore.deleteIndex
, throw if not in upgradetransaction or if transaction is inactive
IDBObjectStore.createIndex
, throwSyntaxError
if not avalid keyPath given
IDBObjectStore.createIndex
, throw if transaction not activetoString()
(and convert from sparse to dense) forvalidation and utilization within key path arrays
IDBKeyRange
-like objects (e.g., passed to cursor methods)fail validation as keys are ignored (and avoid adding duplicate members
success
event does not fire if database has already beenclosed (in
upgradeneeded
)length
onDOMStringList
non-enumerable (impacts W3C testsand also how implemented in Chrome)
DOMStringList
methods<= 1
keys from auto-incrementing current numberhigher than the max (including non-finite) have the effect of
setting the current number to the max
ES since confusable if only incrementing by one
global
for IDB exports where nowindow
orself
is definednumber
StringList
(forIDBDatabase.objectStoreNames
,IDBObjectStore.indexNames
)SQLite, but db/store/index names not case-insensitive in IndexedDB
escapeNFDForDatabaseNames
toescape characters that expand on NFD normalization so as to avoid
accidental loss of precise Unicode code points and thus potential name
clashes on the Mac which does NFD normalization on the file system (user
should normalize themselves if they want normalization); part of #278
IDBDatabase.createObjectStore
andIDBObjectstore.createIndex
as per W3C testssource
foropen
request, as, per new spec, it isto always be
null
original object will be modified)
issue #222
item
object properties (for Safari); fixes issue #261openDatabase
operations, including version changesinto an effectively single transaction;
IDBDatabase
version
andobjectStoreNames
;IDBObjectStore
name
andindexNames
;IDBTransaction
objectStoreNames
, andIDBIndex
name
properties after aborted transactions;dbVersions
table insert to be undone in one transaction(also avoids second query);
transaction finished;
deleteDatabase
to delete fromdbVersions
first androllback everything if there is a failure
can't extend WebSQL transaction expiration (and thus force an error to
get auto-rollback given that ROLLBACK is not supported)
still allow recreation of store handles (but not removing whole
clone record, allowing its properties to still be examined)
createObjectStore
/createIndex
return same handles asobjectStore
/index
methodsupgrade transaction (per W3C test
idbobjectstore-rename-abort.html
)IDBTransaction.objectStoreNames
is always aDOMStringList
even when user supplies arrays
DELETE
thenINSERT
rather thanUPDATE
forIDBCursor.update
IDBFactory.__forceClose()
method (untested)setting irrelevant got value flag on count cursors)
prevent execution of the
oncomplete
handler (though anAbortError
will subsequently occur)
IDBFactory.open()
to accept explicitundefined
versionIDBFactory.open()
IDBDatabase.transaction
are storedas unique names and are sorted
Symbol.toStringTag
(ortoString
) toIDB*
classes for properObject.prototype.toString.call
-type invocations checked inW3C interface tests)
non-strings or non-iterable objects or non-string sequences being
supplied as
storeNames
argument toIDBDatabase.transaction
(asshould occur per WebIDL when converting to a
"DOMString or sequence\<DOMString>");
see https://heycam.github.io/webidl/#es-sequence
DOMStringList
as it should be convertableto sequence\<DOMStringList> per
https://html.spec.whatwg.org/multipage/infrastructure.html#domstringlist
and https://infra.spec.whatwg.org/#list-iterate
DOMStringList
non-enumerable but configurableDOMStringList
: illegal constructor, lengthenumerable,
instanceof
overrideCFG
optionfullIDLSupport
to avoid expensivesetPrototypeOf
by default;prototype
invocation (while allowingnormal access)
prototype
non-writable as appropriateconstructor
set onprototype
as appropriateSymbol.toStringTag
andtoString
exposure onclasses and prototypes
arguments
object in place of some function parametersto get proper function lengths
enumerable
/configurable
EventTarget
orEvent
failed and
Object.defineProperty
is not presentIDBDatabase
(createObjectStore
,deleteObjectStore
),IDBObjectStore.index
,IDBTransaction
(objectStore
,abort
),and not merely whether it is active
is applied during ignoring of bad indexes of storage and during
checks for storing operations
IDBIndex
(openCursor
,openKeyCursor
,count
,get*
) range validationwebkitGetDatabaseNames
onIDBFactory.prototype
avoiding the need to check during the injection); assumes
PR w3c/IndexedDB#146
DataError
message more accurate for cursor key pathresolution failures
< 1
keys can be stored asper spec even though not changing the current number
sequence<DOMString>
is accepted(
IDBDatabase.createObjectStore
,IDBObjectStore.createIndex
,IDBDatabase.transaction
)createObjectStore
createOptions
object when
keyPath
isundefined
IDBDatabase.transaction
, allowToString
to occur oniterables
DOMException
shim to support legacy constants perW3C tests and better follow W3C interface expectations
util.isFile
and haveutil.isBlob
fail with files but support non-file BlobsIDBObjectStore
(
put
,add
) andIDBCursor.update
)eval()
in cloning (issue #211, #236)for insertion operations, do index checks independent of
indexNames
in case subsequently deleted bydeleteIndex
(#276)index name
IDBRequest.error
orIDBRequest.result
errors.
InvalidStateError
DOMException
upon deleted object store or index for:InvalidStateError
DOMException
as with deletedobject stores or indexes for access after an aborted transaction when
there were pending object stores or indexes to be created
IDBDatabase
createObjectStore
/deleteObjectStore
which per correctedspec throw different error upon (incompletely) finished check
IDBDatabase.createObjectStore
exception order fix (object storeConstraintError
check follows key pathSyntaxError
check)IDBDatabase.transaction
exception order fixes (InvalidAccessError
follows
InvalidStateError
version change check,InvalidStateError
closed check, and
NotFoundError
object store check);TypeError
modecheck per newly corrected spec behavior, to follow all other exception
checks
deleteDatabase
empty relevantconnections
(relevantfor
__forceClose
as well asopen
)VARCHAR(255)
toBLOB
for database and store namefields as may be longer (for db names, if
databaseNameLengthLimit
is higher than default)(remove memory database or remove/empty database file if no prior versions)
as needed by Chrome (but not Node) (noted in failed dropping of tables)
transaction queue (ensures subsequent unsetting of cursor request done
flag does not return additional error results in an abort error)
IDBObjectStore
andIDBIndex
'sget
andgetKey
only retrieve one record from SQLitereadTransaction
as possible/when inreadonly
modeIDBCursor
multiEntryfinds (used by
IDBObjectStore
orIDBIndex
count
with key range)SyncPromise
for faster executionGLOBAL
withglobal
names and add further documentation
for better maintainability
unescape
to ESLint
immediately clear semantics and cruft removal), removing 'use strict'
(redundant for modules) and remove build.js
const
where possible, andlet
otherwise andadd as ESLint rules, other minor changes
with a few exceptions
convertKeyToValue
(not in use internally)IDBCursor.update
andIDBObjectStore
'sput
/add
)no consequence to the user, however)
Key.getValue
toKey.evaluateKeyPathOnValue
Key.validate
toKey.convertValueToKey
(also paralleling terminology in the spec),also supporting multiEntry argument
parallel spec
bubbling/cancelable
IDBFactory
error eventstypeof ... === 'undefined'
tocheck against undefined (safe for strict mode implicit in modules)
arguments
where namedargs not needed (also may be more future-proof)
setSQLForRange
handle key encodingisObj
utility, further use ofArray.isArray()
eval()
([#211](https://togRenovate configuration
📅 Schedule: "before 3am on Friday" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.