Skip to content

Commit 2fcbd48

Browse files
committed
fix(packages): change npmjs package names to *-dev
1 parent e0c617d commit 2fcbd48

File tree

11 files changed

+97
-93
lines changed

11 files changed

+97
-93
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ jobs:
382382
383383
# Update package.json
384384
jq --arg version "${{ steps.tag.outputs.version }}" \
385-
'.version = $version | .optionalDependencies = (.optionalDependencies | with_entries(.value = "dev"))' \
385+
'.version = $version | .optionalDependencies = (.optionalDependencies | with_entries(.value = $version))' \
386386
package.json > package.tmp.json && mv package.tmp.json package.json
387387
388388
echo "✓ Updated package.json to version ${{ steps.tag.outputs.version }}"
@@ -405,48 +405,52 @@ jobs:
405405
cd platform-packages
406406
for platform_dir in */; do
407407
platform_name=$(basename "$platform_dir")
408-
echo " Publishing @sqliteai/sqlite-sync-${platform_name}..."
408+
echo " Publishing @sqliteai/sqlite-sync-dev-${platform_name}..."
409409
cd "$platform_dir"
410-
npm publish --provenance --access public --tag dev
410+
npm publish --provenance --access public --tag latest
411411
cd ..
412-
echo " ✓ Published @sqliteai/sqlite-sync-${platform_name}"
412+
echo " ✓ Published @sqliteai/sqlite-sync-dev-${platform_name}"
413413
done
414414
cd ..
415415
416416
# Publish main package
417417
echo "Publishing main package to npm..."
418-
npm publish --provenance --access public --tag dev
419-
echo "✓ Published @sqliteai/sqlite-sync@${{ steps.tag.outputs.version }}"
418+
npm publish --provenance --access public --tag latest
419+
echo "✓ Published @sqliteai/sqlite-sync-dev@${{ steps.tag.outputs.version }}"
420420
421421
echo ""
422422
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
423423
echo "✅ Successfully published 8 packages to npm"
424-
echo " Main: @sqliteai/sqlite-sync@${{ steps.tag.outputs.version }}"
424+
echo " Main: @sqliteai/sqlite-sync-dev@${{ steps.tag.outputs.version }}"
425425
echo " Platform packages: 7"
426426
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
427+
env:
428+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
427429

428430
- name: build and publish expo package
429431
if: steps.tag.outputs.version != ''
430432
run: |
431433
cd packages/expo
432434
433-
echo "Generating @sqliteai/sqlite-sync-expo package..."
435+
echo "Generating @sqliteai/sqlite-sync-expo-dev package..."
434436
node generate-expo-package.js "${{ steps.tag.outputs.version }}" "../../artifacts" "./expo-package"
435437
436-
echo "Publishing @sqliteai/sqlite-sync-expo to npm..."
438+
echo "Publishing @sqliteai/sqlite-sync-expo-dev to npm..."
437439
cd expo-package
438-
npm publish --provenance --access public --tag dev
439-
echo "✓ Published @sqliteai/sqlite-sync-expo@${{ steps.tag.outputs.version }}"
440+
npm publish --provenance --access public --tag latest
441+
echo "✓ Published @sqliteai/sqlite-sync-expo-dev@${{ steps.tag.outputs.version }}"
442+
env:
443+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
440444

