Skip to content

Commit c67428b

Browse files
committed
fix(workflow): replace NODE_AUTH_TOKEN with OIDC auth for npm publish
fix(expo-package): README example
1 parent 557c07b commit c67428b

5 files changed

Lines changed: 18 additions & 20 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,6 @@ jobs:
431431
cd expo-package
432432
npm publish --provenance --access public
433433
echo "✓ Published @sqliteai/sqlite-sync-expo@${{ steps.tag.outputs.version }}"
434-
env:
435-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
436434
437435
- uses: softprops/action-gh-release@v2.2.1
438436
if: steps.tag.outputs.version != ''
@@ -442,7 +440,7 @@ jobs:
442440
443441
[**Node**](https://www.npmjs.com/package/@sqliteai/sqlite-sync): `npm install @sqliteai/sqlite-sync`
444442
[**WASM**](https://www.npmjs.com/package/@sqliteai/sqlite-wasm): `npm install @sqliteai/sqlite-wasm`
445-
[**Expo/React Native**](https://www.npmjs.com/package/@sqliteai/sqlite-sync-expo): `npm install @sqliteai/sqlite-sync-expo`
443+
[**Expo**](https://www.npmjs.com/package/@sqliteai/sqlite-sync-expo): `npm install @sqliteai/sqlite-sync-expo`
446444
[**Android**](https://central.sonatype.com/artifact/ai.sqlite/sync): `ai.sqlite:sync:${{ steps.tag.outputs.version }}`
447445
[**Swift**](https://github.com/sqliteai/sqlite-sync#swift-package): [Installation Guide](https://github.com/sqliteai/sqlite-sync#swift-package)
448446

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ SQLiteDatabase db = SQLiteDatabase.openDatabase(config, null, null);
176176

177177
**Note:** Additional settings and configuration are required for a complete setup. For full implementation details, see the [complete Android example](https://github.com/sqliteai/sqlite-extensions-guide/blob/main/examples/android/README.md).
178178

179-
### React Native / Expo
179+
### Expo
180180

181181
Install the Expo package:
182182

@@ -203,14 +203,14 @@ npx expo prebuild --clean
203203
Load the extension:
204204

205205
```typescript
206-
import { open } from '@op-engineering/op-sqlite';
207206
import { Platform } from 'react-native';
207+
import { getDylibPath, open } from '@op-engineering/op-sqlite';
208208

209209
const db = open({ name: 'mydb.db' });
210210

211211
// Load SQLite Sync extension
212212
if (Platform.OS === 'ios') {
213-
const path = db.getDylibPath('ai.sqlite.cloudsync', 'CloudSync');
213+
const path = getDylibPath('ai.sqlite.cloudsync', 'CloudSync');
214214
db.loadExtension(path);
215215
} else {
216216
db.loadExtension('cloudsync');

packages/expo/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ cd packages/expo
103103
node generate-expo-package.js 0.8.57 ../../artifacts ./expo-package
104104
```
105105

106-
### Step 3: Test in a React Native app
106+
### Step 3: Test in a Expo app
107107

108108
```bash
109-
# In your RN/Expo app
109+
# In your Expo app
110110
npm install /path/to/sqlite-sync/packages/expo/expo-package
111111

112112
# Or use file: reference in package.json

packages/expo/generate-expo-package.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Generates the @sqliteai/sqlite-sync-expo package
55
*
66
* This script creates an npm package that bundles CloudSync binaries
7-
* for React Native/Expo apps, with an Expo config plugin for automatic setup.
7+
* for Expo apps, with an Expo config plugin for automatic setup.
88
*
99
* Usage:
1010
* node generate-expo-package.js <version> <artifacts-dir> <output-dir>
@@ -30,7 +30,7 @@ function generatePackageJson(version) {
3030
return {
3131
name: '@sqliteai/sqlite-sync-expo',
3232
version: version,
33-
description: 'SQLite Sync extension for React Native/Expo - Sync on-device databases with SQLite Cloud',
33+
description: 'SQLite Sync extension for Expo - Sync on-device databases with SQLite Cloud',
3434
main: 'src/index.js',
3535
types: 'src/index.d.ts',
3636
files: [
@@ -79,7 +79,7 @@ function generateIndexJs() {
7979
return `/**
8080
* @sqliteai/sqlite-sync-expo
8181
*
82-
* SQLite Sync extension binaries for React Native/Expo.
82+
* SQLite Sync extension binaries for Expo.
8383
* This package provides pre-built binaries and an Expo config plugin.
8484
*
8585
* Usage:
@@ -301,7 +301,7 @@ module.exports = withSqliteSync;
301301
function generateReadme(version) {
302302
return `# @sqliteai/sqlite-sync-expo
303303
304-
SQLite Sync extension for React Native/Expo apps.
304+
SQLite Sync extension for Expo apps.
305305
306306
**Version:** ${version}
307307
@@ -310,9 +310,9 @@ This package provides pre-built SQLite Sync binaries for iOS and Android, along
310310
## Installation
311311
312312
\`\`\`bash
313-
npm install @sqliteai/sqlite-sync-expo
313+
npm install @sqliteai/sqlite-sync-expo @op-engineering/op-sqlite
314314
# or
315-
yarn add @sqliteai/sqlite-sync-expo
315+
yarn add @sqliteai/sqlite-sync-expo @op-engineering/op-sqlite
316316
\`\`\`
317317
318318
## Setup
@@ -340,24 +340,24 @@ The plugin will automatically:
340340
### 3. Load Extension in Code
341341
342342
\`\`\`typescript
343-
import { open } from '@op-engineering/op-sqlite';
344343
import { Platform } from 'react-native';
344+
import { getDylibPath, open } from '@op-engineering/op-sqlite';
345345
346346
const db = open({ name: 'mydb.db' });
347347
348348
// Load SQLite Sync extension
349349
if (Platform.OS === 'ios') {
350350
// iOS requires the bundle ID and framework name
351-
const path = db.getDylibPath('ai.sqlite.cloudsync', 'CloudSync');
351+
const path = getDylibPath('ai.sqlite.cloudsync', 'CloudSync');
352352
db.loadExtension(path);
353353
} else {
354354
// Android just needs the library name
355355
db.loadExtension('cloudsync');
356356
}
357357
358358
// Verify it works
359-
const result = db.execute('SELECT cloudsync_uuid() as uuid');
360-
console.log('SQLite Sync UUID:', result.rows[0].uuid);
359+
const result = db.executeSync('SELECT cloudsync_version() as version');
360+
console.log('SQLite Sync Version:', result.rows[0].version);
361361
\`\`\`
362362
363363
## Supported Platforms
@@ -375,7 +375,7 @@ console.log('SQLite Sync UUID:', result.rows[0].uuid);
375375
376376
- Expo SDK 51+
377377
- React Native 0.73+
378-
- [@op-engineering/op-sqlite](https://github.com/nickcurizon/op-sqlite) for loading extensions
378+
- [@op-engineering/op-sqlite](https://www.npmjs.com/package/@op-engineering/op-sqlite) for loading extensions
379379
380380
## Links
381381

src/cloudsync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
extern "C" {
2121
#endif
2222

23-
#define CLOUDSYNC_VERSION "0.8.58"
23+
#define CLOUDSYNC_VERSION "0.8.59"
2424

2525
int sqlite3_cloudsync_init (sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi);
2626

0 commit comments

Comments
 (0)