[expo-sqlite] Fix Web support (#8518)
# Why
I wanted to clear the way for https://github.com/expo/expo/pull/8242 to be landed (or not). I noticed that web support doesn't look like it should work
[expo-sqlite] Fix Web support (#8518)
# Why
I wanted to clear the way for https://github.com/expo/expo/pull/8242 to be landed (or not). I noticed that web support doesn't look like it should work and that it isn't tested anywhere.
# How
- added SQLite test suite to set run on web
- changed the way we fetch values in test suite from using `._array[0]` to `.item(0)`
- added explanations in `SQLite.types.ts` about why we may need a copy of `@types/websql`
- added `Window` declaration to types declarations
- removed `@types/websql` dependency as it's not even importable
- fixed web counterpart — `SQLite.web.ts` — by fixing the method header and gracefully handling situation where `openDatabase` is not available (I think).
# Test Plan
Test suite passes.
show more ...
|