Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/OPSqlite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void install(jsi::Runtime &rt,
_crsqlite_path = std::string(crsqlite_path);
_sqlite_vec_path = std::string(sqlite_vec_path);
opsqlite::invoker = invoker;
opsqlite::invalidated = false;

auto open = HFN0 {
jsi::Object options = args[0].asObject(rt);
Expand Down
1 change: 0 additions & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const root = path.resolve(__dirname, '..');
module.exports = getConfig(
{
presets: ['module:@react-native/babel-preset'],
plugins: ['nativewind/babel'],
},
{root, pkg},
);
1 change: 0 additions & 1 deletion example/globals.d.ts

This file was deleted.

4 changes: 2 additions & 2 deletions example/ios/OPSQLiteExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
Expand Down Expand Up @@ -34,7 +34,7 @@
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string>Location is needed</string>
<key>RCTNewArchEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
FBLazyVector: 2e5b5553df729e080483373db6f045201ff4e6db
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
op-sqlite: 7e1d781318b8f936bd7afe0773cf0d2e0b81780b
op-sqlite: dab20bf7d412623996a2247014d04a8cbb1ccb0a
OpServer: 63fc523290a5c7c6f98dc7ba5e76cc720d798259
RCTDeprecation: c6b36da89aa26090c8684d29c2868dcca2cd4554
RCTRequired: 1413a0844770d00fa1f1bb2da4680adfa8698065
Expand Down
1 change: 0 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"chance": "^1.1.9",
"clsx": "^2.0.0",
"events": "^3.3.0",
"nativewind": "^2.0.11",
"react": "19.1.1",
"react-native": "0.82.1",
"react-native-safe-area-context": "^5.6.2"
Expand Down
12 changes: 7 additions & 5 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
allTestsPassed,
} from '@op-engineering/op-test';
import './tests'; // import all tests to register them
import {SafeAreaView} from 'react-native-safe-area-context';
import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
import {StyleSheet} from 'react-native';

export default function App() {
Expand Down Expand Up @@ -54,15 +54,17 @@ export default function App() {
// };

return (
<SafeAreaView style={STYLES.container}>
{displayResults(results)}
</SafeAreaView>
<SafeAreaProvider>
<SafeAreaView style={STYLES.container}>
{displayResults(results)}
</SafeAreaView>
</SafeAreaProvider>
);
}

const STYLES = StyleSheet.create({
container: {
height: '100%',
flex: 1,
backgroundColor: '#333',
},
});
1 change: 0 additions & 1 deletion example/src/globals.d.ts

This file was deleted.

24 changes: 18 additions & 6 deletions example/src/tests/dbsetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ it('Can get db path', () => {
db.close();
});

if(isLibsql()) {
it("Libsql can set reserved bytes", async () => {
const db = open({ name: "test.db" });
db.setReservedBytes(28);
expect(db.getReservedBytes()).toEqual(28);
db.delete()
if (isLibsql()) {
it('Libsql can set reserved bytes', async () => {
const db = open({name: 'test.db'});
db.setReservedBytes(28);
expect(db.getReservedBytes()).toEqual(28);
db.delete();
});
}

Expand All @@ -288,3 +288,15 @@ if (isSQLCipher()) {
db.close();
});
}

// This test wasn't really failing, but the module was not being properly
// invalidated/re-created on a hot reload
// Check opsqlite::invalidated
// itOnly('Can execute async pragma', async () => {
// const db = open({
// name: 'pragma.sqlite',
// });

// const result = await db.execute('select sqlite_version() as version');
// expect(result).toBe('1.52');
// });
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,5 @@
"type": "turbo-module",
"version": "0.52.1"
},
"packageManager": "yarn@4.11.0",
"dependencies": {
"react-native-safe-area-context": "^5.6.2"
}
"packageManager": "yarn@4.11.0"
}
Loading