441445
- uses: softprops/action-gh-release@v2.2.1
442446
if: steps.tag.outputs.version != ''
443447
with:
444448
body: |
445449
# Packages
446450
447-
[**Node**](https://www.npmjs.com/package/@sqliteai/sqlite-sync): `npm install @sqliteai/sqlite-sync@dev`
451+
[**Node**](https://www.npmjs.com/package/@sqliteai/sqlite-sync-dev): `npm install @sqliteai/sqlite-sync-dev`
448452
[**WASM**](https://www.npmjs.com/package/@sqliteai/sqlite-wasm): `npm install @sqliteai/sqlite-wasm@dev`
449-
[**Expo**](https://www.npmjs.com/package/@sqliteai/sqlite-sync-expo): `npm install @sqliteai/sqlite-sync-expo@dev`
453+
[**Expo**](https://www.npmjs.com/package/@sqliteai/sqlite-sync-expo-dev): `npm install @sqliteai/sqlite-sync-expo-dev`
450454
[**Android**](https://central.sonatype.com/artifact/ai.sqlite/sync.dev): `ai.sqlite:sync.dev:${{ steps.tag.outputs.version }}`
451455
[**Swift**](https://github.com/sqliteai/sqlite-sync-dev#swift-package): [Installation Guide](https://github.com/sqliteai/sqlite-sync-dev#swift-package)
452456

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ sqlite3_close(db)
158158
Add the [following](https://central.sonatype.com/artifact/ai.sqlite/sync.dev) to your Gradle dependencies:
159159

160160
```gradle
161-
implementation 'ai.sqlite:sync.dev:0.9.91'
161+
implementation 'ai.sqlite:sync.dev:0.9.92'
162162
```
163163

164164
Here's an example of how to use the package:

packages/expo/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# @sqliteai/sqlite-sync-expo Generator
1+
# @sqliteai/sqlite-sync-expo-dev Generator
22

3-
This directory contains the generator script for the `@sqliteai/sqlite-sync-expo` npm package.
3+
This directory contains the generator script for the `@sqliteai/sqlite-sync-expo-dev` npm package.
44

55
## How It Works
66

@@ -21,7 +21,7 @@ node generate-expo-package.js <version> <artifacts-dir> <output-dir>
2121
Example:
2222

2323
```bash
24-
node generate-expo-package.js 0.8.57 ../../artifacts ./expo-package
24+
node generate-expo-package.js 0.9.92 ../../artifacts ./expo-package
2525
cd expo-package && npm publish --provenance --access public
2626
```
2727

@@ -54,7 +54,7 @@ To test the generator locally, you need to set up mock artifacts that simulate w
5454
**Option A: Download from latest release**
5555

5656
```bash
57-
VERSION="0.8.57" # or latest version
57+
VERSION="0.9.92" # or latest version
5858

5959
mkdir -p artifacts/cloudsync-apple-xcframework
6060
mkdir -p artifacts/cloudsync-android-arm64-v8a
@@ -100,7 +100,7 @@ cp -r dist/CloudSync.xcframework artifacts/cloudsync-apple-xcframework/
100100

101101
```bash
102102
cd packages/expo
103-
node generate-expo-package.js 0.8.57 ../../artifacts ./expo-package
103+
node generate-expo-package.js 0.9.92 ../../artifacts ./expo-package
104104
```
105105

106106
### Step 3: Test in a Expo app
@@ -110,15 +110,15 @@ node generate-expo-package.js 0.8.57 ../../artifacts ./expo-package
110110
npm install /path/to/sqlite-sync/packages/expo/expo-package
111111

112112
# Or use file: reference in package.json
113-
# "@sqliteai/sqlite-sync-expo": "file:/path/to/sqlite-sync/packages/expo/expo-package"
113+
# "@sqliteai/sqlite-sync-expo-dev": "file:/path/to/sqlite-sync/packages/expo/expo-package"
114114
```
115115

116116
Update `app.json`:
117117

118118
```json
119119
{
120120
"expo": {
121-
"plugins": ["@sqliteai/sqlite-sync-expo"]
121+
"plugins": ["@sqliteai/sqlite-sync-expo-dev"]
122122
}
123123
}
124124
```

packages/expo/generate-expo-package.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
/**
4-
* Generates the @sqliteai/sqlite-sync-expo package
4+
* Generates the @sqliteai/sqlite-sync-expo-dev package
55
*
66
* This script creates an npm package that bundles CloudSync binaries
77
* for Expo apps, with an Expo config plugin for automatic setup.
@@ -10,7 +10,7 @@
1010
* node generate-expo-package.js <version> <artifacts-dir> <output-dir>
1111
*
1212
* Example:
13-
* node generate-expo-package.js 0.8.53 ./artifacts ./expo-package
13+
* node generate-expo-package.js 0.9.92 ./artifacts ./expo-package
1414
*/
1515

1616
const fs = require('fs');
@@ -28,7 +28,7 @@ const ANDROID_ARCHS = [
2828
*/
2929
function generatePackageJson(version) {
3030
return {
31-
name: '@sqliteai/sqlite-sync-expo',
31+
name: '@sqliteai/sqlite-sync-expo-dev',
3232
version: version,
3333
description: 'SQLite Sync extension for Expo - Sync on-device databases with SQLite Cloud',
3434
main: 'src/index.js',
@@ -77,20 +77,20 @@ function generatePackageJson(version) {
7777
*/
7878
function generateIndexJs() {
7979
return `/**
80-
* @sqliteai/sqlite-sync-expo
80+
* @sqliteai/sqlite-sync-expo-dev
8181
*
8282
* SQLite Sync extension binaries for Expo.
8383
* This package provides pre-built binaries and an Expo config plugin.
8484
*
8585
* Usage:
86-
* 1. Add to app.json plugins: ["@sqliteai/sqlite-sync-expo"]
86+
* 1. Add to app.json plugins: ["@sqliteai/sqlite-sync-expo-dev"]
8787
* 2. Run: npx expo prebuild --clean
8888
* 3. Load extension in your code (see README)
8989
*/
9090
9191
module.exports = {
9292
// Package metadata
93-
name: '@sqliteai/sqlite-sync-expo',
93+
name: '@sqliteai/sqlite-sync-expo-dev',
9494
9595
// Extension identifiers for loading
9696
ios: {
@@ -108,7 +108,7 @@ module.exports = {
108108
* Generate src/index.d.ts
109109
*/
110110
function generateIndexDts() {
111-
return `declare module '@sqliteai/sqlite-sync-expo' {
111+
return `declare module '@sqliteai/sqlite-sync-expo-dev' {
112112
export const name: string;
113113
114114
export const ios: {
@@ -131,12 +131,12 @@ function generateAppPlugin() {
131131
* Expo Config Plugin for SQLite Sync Extension
132132
*
133133
* This plugin automatically configures iOS and Android to include the SQLite Sync
134-
* native binaries. Just add "@sqliteai/sqlite-sync-expo" to your app.json plugins.
134+
* native binaries. Just add "@sqliteai/sqlite-sync-expo-dev" to your app.json plugins.
135135
*
136136
* Usage in app.json:
137137
* {
138138
* "expo": {
139-
* "plugins": ["@sqliteai/sqlite-sync-expo"]
139+
* "plugins": ["@sqliteai/sqlite-sync-expo-dev"]
140140
* }
141141
* }
142142
*/
@@ -176,12 +176,12 @@ function withSqliteSyncIOS(config) {
176176
if (!fs.existsSync(srcFrameworkPath)) {
177177
throw new Error(
178178
\`CloudSync.xcframework not found at \${srcFrameworkPath}. \` +
179-
'This is a bug in @sqliteai/sqlite-sync-expo - the package is missing iOS binaries.'
179+
'This is a bug in @sqliteai/sqlite-sync-expo-dev - the package is missing iOS binaries.'
180180
);
181181
}
182182
183183
// Copy xcframework to iOS project directory
184-
console.log(\`[@sqliteai/sqlite-sync-expo] Copying xcframework to \${destFrameworkPath}\`);
184+
console.log(\`[@sqliteai/sqlite-sync-expo-dev] Copying xcframework to \${destFrameworkPath}\`);
185185
fs.cpSync(srcFrameworkPath, destFrameworkPath, { recursive: true });
186186
187187
// Get the main app target
@@ -197,7 +197,7 @@ function withSqliteSyncIOS(config) {
197197
);
198198
199199
if (!embedFrameworksBuildPhase) {
200-
console.log('[@sqliteai/sqlite-sync-expo] Creating "Embed Frameworks" build phase');
200+
console.log('[@sqliteai/sqlite-sync-expo-dev] Creating "Embed Frameworks" build phase');
201201
xcodeProject.addBuildPhase(
202202
[],
203203
'PBXCopyFilesBuildPhase',
@@ -209,7 +209,7 @@ function withSqliteSyncIOS(config) {
209209
210210
// Add the framework to the project
211211
const relativePath = \`\${projectName}/CloudSync.xcframework\`;
212-
console.log(\`[@sqliteai/sqlite-sync-expo] Adding framework: \${relativePath}\`);
212+
console.log(\`[@sqliteai/sqlite-sync-expo-dev] Adding framework: \${relativePath}\`);
213213
214214
xcodeProject.addFramework(relativePath, {
215215
target: target.uuid,
@@ -219,7 +219,7 @@ function withSqliteSyncIOS(config) {
219219
link: true,
220220
});
221221
222-
console.log('[@sqliteai/sqlite-sync-expo] iOS setup complete');
222+
console.log('[@sqliteai/sqlite-sync-expo-dev] iOS setup complete');
223223
return config;
224224
});
225225
}
@@ -257,7 +257,7 @@ function withSqliteSyncAndroid(config) {
257257
// Check source exists
258258
if (!fs.existsSync(srcFile)) {
259259
console.warn(
260-
\`[@sqliteai/sqlite-sync-expo] Warning: \${srcFile} not found, skipping \${arch}\`
260+
\`[@sqliteai/sqlite-sync-expo-dev] Warning: \${srcFile} not found, skipping \${arch}\`
261261
);
262262
continue;
263263
}
@@ -266,11 +266,11 @@ function withSqliteSyncAndroid(config) {
266266
fs.mkdirSync(destDir, { recursive: true });
267267
268268
// Copy the .so file
269-
console.log(\`[@sqliteai/sqlite-sync-expo] Copying \${arch}/cloudsync.so\`);
269+
console.log(\`[@sqliteai/sqlite-sync-expo-dev] Copying \${arch}/cloudsync.so\`);
270270
fs.copyFileSync(srcFile, destFile);
271271
}
272272
273-
console.log('[@sqliteai/sqlite-sync-expo] Android setup complete');
273+
console.log('[@sqliteai/sqlite-sync-expo-dev] Android setup complete');
274274
return config;
275275
},
276276
]);
@@ -280,7 +280,7 @@ function withSqliteSyncAndroid(config) {
280280
* Main plugin function - combines iOS and Android plugins
281281
*/
282282
function withSqliteSync(config) {
283-
console.log('[@sqliteai/sqlite-sync-expo] Configuring SQLite Sync extension...');
283+
console.log('[@sqliteai/sqlite-sync-expo-dev] Configuring SQLite Sync extension...');
284284
285285
// Apply iOS modifications
286286
config = withSqliteSyncIOS(config);
@@ -299,7 +299,7 @@ module.exports = withSqliteSync;
299299
* Generate README.md
300300
*/
301301
function generateReadme(version) {
302-
return `# @sqliteai/sqlite-sync-expo
302+
return `# @sqliteai/sqlite-sync-expo-dev
303303
304304
SQLite Sync extension for Expo apps.
305305
@@ -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 @op-engineering/op-sqlite
313+
npm install @sqliteai/sqlite-sync-expo-dev @op-engineering/op-sqlite
314314
# or
315-
yarn add @sqliteai/sqlite-sync-expo @op-engineering/op-sqlite
315+
yarn add @sqliteai/sqlite-sync-expo-dev @op-engineering/op-sqlite
316316
\`\`\`
317317
318318
## Setup
@@ -322,7 +322,7 @@ yarn add @sqliteai/sqlite-sync-expo @op-engineering/op-sqlite
322322
\`\`\`json
323323
{
324324
"expo": {
325-
"plugins": ["@sqliteai/sqlite-sync-expo"]
325+
"plugins": ["@sqliteai/sqlite-sync-expo-dev"]
326326
}
327327
}
328328
\`\`\`
@@ -396,7 +396,7 @@ function main() {
396396

397397
if (args.length < 3) {
398398
console.error('Usage: node generate-expo-package.js <version> <artifacts-dir> <output-dir>');
399-
console.error('Example: node generate-expo-package.js 0.8.53 ./artifacts ./expo-package');
399+
console.error('Example: node generate-expo-package.js 0.9.92 ./artifacts ./expo-package');
400400
process.exit(1);
401401
}
402402

@@ -405,7 +405,7 @@ function main() {
405405
// Validate version format
406406
if (!/^\d+\.\d+\.\d+$/.test(version)) {
407407
console.error(`Error: Invalid version format: ${version}`);
408-
console.error('Version must be in semver format (e.g., 0.8.53)');
408+
console.error('Version must be in semver format (e.g., 0.9.92)');
409409
process.exit(1);
410410
}
411411

@@ -416,7 +416,7 @@ function main() {
416416
process.exit(1);
417417
}
418418

419-
console.log(`Generating @sqliteai/sqlite-sync-expo package version ${version}...\n`);
419+
console.log(`Generating @sqliteai/sqlite-sync-expo-dev package version ${version}...\n`);
420420

421421
// Create output directory structure
422422
const srcDir = path.join(outputDir, 'src');
@@ -495,7 +495,7 @@ function main() {
495495
}
496496

497497
console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
498-
console.log(`✅ Generated @sqliteai/sqlite-sync-expo@${version}`);
498+
console.log(`✅ Generated @sqliteai/sqlite-sync-expo-dev@${version}`);
499499
console.log(` iOS: CloudSync.xcframework`);
500500
console.log(` Android: ${androidSuccess}/${ANDROID_ARCHS.length} architectures`);
501501
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');

0 commit comments

Comments
 (0)