cordova-sqlite-storage
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -11,2 +11,6 @@ # Authors | ||
## browser platform | ||
- Using sql-asm-memory-growth.js built from sql.js by @kripken (Alon Zakai) | ||
## Android version | ||
@@ -13,0 +17,0 @@ |
# Changes | ||
#### cordova-sqlite-storage 5.1.0 | ||
- Add browser platform support using sql-asm-memory-growth.js from sql.js, with some limitations as documented | ||
#### cordova-sqlite-storage 5.0.1 | ||
@@ -4,0 +8,0 @@ |
@@ -7,8 +7,24 @@ # Licenses | ||
## Android version | ||
## for browser platform | ||
MIT or Apache 2.0 | ||
## iOS/macOS version | ||
### sql.js | ||
MIT | ||
## for Android | ||
MIT or Apache 2.0 | ||
### Android-sqlite-connector | ||
Unlicense (public domain) | ||
### Android-sqlite-ext-native-driver | ||
Unlicense (public domain) | ||
## for iOS & macOS | ||
MIT only | ||
@@ -20,3 +36,3 @@ | ||
## Windows version | ||
## for Windows | ||
@@ -31,4 +47,6 @@ MIT or Apache 2.0 | ||
## SQLite3 | ||
## Common native code | ||
### SQLite3 | ||
Public domain |
{ | ||
"name": "cordova-sqlite-storage", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "Native interface to SQLite for PhoneGap/Cordova - cordova-sqlite-storage plugin version", | ||
@@ -9,2 +9,3 @@ "cordova": { | ||
"android", | ||
"browser", | ||
"ios", | ||
@@ -23,2 +24,3 @@ "osx", | ||
"cordova-android", | ||
"cordova-browser", | ||
"cordova-ios", | ||
@@ -35,3 +37,3 @@ "cordova-osx", | ||
"dependencies": { | ||
"cordova-sqlite-storage-dependencies": "2.1.2" | ||
"cordova-sqlite-storage-dependencies": "3.0.0" | ||
}, | ||
@@ -38,0 +40,0 @@ "scripts": { |
@@ -40,4 +40,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -1028,2 +1026,4 @@ describe(scenarioList[i] + ': BASIC db tx sql storage results test(s)', function() { | ||
it(suiteName + 'ALTER TABLE RENAME test', function(done) { | ||
if (isWebSql && isAppleMobileOS) pending('TBD SKIP for (WebKit) Web SQL on iOS'); | ||
var dbname = 'ALTER-TABLE-RENAME-test.db'; | ||
@@ -1030,0 +1030,0 @@ var createdb = openDatabase(dbname, '1.0', 'Test', DEFAULT_SIZE); |
@@ -11,2 +11,3 @@ /* 'use strict'; */ | ||
var isEdgeBrowser = isBrowser && (/Edge/.test(navigator.userAgent)); | ||
var isChromeBrowser = isBrowser && !isEdgeBrowser && (/Chrome/.test(navigator.userAgent)); | ||
var isMac = !isBrowser && /Macintosh/.test(navigator.userAgent); | ||
@@ -18,3 +19,3 @@ var isAppleMobileOS = /iPhone/.test(navigator.userAgent) || | ||
window.hasBrowser = true; | ||
window.hasWebKitWebSQL = isAndroid || (isAppleMobileOS && !hasMobileWKWebView) || (isWebKitBrowser && !isEdgeBrowser); | ||
window.hasWebKitWebSQL = isAndroid || (isAppleMobileOS && !hasMobileWKWebView) || isChromeBrowser; | ||
@@ -21,0 +22,0 @@ describe('Check startup for navigator.userAgent: ' + navigator.userAgent, function() { |
@@ -38,4 +38,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -42,0 +40,0 @@ describe(scenarioList[i] + ': simultaneous tx access test(s)', function() { |
@@ -40,4 +40,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -127,3 +125,3 @@ describe(scenarioList[i] + ': db tx error mapping test(s) [TBD INCORRECT & INCONSISTENT error message on Windows - missing actual error info ref: litehelpers/Cordova-sqlite-storage#539]', function() { | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -159,3 +157,3 @@ else | ||
if (isWindows || isWebSql || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -205,3 +203,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -233,3 +231,3 @@ else | ||
if (isWindows || isWebSql || (isAndroid && isImpl2)) | ||
if (isBrowser || isWindows || isWebSql || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -282,3 +280,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -288,3 +286,3 @@ else | ||
if (isWebSql && (isAppleMobileOS || (/Android [7-9]/.test(navigator.userAgent)))) | ||
if (isWebSql && (isAppleMobileOS || /Android [7-9]/.test(navigator.userAgent) || /Android 1/.test(navigator.userAgent))) | ||
// TBD incomplete input vs syntax error message IGNORED on Android 7.0(+) & iOS 12.0(+) | ||
@@ -322,3 +320,3 @@ expect(error.message).toMatch(/could not prepare statement.*/); | ||
if (isWindows || isWebSql || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -383,3 +381,3 @@ else | ||
expect(true).toBe(true); // SKIP for iOS (WebKit) & Android 4.1-4.3 (WebKit) Web SQL | ||
else if (isWindows) | ||
else if (isBrowser || isWindows) | ||
expect(error.code).toBe(0); | ||
@@ -420,3 +418,3 @@ else | ||
if (isWindows || isWebSql) | ||
if (isWebSql || isBrowser || isWindows) | ||
expect(error.code).toBe(0); | ||
@@ -466,3 +464,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -499,3 +497,3 @@ else | ||
if (isWebSql || isWindows || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -546,3 +544,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -577,3 +575,3 @@ else | ||
if (isWebSql || isWindows || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -625,3 +623,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -657,3 +655,3 @@ else | ||
if (isWebSql || isWindows || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -705,3 +703,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -737,3 +735,3 @@ else | ||
if (isWebSql || isWindows || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -787,3 +785,3 @@ else | ||
if (isWindows || (!isWebSql && isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -824,3 +822,3 @@ else | ||
if (isWebSql || isWindows || (isAndroid && isImpl2)) | ||
if (isWebSql || isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -862,3 +860,3 @@ else | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (!isWebSql && (isBrowser || isWindows || (isAndroid && isImpl2))) | ||
expect(error.code).toBe(0); | ||
@@ -912,3 +910,3 @@ else | ||
expect(true).toBe(true); // SKIP for iOS (WebKit) & Android 4.1-4.3 (WebKit) Web SQL | ||
else if (isWindows) | ||
else if (isBrowser || isWindows) | ||
expect(error.code).toBe(0); | ||
@@ -931,2 +929,4 @@ else | ||
expect(error.message).toMatch(/a statement with no error handler failed:.*constraint failure/); | ||
else if (isBrowser) | ||
expect(error.message).toMatch(/a statement with no error handler failed: Error: UNIQUE constraint failed: test_table\.data/); | ||
else | ||
@@ -933,0 +933,0 @@ expect(error.message).toMatch(/a statement with no error handler failed: UNIQUE constraint failed: test_table\.data/); |
@@ -35,4 +35,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -71,2 +69,3 @@ describe(scenarioList[i] + ': db tx multiple update test(s)', function() { | ||
it(suiteName + 'Multiple updates with key (evidently needs temporary transaction files to work)', function (done) { | ||
// if (!isWebSql && isBrowser) pending('NOT WORKING on browser plugin'); // XXX TBD | ||
var db = openDatabase("MultipleUpdatesWithKey", "1.0", | ||
@@ -73,0 +72,0 @@ "Demo", DEFAULT_SIZE); |
@@ -38,4 +38,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -293,2 +291,3 @@ describe(scenarioList[i] + ': db tx sql features test(s)', function() { | ||
if (isAndroid && isImpl2) pending('NOT IMPLEMENTED for all versions of android.database'); // NOT IMPLEMENTED for all versions of Android database (failed in Circle CI) | ||
if (!isWebSql && isBrowser) pending('NOT IMPLEMENTED on plugin for browser platform'); // FUTURE TODO | ||
@@ -295,0 +294,0 @@ var db = openDatabase('virtual-table-using-r-tree.db', '1.0', 'Test', DEFAULT_SIZE); |
@@ -35,4 +35,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -39,0 +37,0 @@ describe(scenarioList[i] + ': ext tx blob test(s)', function() { |
@@ -31,4 +31,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -60,2 +58,3 @@ describe(scenarioList[i] + ': REGEX test(s)', function() { | ||
if (isWebSql && isAppleMobileOS) pending('SKIP on iOS (WebKit) Web SQL'); | ||
if (!isWebSql && isBrowser) pending('SKIP on plugin on browser - NOT IMPLEMENTED'); | ||
if (!isWebSql && isWindows) pending('SKIP on Windows plugin - NOT IMPLEMENTED'); | ||
@@ -62,0 +61,0 @@ if (!isWebSql && isAndroid && isImpl2 && /Android [2-4]/.test(navigator.userAgent)) pending('TBD SKIP for system android.database provider on Android 2.x-4.x'); |
@@ -14,4 +14,2 @@ /* 'use strict'; */ | ||
describe('Built-in test(s)', function() { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser) return; | ||
@@ -18,0 +16,0 @@ describe('Self test(s)', function() { |
@@ -31,4 +31,2 @@ /* 'use strict'; */ | ||
describe(pluginScenarioList[i] + ': sqlBatch test(s)', function() { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser) return; | ||
@@ -151,3 +149,3 @@ var scenarioName = pluginScenarioList[i]; | ||
expect(rs.rows.item(4).d1).toBe(1234567890123); | ||
if (isMac || hasMobileWKWebView) | ||
if (isBrowser || isMac || hasMobileWKWebView) | ||
expect(rs.rows.item(4).t1).toBe('real'); | ||
@@ -157,3 +155,3 @@ else | ||
expect(rs.rows.item(4).a1).toBe(1234567890123); | ||
if (isMac || hasMobileWKWebView) | ||
if (isBrowser || isMac || hasMobileWKWebView) | ||
expect(rs.rows.item(4).u1).toBe('1234567890123.0'); | ||
@@ -163,3 +161,3 @@ else | ||
expect(rs.rows.item(5).d1).toBe(-1234567890123); | ||
if (isMac || hasMobileWKWebView) | ||
if (isBrowser || isMac || hasMobileWKWebView) | ||
expect(rs.rows.item(5).t1).toBe('real'); | ||
@@ -169,3 +167,3 @@ else | ||
expect(rs.rows.item(5).a1).toBe(1234567890123); | ||
if (isMac || hasMobileWKWebView) | ||
if (isBrowser || isMac || hasMobileWKWebView) | ||
expect(rs.rows.item(5).u1).toBe('-1234567890123.0'); | ||
@@ -241,3 +239,3 @@ else | ||
expect(rs.rows.length).toBe(3); | ||
if (isWindows) { | ||
if (isBrowser || isWindows) { | ||
expect(rs.rows.item(0).d1).toBe(Infinity); | ||
@@ -490,3 +488,3 @@ expect(rs.rows.item(0).t1).toBe('real'); | ||
if (isWindows || (isAndroid && isImpl2)) | ||
if (isBrowser || isWindows || (isAndroid && isImpl2)) | ||
expect(error.code).toBe(0); | ||
@@ -526,3 +524,3 @@ else | ||
if (isWindows) | ||
if (isBrowser || isWindows) | ||
expect(error.code).toBe(0); | ||
@@ -529,0 +527,0 @@ else |
@@ -35,4 +35,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -227,2 +225,3 @@ describe(scenarioList[i] + ': sqlite version test(s)', function() { | ||
expect(rs.rows.item(0).journal_mode).toBe( | ||
(/Android 1/.test(navigator.userAgent)) ? 'truncate' : | ||
(/Android 9/.test(navigator.userAgent)) ? 'wal' : | ||
@@ -229,0 +228,0 @@ (/Android 8.1.99/.test(navigator.userAgent)) ? 'wal' : |
@@ -38,4 +38,2 @@ /* 'use strict'; */ | ||
for (var i=0; i<scenarioCount; ++i) { | ||
// TBD skip plugin test on browser platform (not yet supported): | ||
if (isBrowser && (i === 0)) continue; | ||
@@ -42,0 +40,0 @@ describe(scenarioList[i] + ': tx semantics test(s)', function() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1315948
64
21441
1843
+ Addedcordova-sqlite-storage-dependencies@3.0.0(transitive)
- Removedcordova-sqlite-storage-dependencies@2.1.2(transitive)