indexeddbshim 19.0.2 → 19.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -6
- package/badges/coverage-badge.svg +1 -1
- package/badges/licenses-badge-dev.svg +1 -1
- package/badges/licenses-badge.svg +1 -1
- package/badges/tests-badge.svg +1 -1
- package/dist/IDBTransaction.d.ts +15 -0
- package/dist/IDBTransaction.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +2 -2
- package/dist/indexeddbshim-Key.js.map +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-Key.min.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +123 -73
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +123 -74
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +3 -3
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +121 -72
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +123 -74
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +3 -3
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +123 -74
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +3 -3
- package/dist/indexeddbshim.min.js.map +1 -1
- package/dist/node-UnicodeIdentifiers.d.ts.map +1 -1
- package/dist/setGlobalVars.d.ts.map +1 -1
- package/dist/unicode-regex.d.ts +1 -1
- package/dist/unicode-regex.d.ts.map +1 -1
- package/dist/util.d.ts +0 -6
- package/dist/util.d.ts.map +1 -1
- package/package.json +100 -95
- package/src/CFG.js +1 -1
- package/src/IDBTransaction.js +76 -18
- package/src/node-UnicodeIdentifiers.js +2 -1
- package/src/setGlobalVars.js +2 -1
- package/src/unicode-regex.js +1 -16
- package/src/util.js +1 -11
- package/licenseInfo.json +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-UnicodeIdentifiers.d.ts","sourceRoot":"","sources":["../src/node-UnicodeIdentifiers.js"],"names":[],"mappings":";AASA;;;;GAIG;AACH,uCAJW,OAAO,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kBAC3C,OAAO,CAAC,OAAO,UAAU,EAAE,YAAY,CAAC,GACtC,OAAO,oBAAoB,EAAE,aAAa,GAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"node-UnicodeIdentifiers.d.ts","sourceRoot":"","sources":["../src/node-UnicodeIdentifiers.js"],"names":[],"mappings":";AASA;;;;GAIG;AACH,uCAJW,OAAO,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kBAC3C,OAAO,CAAC,OAAO,UAAU,EAAE,YAAY,CAAC,GACtC,OAAO,oBAAoB,EAAE,aAAa,GAAC,MAAM,CAgB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setGlobalVars.d.ts","sourceRoot":"","sources":["../src/setGlobalVars.js"],"names":[],"mappings":";;+BAmBW,OAAO,UAAU,EAAE,iBAAiB,GAC1C,OAAO,CAAC,OAAO,UAAU,EAAE,YAAY,CAAC;wBAqChC,CACR,IAAI,EAAE,OAAO,UAAU,EAAE,iBAAiB,KACvC,OAAO,UAAU,EAAE,WAAW;oCAIzB,CAAC,GAAG,EAAE;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAA;CAC1B,KAAK,IAAI;4BAIA,CAAC,UAAU,GAAC,MAAM,CAAC,GAAG;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,SAAS,CAA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regex.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"unicode-regex.d.ts","sourceRoot":"","sources":["../src/unicode-regex.js"],"names":[],"mappings":";AAEA,0BAAslE"}
|
package/dist/util.d.ts
CHANGED
|
@@ -95,12 +95,6 @@ export function isDate(obj: AnyValue): boolean;
|
|
|
95
95
|
* @returns {boolean}
|
|
96
96
|
*/
|
|
97
97
|
export function isBlob(obj: AnyValue): boolean;
|
|
98
|
-
/**
|
|
99
|
-
*
|
|
100
|
-
* @param {AnyValue} obj
|
|
101
|
-
* @returns {boolean}
|
|
102
|
-
*/
|
|
103
|
-
export function isRegExp(obj: AnyValue): boolean;
|
|
104
98
|
/**
|
|
105
99
|
*
|
|
106
100
|
* @param {AnyValue} obj
|
package/dist/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.js"],"names":[],"mappings":"sBAKa,MAAM;uBA0PN;IAAC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.js"],"names":[],"mappings":"sBAKa,MAAM;uBA0PN;IAAC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAAC;uBA0SnD,OAAO;AA1fpB;;;;GAIG;AACH,2CAHW,MAAM,GACJ,MAAM,CASlB;AAED;;;GAGG;AACH,4CAHW,MAAM,GACJ,MAAM,CAclB;AAuBD;;;;GAIG;AACH,qDAJW,MAAM,GAEJ,MAAM,CAoClB;AAmBD;;;;GAIG;AACH,uDAHW,MAAM,GACJ,MAAM,CAkClB;AAED;;;GAGG;AACH,6CAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;GAGG;AACH,6CAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;GAGG;AACH,sDAHW,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G;AACH,sCAJW,QAAQ,gBACR,OAAO,GACL,MAAM,CAIlB;AAcD;;;;GAIG;AACH,gDAHW,QAAQ,GACN,MAAM,GAAC,MAAM,EAAE,CAW3B;AAED;;;GAGG;AACH,6BAHW,QAAQ,GACN,CAAC,IAAI,IAAI,GAAC,SAAS,CAI/B;AA6BD;;;GAGG;AACH,0CAHW,MAAM,IAAI,GACR,IAAI,CAmBhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "indexeddbshim",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Parashuram <code@nparashuram.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -28,6 +28,92 @@
|
|
|
28
28
|
"test-support/**"
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepublishOnly": "npm run license-badges && npm run build",
|
|
33
|
+
"attw": "attw --pack . --profile node16",
|
|
34
|
+
"tsc": "tsc",
|
|
35
|
+
"tsc-prod": "tsc -p tsconfig-prod.json",
|
|
36
|
+
"tsc:ts7": "npx -y -p typescript@^7 -c \"tsc\"",
|
|
37
|
+
"tsc-prod:ts7": "npx -y typescript@^7 tsc -p tsconfig-prod.json",
|
|
38
|
+
"build": "rm -R dist && npm run tsc-prod && npm run rollup",
|
|
39
|
+
"license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
|
|
40
|
+
"license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg",
|
|
41
|
+
"license-badges": "run-p license-badge license-badge-dev",
|
|
42
|
+
"start": "static -p 9999 -H '{\"Access-Control-Allow-Origin\": \"http://web-platform.test:8000\", \"Access-Control-Allow-Methods\": \"GET\", \"Access-Control-Allow-Headers\": \"Content-Type\"}'",
|
|
43
|
+
"watch": "chokidar \"src/*\" \"node_modules/eventtarget/EventTarget.js\" \"node_modules/websql/lib/websql/WebSQLTransaction.js\" \"node_modules/websql/lib/websql/WebSQLDatabase.js\" -c \"npm run rollup\"",
|
|
44
|
+
"dev": "run-p start watch",
|
|
45
|
+
"clean": "run-p clean-sysDB clean-mocha clean-fake clean-mock clean-w3c clean-w3cOld",
|
|
46
|
+
"clean-sysDB": "rimraf --glob __sysdb__*",
|
|
47
|
+
"clean-polyfill": "run-p clean-fake clean-mock clean-w3cOld clean-sysDB",
|
|
48
|
+
"clean-mocha": "rimraf --glob D_indexeddbshim_test_database_* D_test.sqlite",
|
|
49
|
+
"clean-fake": "rimraf --glob D_test0.*",
|
|
50
|
+
"clean-mock": "rimraf --glob D_test_database*",
|
|
51
|
+
"clean-w3c": "rimraf --glob D_opaque* D_inbox* D_output* D_*_bucket_* D_^D^B2* D_db* D_test* D_about* D_^I^D^B* D_blank* D_database_name* D_idbtransaction* D_x D_x.sqlite D_y D_y.sqlite D_webworker* D_http* && npm run clean-sysDB",
|
|
52
|
+
"clean-w3cOld": "rimraf --glob D_db.sqlite* D_test* D_database_name* D_idbtransaction*",
|
|
53
|
+
"clean-w3c-built": "rimraf test-support/js",
|
|
54
|
+
"copy": "copyup node_modules/source-map-support/browser-source-map-support.js node_modules/mocha/mocha.css node_modules/mocha/mocha.js node_modules/chai/chai.js node_modules/sinon/pkg/sinon-no-sourcemaps.js test-support",
|
|
55
|
+
"fix-permissions": "chmod +x node_modules/npm-run-all/bin/*/index.js",
|
|
56
|
+
"lint": "eslint .",
|
|
57
|
+
"eslint": "npm run lint --",
|
|
58
|
+
"w3c-build-only": "node test-support/node-buildjs",
|
|
59
|
+
"w3c-build": "run-s clean-w3c clean-w3c-built w3c-build-only",
|
|
60
|
+
"fake": "run-s clean-fake coverage:fake clean-fake",
|
|
61
|
+
"mock": "run-s clean-mock coverage:mock clean-mock",
|
|
62
|
+
"w3c-old": "run-s clean-w3cOld coverage:w3cOld clean-w3cOld",
|
|
63
|
+
"tests-polyfill": "run-s clean-polyfill coverage:fake coverage:mock coverage:w3cOld",
|
|
64
|
+
"mocha": "run-s clean-mocha coverage:mocha clean-mocha",
|
|
65
|
+
"rollup": "rollup -c",
|
|
66
|
+
"coverage:fake": "c8 --temp-directory coverage/fake --reporter=none --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+fake --require source-map-support/register tests-polyfill/fakeIndexedDB/test-node.js",
|
|
67
|
+
"coverage:mock": "c8 --temp-directory coverage/mock --reporter=none --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+mock --require source-map-support/register tests-polyfill/indexedDBmock/test-node.js",
|
|
68
|
+
"coverage:w3cOld": "c8 --reporter=none --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+w3c --require source-map-support/register tests-polyfill/w3c/test-node.js",
|
|
69
|
+
"coverage:w3c:test": "npm run delay && NODE_OPTIONS=--max_old_space_size=16384 c8 --temp-directory coverage/w3c --reporter=none --no-clean npm run w3c-test-only && npm run stop",
|
|
70
|
+
"coverage:w3c": "npm run clean-w3c && run-p -r wpt coverage:w3c:test",
|
|
71
|
+
"test:w3c": "NODE_OPTIONS=--max_old_space_size=16384 NODE_OPTIONS=--trace-warnings node test-support/node-idb-test.js",
|
|
72
|
+
"w3c-test-only": "NODE_OPTIONS=--max_old_space_size=16384 node --trace-warnings test-support/node-idb-test.js",
|
|
73
|
+
"coverage:mocha": "c8 --temp-directory coverage/mocha --reporter=none --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+mocha --require source-map-support/register tests-mocha/test-node.js",
|
|
74
|
+
"coverage-badge": "coveradge badges/coverage-badge",
|
|
75
|
+
"coverage:copy": "cp -r coverage/fake/. coverage/combined/ && cp -r coverage/mock/. coverage/combined/ && cp -r coverage/mocha/. coverage/combined/ && cp -r coverage/w3c/. coverage/combined/",
|
|
76
|
+
"coverage:report-only": "c8 report --temp-directory coverage/combined",
|
|
77
|
+
"coverage:report": "run-s coverage:copy coverage:report-only",
|
|
78
|
+
"remove-cache": "rimraf node_modules/.cache",
|
|
79
|
+
"remove-cov": "rimraf .nyc_output ",
|
|
80
|
+
"remove-results": "rimraf --glob test-support/results/file*.json",
|
|
81
|
+
"coverage:polyfill": "run-s coverage:fake coverage:mock coverage:w3cOld",
|
|
82
|
+
"tests-badge": "mbg --fileGlob \"./test-support/results/file*.json\" --badge_output badges/tests-badge.svg",
|
|
83
|
+
"coverage": "run-s -c stop clean coverage:empty remove-cache remove-cov remove-results coverage:fake coverage:mock coverage:mocha coverage:w3c clean tests-badge coverage:report coverage-badge",
|
|
84
|
+
"coverage:empty": "rimraf coverage/combined coverage/fake coverage/mock coverage/mocha coverage/w3c && mkdir -p coverage/combined",
|
|
85
|
+
"open-coverage-only": "open http://127.0.0.1:9999/coverage/lcov-report/",
|
|
86
|
+
"open-coverage": "run-p start open-coverage-only",
|
|
87
|
+
"test": "run-s lint coverage",
|
|
88
|
+
"submodules-init": "git submodule update --init --recursive",
|
|
89
|
+
"submodules-fetch": "git submodule foreach --recursive git fetch",
|
|
90
|
+
"submodules-merge": "git submodule foreach git merge origin master",
|
|
91
|
+
"submodules": "run-s submodules-init submodules-fetch submodules-merge",
|
|
92
|
+
"wpt": "run-p start web-platform-tests",
|
|
93
|
+
"web-platform-tests": "cd web-platform-tests && ./wpt serve",
|
|
94
|
+
"stop-server": "pkill -f \"static -p 9999\" || true",
|
|
95
|
+
"stop-wpt": "pkill -f \"wpt serve\" || true",
|
|
96
|
+
"stop-ports": "kill -9 $(lsof -ti tcp:8000,8443,8444,9000,9999) 2>/dev/null || true",
|
|
97
|
+
"stop": "run-s stop-server stop-wpt stop-ports",
|
|
98
|
+
"w3c-find-unused": "node test-support/find-unused.js",
|
|
99
|
+
"w3c": "run-s w3c-test",
|
|
100
|
+
"w3c-add-wrap": "node test-support/wrap-w3c-tests",
|
|
101
|
+
"w3c-remove-wrap": "node test-support/wrap-w3c-tests remove",
|
|
102
|
+
"w3c-wrap": "node test-support/wrap-w3c-tests",
|
|
103
|
+
"test-and-start:w3c": "run-p -r start web-platform-tests delayed-w3c-test",
|
|
104
|
+
"delay": "delay 9",
|
|
105
|
+
"delayed-w3c-test": "run-s delay w3c-build-only test:w3c",
|
|
106
|
+
"w3c-test": "run-s clean-w3c test-and-start:w3c",
|
|
107
|
+
"w3c-good-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js good",
|
|
108
|
+
"w3c-bad-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js bad",
|
|
109
|
+
"w3c-good-worker-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js good-worker",
|
|
110
|
+
"w3c-good": "run-s w3c-build w3c-good-only clean-w3c",
|
|
111
|
+
"w3c-bad": "run-s w3c-build w3c-bad-only clean-w3c",
|
|
112
|
+
"w3c-good-test": "run-s w3c-good-only clean-w3c",
|
|
113
|
+
"w3c-bad-test": "run-s w3c-bad-only clean-w3c",
|
|
114
|
+
"w3c-any-workers-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js any-workers",
|
|
115
|
+
"w3c-non-workers-only": "NODE_OPTIONS=--max_old_space_size=16384 node --trace-warnings test-support/node-idb-test.js"
|
|
116
|
+
},
|
|
31
117
|
"repository": {
|
|
32
118
|
"type": "git",
|
|
33
119
|
"url": "https://github.com/indexeddbshim/IndexedDBShim"
|
|
@@ -84,51 +170,51 @@
|
|
|
84
170
|
"node": "^22.18.0 || >= 24.11.0"
|
|
85
171
|
},
|
|
86
172
|
"dependencies": {
|
|
87
|
-
"@node-static/node-static": "^0.9.
|
|
173
|
+
"@node-static/node-static": "^0.9.2",
|
|
88
174
|
"canvas": "^3.2.3",
|
|
89
175
|
"eventtargeter": "0.12.0",
|
|
90
176
|
"sync-promise-expanded": "^2.0.0",
|
|
91
177
|
"typeson": "10.3.0",
|
|
92
|
-
"typeson-registry": "14.
|
|
178
|
+
"typeson-registry": "14.7.0",
|
|
93
179
|
"websql-configurable": "^4.0.0"
|
|
94
180
|
},
|
|
95
181
|
"devDependencies": {
|
|
96
182
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
97
|
-
"@babel/core": "^8.0.
|
|
98
|
-
"@babel/preset-env": "^8.0.
|
|
183
|
+
"@babel/core": "^8.0.5",
|
|
184
|
+
"@babel/preset-env": "^8.0.5",
|
|
99
185
|
"@es-joy/json-file-reporter": "^2.0.0",
|
|
100
186
|
"@rollup/plugin-babel": "^7.1.0",
|
|
101
187
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
102
188
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
103
189
|
"@rollup/plugin-terser": "^1.0.0",
|
|
104
|
-
"@types/node": "^26.
|
|
190
|
+
"@types/node": "^26.5.1",
|
|
105
191
|
"@types/websql": "^0.0.30",
|
|
106
|
-
"@unicode/unicode-17.0.0": "^2.0.
|
|
192
|
+
"@unicode/unicode-17.0.0": "^2.0.7",
|
|
107
193
|
"babel-plugin-add-module-exports": "1.0.4",
|
|
108
|
-
"bson": "^7.3.
|
|
194
|
+
"bson": "^7.3.3",
|
|
109
195
|
"builtin-modules": "^5.3.0",
|
|
110
196
|
"c8": "^12.0.0",
|
|
111
197
|
"chai": "6.2.2",
|
|
112
198
|
"chokidar-cli": "^3.0.0",
|
|
113
199
|
"colors": "1.4.0",
|
|
114
200
|
"copyfiles": "^2.4.1",
|
|
115
|
-
"coveradge": "^0.
|
|
201
|
+
"coveradge": "^0.9.0",
|
|
116
202
|
"delay-cli": "^3.0.0",
|
|
117
203
|
"eslint": "^10.10.0",
|
|
118
|
-
"eslint-config-ash-nazg": "^43.1.
|
|
204
|
+
"eslint-config-ash-nazg": "^43.1.10",
|
|
119
205
|
"globals": "^17.12.0",
|
|
120
206
|
"is-date-object": "1.1.0",
|
|
121
207
|
"isomorphic-fetch": "^3.0.0",
|
|
122
208
|
"jsdom": "^30.0.1",
|
|
123
|
-
"license-badger": "^0.23.
|
|
209
|
+
"license-badger": "^0.23.1",
|
|
124
210
|
"local-xmlhttprequest": "4.0.0",
|
|
125
|
-
"mocha": "^12.0.
|
|
211
|
+
"mocha": "^12.0.1",
|
|
126
212
|
"mocha-badge-generator": "^0.13.0",
|
|
127
213
|
"mocha-multi-reporters": "1.5.2",
|
|
128
214
|
"npm-run-all": "^4.1.5",
|
|
129
215
|
"open-cli": "^9.0.0",
|
|
130
216
|
"rimraf": "^6.1.3",
|
|
131
|
-
"rollup": "^4.63.
|
|
217
|
+
"rollup": "^4.63.3",
|
|
132
218
|
"rollup-plugin-filesize": "^10.0.0",
|
|
133
219
|
"sinon": "^22.1.0",
|
|
134
220
|
"source-map-support": "0.5.21",
|
|
@@ -143,86 +229,5 @@
|
|
|
143
229
|
"unrs-resolver@1.12.2": true,
|
|
144
230
|
"better-sqlite3@13.0.3": true,
|
|
145
231
|
"is-hidden-file@1.1.2": true
|
|
146
|
-
},
|
|
147
|
-
"scripts": {
|
|
148
|
-
"attw": "attw --pack . --profile node16",
|
|
149
|
-
"tsc": "tsc",
|
|
150
|
-
"tsc-prod": "tsc -p tsconfig-prod.json",
|
|
151
|
-
"tsc:ts7": "npx -y -p typescript@^7 -c \"tsc\"",
|
|
152
|
-
"tsc-prod:ts7": "npx -y typescript@^7 tsc -p tsconfig-prod.json",
|
|
153
|
-
"build": "rm -R dist && npm run tsc-prod && npm run rollup",
|
|
154
|
-
"license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
|
|
155
|
-
"license-badge-dev": "license-badger --corrections --filteredTypes=nonempty --textTemplate \"License types\n(all devDeps)\" --allDevelopment badges/licenses-badge-dev.svg",
|
|
156
|
-
"license-badges": "run-p license-badge license-badge-dev",
|
|
157
|
-
"start": "static -p 9999 -H '{\"Access-Control-Allow-Origin\": \"http://web-platform.test:8000\", \"Access-Control-Allow-Methods\": \"GET\", \"Access-Control-Allow-Headers\": \"Content-Type\"}'",
|
|
158
|
-
"watch": "chokidar \"src/*\" \"node_modules/eventtarget/EventTarget.js\" \"node_modules/websql/lib/websql/WebSQLTransaction.js\" \"node_modules/websql/lib/websql/WebSQLDatabase.js\" -c \"npm run rollup\"",
|
|
159
|
-
"dev": "run-p start watch",
|
|
160
|
-
"clean": "run-p clean-sysDB clean-mocha clean-fake clean-mock clean-w3c clean-w3cOld",
|
|
161
|
-
"clean-sysDB": "rimraf __sysdb__*",
|
|
162
|
-
"clean-polyfill": "run-p clean-fake clean-mock clean-w3cOld clean-sysDB",
|
|
163
|
-
"clean-mocha": "rimraf D_indexeddbshim_test_database_* D_test.sqlite",
|
|
164
|
-
"clean-fake": "rimraf D_test0.*",
|
|
165
|
-
"clean-mock": "rimraf D_test_database*",
|
|
166
|
-
"clean-w3c": "rimraf D_opaque* D_inbox* D_output* D_*_bucket_* D_^D^B2* D_db* D_test* D_about* D_^I^D^B* D_blank* D_database_name* D_idbtransaction* D_x D_x.sqlite D_y D_y.sqlite D_webworker* D_http*",
|
|
167
|
-
"clean-w3cOld": "rimraf D_db.sqlite* D_test* D_database_name* D_idbtransaction*",
|
|
168
|
-
"clean-w3c-built": "rimraf test-support/js",
|
|
169
|
-
"copy": "copyup node_modules/source-map-support/browser-source-map-support.js node_modules/mocha/mocha.css node_modules/mocha/mocha.js node_modules/chai/chai.js node_modules/sinon/pkg/sinon-no-sourcemaps.js test-support",
|
|
170
|
-
"fix-permissions": "chmod +x node_modules/npm-run-all/bin/*/index.js",
|
|
171
|
-
"lint": "eslint .",
|
|
172
|
-
"eslint": "npm run lint --",
|
|
173
|
-
"w3c-build-only": "node test-support/node-buildjs",
|
|
174
|
-
"w3c-build": "run-s clean-w3c clean-w3c-built w3c-build-only",
|
|
175
|
-
"fake": "run-s clean-fake coverage:fake clean-fake",
|
|
176
|
-
"mock": "run-s clean-mock coverage:mock clean-mock",
|
|
177
|
-
"w3c-old": "run-s clean-w3cOld coverage:w3cOld clean-w3cOld",
|
|
178
|
-
"tests-polyfill": "run-s clean-polyfill coverage:fake coverage:mock coverage:w3cOld",
|
|
179
|
-
"mocha": "run-s clean-mocha coverage:mocha clean-mocha",
|
|
180
|
-
"rollup": "rollup -c",
|
|
181
|
-
"coverage:fake": "c8 --silent --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+fake --require source-map-support/register tests-polyfill/fakeIndexedDB/test-node.js",
|
|
182
|
-
"coverage:mock": "c8 --silent --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+mock --require source-map-support/register tests-polyfill/indexedDBmock/test-node.js",
|
|
183
|
-
"coverage:w3cOld": "c8 --silent --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+w3c --require source-map-support/register tests-polyfill/w3c/test-node.js",
|
|
184
|
-
"coverage:w3c": "NODE_OPTIONS=--max_old_space_size=16384 c8 --silent --no-clean npm run w3c-test-only",
|
|
185
|
-
"test:w3c": "NODE_OPTIONS=--max_old_space_size=16384 NODE_OPTIONS=--trace-warnings node test-support/node-idb-test.js",
|
|
186
|
-
"w3c-test-only": "NODE_OPTIONS=--max_old_space_size=16384 node --trace-warnings test-support/node-idb-test.js",
|
|
187
|
-
"coverage:mocha": "c8 --silent --no-clean mocha --reporter-options configFile=mocha-multi-reporters.json,cmrOutput=@es-joy/json-file-reporter+output+mocha --require source-map-support/register tests-mocha/test-node.js",
|
|
188
|
-
"coverage-badge": "coveradge badges/coverage-badge",
|
|
189
|
-
"coverage:report-only": "c8 report",
|
|
190
|
-
"coverage:report": "run-s coverage:report-only",
|
|
191
|
-
"remove-cache": "rimraf node_modules/.cache",
|
|
192
|
-
"remove-cov": "rimraf .nyc_output ",
|
|
193
|
-
"remove-results": "rimraf test-support/results/file*.json",
|
|
194
|
-
"coverage:polyfill": "run-s coverage:fake coverage:mock coverage:w3cOld",
|
|
195
|
-
"tests-badge": "mbg --fileGlob \"./test-support/results/file*.json\" --badge_output badges/tests-badge.svg",
|
|
196
|
-
"coverage": "run-s -c clean remove-cache remove-cov remove-results coverage:fake coverage:mock coverage:mocha coverage:w3c clean tests-badge coverage-badge coverage:report",
|
|
197
|
-
"open-coverage-only": "open http://127.0.0.1:9999/coverage/lcov-report/",
|
|
198
|
-
"open-coverage": "run-p start open-coverage-only",
|
|
199
|
-
"test": "run-s lint coverage",
|
|
200
|
-
"submodules-init": "git submodule update --init --recursive",
|
|
201
|
-
"submodules-fetch": "git submodule foreach --recursive git fetch",
|
|
202
|
-
"submodules-merge": "git submodule foreach git merge origin master",
|
|
203
|
-
"submodules": "run-s submodules-init submodules-fetch submodules-merge",
|
|
204
|
-
"wpt": "run-p start web-platform-tests",
|
|
205
|
-
"web-platform-tests": "cd web-platform-tests && ./wpt serve",
|
|
206
|
-
"stop-server": "pkill -f \"static -p 9999\" || true",
|
|
207
|
-
"stop-wpt": "pkill -f \"wpt serve\" || true",
|
|
208
|
-
"stop": "run-s stop-server stop-wpt",
|
|
209
|
-
"w3c-find-unused": "node test-support/find-unused.js",
|
|
210
|
-
"w3c": "run-s w3c-test",
|
|
211
|
-
"w3c-add-wrap": "node test-support/wrap-w3c-tests",
|
|
212
|
-
"w3c-remove-wrap": "node test-support/wrap-w3c-tests remove",
|
|
213
|
-
"w3c-wrap": "node test-support/wrap-w3c-tests",
|
|
214
|
-
"test-and-start:w3c": "run-p -r start web-platform-tests delayed-w3c-test",
|
|
215
|
-
"delay": "delay 9",
|
|
216
|
-
"delayed-w3c-test": "run-s delay w3c-build-only test:w3c",
|
|
217
|
-
"w3c-test": "run-s clean-w3c test-and-start:w3c",
|
|
218
|
-
"w3c-good-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js good",
|
|
219
|
-
"w3c-bad-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js bad",
|
|
220
|
-
"w3c-good-worker-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js good-worker",
|
|
221
|
-
"w3c-good": "run-s w3c-build w3c-good-only clean-w3c",
|
|
222
|
-
"w3c-bad": "run-s w3c-build w3c-bad-only clean-w3c",
|
|
223
|
-
"w3c-good-test": "run-s w3c-good-only clean-w3c",
|
|
224
|
-
"w3c-bad-test": "run-s w3c-bad-only clean-w3c",
|
|
225
|
-
"w3c-any-workers-only": "NODE_OPTIONS=--max_old_space_size=16384 node test-support/node-idb-test.js any-workers",
|
|
226
|
-
"w3c-non-workers-only": "NODE_OPTIONS=--max_old_space_size=16384 node --trace-warnings test-support/node-idb-test.js"
|
|
227
232
|
}
|
|
228
|
-
}
|
|
233
|
+
}
|
package/src/CFG.js
CHANGED
|
@@ -106,7 +106,7 @@ const CFG = /** @type {ConfigValues} */ ({});
|
|
|
106
106
|
// In the non-Unicode builds, defaults to /[$0-9A-Z_a-z]/
|
|
107
107
|
'UnicodeIDContinue',
|
|
108
108
|
|
|
109
|
-
// Used by
|
|
109
|
+
// Used by Sca.js for optional restructuring of typeson-registry
|
|
110
110
|
// Structured Cloning Algorithm; should only be needed for ensuring data
|
|
111
111
|
// created in 3.* versions of IndexedDBShim continue to work; see the
|
|
112
112
|
// library `typeson-registry-sca-reverter` to get a function to do this
|
package/src/IDBTransaction.js
CHANGED
|
@@ -56,6 +56,7 @@ const readonlyProperties = ['objectStoreNames', 'mode', 'durability', 'db', 'err
|
|
|
56
56
|
* __requestsFinished: boolean,
|
|
57
57
|
* __transFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
58
58
|
* __callTransFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
59
|
+
* __usesStandardDriver: () => boolean,
|
|
59
60
|
* __transactionEndCallback: (() => void)|undefined,
|
|
60
61
|
* __transactionFinished: boolean,
|
|
61
62
|
* __completed: boolean,
|
|
@@ -192,6 +193,29 @@ IDBTransaction.prototype.__transFinishedCb = function (err, cb) {
|
|
|
192
193
|
cb(Boolean(err));
|
|
193
194
|
};
|
|
194
195
|
|
|
196
|
+
/**
|
|
197
|
+
* A standard (3-argument) `transaction()`/`readTransaction()` implementation
|
|
198
|
+
* (browser WebSQL, `cordova-plugin-sqlite-2`, etc.) never invokes the
|
|
199
|
+
* non-standard 4th callback that installs the real `__transFinishedCb`,
|
|
200
|
+
* and finalizes its own underlying SQL transaction synchronously, as soon
|
|
201
|
+
* as it sees no further `executeSql` call already in flight or queued --
|
|
202
|
+
* with no way for it to know a JS-level continuation (e.g. an
|
|
203
|
+
* `await`-deferred follow-up request) is still coming. Detected via
|
|
204
|
+
* arity, checking whichever of the two methods this transaction's own
|
|
205
|
+
* mode actually uses.
|
|
206
|
+
* @this {IDBTransactionFull}
|
|
207
|
+
* @returns {boolean}
|
|
208
|
+
*/
|
|
209
|
+
IDBTransaction.prototype.__usesStandardDriver = function () {
|
|
210
|
+
const me = this;
|
|
211
|
+
const dbConn = me.db && me.db.__db;
|
|
212
|
+
const dbMethodName = me.mode === 'readonly' ? 'readTransaction' : 'transaction';
|
|
213
|
+
const supportsNonstandardTransCb = Boolean(
|
|
214
|
+
dbConn && typeof dbConn[dbMethodName] === 'function' && dbConn[dbMethodName].length >= 4
|
|
215
|
+
);
|
|
216
|
+
return !supportsNonstandardTransCb;
|
|
217
|
+
};
|
|
218
|
+
|
|
195
219
|
/**
|
|
196
220
|
* In Node, the real (SQL-commit-capable) `__transFinishedCb` is only
|
|
197
221
|
* installed once the underlying WebSQL driver's own SQL-queue-idle check
|
|
@@ -226,19 +250,11 @@ IDBTransaction.prototype.__callTransFinishedCb = function (err, cb) {
|
|
|
226
250
|
return;
|
|
227
251
|
}
|
|
228
252
|
if (me.__transFinishedCb === IDBTransaction.prototype.__transFinishedCb) {
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
|
|
234
|
-
// actually uses -- see `__executeRequests`) and, if it's not supported,
|
|
235
|
-
// just call the default (the driver auto-commits on its own).
|
|
236
|
-
const dbConn = me.db && me.db.__db;
|
|
237
|
-
const dbMethodName = me.mode === 'readonly' ? 'readTransaction' : 'transaction';
|
|
238
|
-
const supportsNonstandardTransCb = Boolean(
|
|
239
|
-
dbConn && typeof dbConn[dbMethodName] === 'function' && dbConn[dbMethodName].length >= 4
|
|
240
|
-
);
|
|
241
|
-
if (!supportsNonstandardTransCb) {
|
|
253
|
+
// Waiting here for the non-standard 4th callback to install the real
|
|
254
|
+
// `__transFinishedCb` would defer forever on a standard driver, which
|
|
255
|
+
// never invokes it -- call the default instead (the driver auto-commits
|
|
256
|
+
// on its own).
|
|
257
|
+
if (me.__usesStandardDriver()) {
|
|
242
258
|
me.__transFinishedCbFired = true;
|
|
243
259
|
me.__transFinishedCb(err, cb);
|
|
244
260
|
return;
|
|
@@ -276,10 +292,52 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
276
292
|
me.db.__db[me.mode === 'readonly' ? 'readTransaction' : 'transaction']( // `readTransaction` is optimized, at least in `node-websql`
|
|
277
293
|
function executeRequests (tx) {
|
|
278
294
|
me.__tx = tx;
|
|
295
|
+
const isStandardDriver = me.__usesStandardDriver();
|
|
279
296
|
/** @type {RequestInfo} */
|
|
280
297
|
let q,
|
|
281
298
|
i = -1;
|
|
282
299
|
|
|
300
|
+
/**
|
|
301
|
+
* A continuation that must still be able to observe the
|
|
302
|
+
* transaction as safe to extend (e.g., re-checking whether an
|
|
303
|
+
* `await`-based follow-up request has arrived yet, or giving a
|
|
304
|
+
* same-tick microtask scheduled from a handler a chance to run
|
|
305
|
+
* first) can normally just be deferred via `queueMicrotask`.
|
|
306
|
+
* That alone isn't safe on a standard (3-argument) driver,
|
|
307
|
+
* though: it finalizes its own underlying SQL transaction
|
|
308
|
+
* synchronously, as soon as it sees no further `executeSql`
|
|
309
|
+
* call already in flight or queued, and a microtask hop by
|
|
310
|
+
* itself never issues one -- so the driver already considers
|
|
311
|
+
* the transaction done by the time the deferred continuation
|
|
312
|
+
* runs, silently dropping whatever it tries to do next. Issuing
|
|
313
|
+
* a harmless `SELECT 1` instead keeps the driver's own queue
|
|
314
|
+
* non-empty across that same gap, at the cost of a real SQL
|
|
315
|
+
* round trip; Node's driver doesn't need this since its real
|
|
316
|
+
* commit/rollback is already deferred separately, via
|
|
317
|
+
* `nonstandardTransCb`.
|
|
318
|
+
* @param {() => void} cb
|
|
319
|
+
* @returns {void}
|
|
320
|
+
*/
|
|
321
|
+
function keepAliveAndWait (cb) {
|
|
322
|
+
if (!isStandardDriver) {
|
|
323
|
+
queueMicrotask(cb);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
try {
|
|
327
|
+
tx.executeSql('SELECT 1', [], function () {
|
|
328
|
+
cb();
|
|
329
|
+
}, function () {
|
|
330
|
+
cb();
|
|
331
|
+
return false; // Don't roll back the transaction over a keep-alive no-op
|
|
332
|
+
});
|
|
333
|
+
} catch (err) {
|
|
334
|
+
// The driver has already finalized the transaction (or otherwise
|
|
335
|
+
// rejected the call) -- nothing left to hold open, so fall back
|
|
336
|
+
// to a plain microtask hop for the continuation itself.
|
|
337
|
+
queueMicrotask(cb);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
283
341
|
/**
|
|
284
342
|
* @typedef {unknown} IDBRequestResult
|
|
285
343
|
*/
|
|
@@ -462,9 +520,9 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
462
520
|
* from a microtask -- so if the JS-level queue is merely found
|
|
463
521
|
* empty here, that doesn't yet mean no more work is coming, only
|
|
464
522
|
* that none has been queued *yet*. Re-check across a small, bounded
|
|
465
|
-
* number of further
|
|
466
|
-
* chain like `await store.put(...); await store.get(...)`
|
|
467
|
-
* up) before finally concluding the transaction is genuinely done.
|
|
523
|
+
* number of further turns (see `keepAliveAndWait`, letting a typical
|
|
524
|
+
* `await` chain like `await store.put(...); await store.get(...)`
|
|
525
|
+
* catch up) before finally concluding the transaction is genuinely done.
|
|
468
526
|
* Applies to `readonly` transactions too, not just `readwrite`/
|
|
469
527
|
* `versionchange`: a `readonly` transaction's `complete` event
|
|
470
528
|
* can otherwise fire synchronously, immediately after its last
|
|
@@ -494,7 +552,7 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
494
552
|
}
|
|
495
553
|
return;
|
|
496
554
|
}
|
|
497
|
-
|
|
555
|
+
keepAliveAndWait(() => {
|
|
498
556
|
checkQueueEntry(attemptsLeft - 1);
|
|
499
557
|
});
|
|
500
558
|
}
|
|
@@ -549,7 +607,7 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
549
607
|
checkQueueEntry(10);
|
|
550
608
|
return;
|
|
551
609
|
}
|
|
552
|
-
|
|
610
|
+
keepAliveAndWait(() => {
|
|
553
611
|
if (me.__errored || me.__requestsFinished) {
|
|
554
612
|
return;
|
|
555
613
|
}
|
|
@@ -18,10 +18,11 @@ const __setGlobalVars = function (idb, initialConfig = {}) {
|
|
|
18
18
|
escapeNULForSQLiteStatements: false,
|
|
19
19
|
...initialConfig
|
|
20
20
|
});
|
|
21
|
-
/*
|
|
21
|
+
/* c8 ignore start -- TS guard */
|
|
22
22
|
if (!obj.shimIndexedDB) {
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
+
/* c8 ignore stop -- TS guard */
|
|
25
26
|
obj.shimIndexedDB.__setUnicodeIdentifiers(UnicodeIdentifiers);
|
|
26
27
|
|
|
27
28
|
return obj;
|
package/src/setGlobalVars.js
CHANGED
|
@@ -290,10 +290,11 @@ function setGlobalVars (idb, initialConfig) {
|
|
|
290
290
|
setNonIDBGlobals();
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
/*
|
|
293
|
+
/* c8 ignore start -- TS guard */
|
|
294
294
|
if (!IDB.shimIndexedDB) {
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
+
/* c8 ignore stop -- TS guard */
|
|
297
298
|
IDB.shimIndexedDB.__setConnectionQueueOrigin();
|
|
298
299
|
}
|
|
299
300
|
};
|
package/src/unicode-regex.js
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var regex$1;
|
|
8
|
-
var hasRequiredRegex;
|
|
9
|
-
|
|
10
|
-
function requireRegex () {
|
|
11
|
-
if (hasRequiredRegex) return regex$1;
|
|
12
|
-
hasRequiredRegex = 1;
|
|
13
|
-
regex$1=/[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD801[\uDDC9\uDDE4]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C\uDF83\uDF85\uDF8E\uDF91\uDFC5\uDFC7\uDFC8]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD818[\uDD21-\uDD28]|\uD81B[\uDD68-\uDD6A]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
14
|
-
return regex$1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
var regexExports = requireRegex();
|
|
18
|
-
var regex = /*@__PURE__*/getDefaultExportFromCjs(regexExports);
|
|
3
|
+
var regex = /[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD801[\uDDC9\uDDE4]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C\uDF83\uDF85\uDF8E\uDF91\uDFC5\uDFC7\uDFC8]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD806\uDD38|\uD818[\uDD21-\uDD28]|\uD81B[\uDD68-\uDD6A]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;
|
|
19
4
|
|
|
20
5
|
export { regex as default };
|
package/src/util.js
CHANGED
|
@@ -296,16 +296,6 @@ function isBlob (obj) {
|
|
|
296
296
|
'slice' in obj && typeof obj.slice === 'function' && !('lastModified' in obj);
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
* @param {AnyValue} obj
|
|
302
|
-
* @returns {boolean}
|
|
303
|
-
*/
|
|
304
|
-
function isRegExp (obj) {
|
|
305
|
-
return isObj(obj) && 'flags' in obj && typeof obj.flags === 'string' &&
|
|
306
|
-
'exec' in obj && typeof obj.exec === 'function';
|
|
307
|
-
}
|
|
308
|
-
|
|
309
299
|
/**
|
|
310
300
|
*
|
|
311
301
|
* @param {AnyValue} obj
|
|
@@ -664,7 +654,7 @@ export {escapeSQLiteStatement, unescapeSQLiteResponse,
|
|
|
664
654
|
escapeStoreNameForSQL, escapeIndexNameForSQL, escapeIndexNameForSQLKeyColumn,
|
|
665
655
|
sqlLIKEEscape, sqlQuote, joinPath,
|
|
666
656
|
instanceOf,
|
|
667
|
-
isObj, isDate, isBlob,
|
|
657
|
+
isObj, isDate, isBlob, isFile, isBinary, isIterable,
|
|
668
658
|
defineOuterInterface, defineReadonlyOuterInterface,
|
|
669
659
|
defineListenerProperties, defineReadonlyProperties,
|
|
670
660
|
setOperationNames,
|