Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .changeset/five-geckos-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'powersync': patch
---

[Internal] Update dependencies
39 changes: 0 additions & 39 deletions .github/workflows/onRelease.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
release-tag: ${{ steps.release-tag.outputs.tag }}
steps:
- name: Checkout Repo
uses: actions/checkout@v6
Expand Down Expand Up @@ -53,6 +56,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Resolve release tag
id: release-tag
if: ${{ steps.changesets.outputs.published == 'true' }}
run: echo "tag=powersync@$(jq -r '.version' cli/package.json)" >> "$GITHUB_OUTPUT"

- name: Dev publish
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
Expand All @@ -61,3 +69,31 @@ jobs:
pnpm changeset publish --tag dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-artifacts:
needs: [release]
# Changesets links all package versions, so any publish means the powersync package was published.
if: needs.release.outputs.published == 'true'
uses: ./.github/workflows/buildArtifacts.yml
with:
retention-days: 1

publish-release-assets:
needs: [release, build-artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: release-assets
- name: Upload assets to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ needs.release.outputs.release-tag }}"
files=$(find release-assets -type f \( -name "*.pkg" -o -name "*.exe" -o -name "*.deb" -o -name "*.tar.gz" -o -name "*.tar.xz" \))
if [ -z "$files" ]; then
echo "Error: No artifacts found to upload"
exit 1
fi
gh release upload "$tag" $files --clobber
45 changes: 22 additions & 23 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
},
"bugs": "https://github.com/powersync-ja/powersync-cli/issues",
"dependencies": {
"@fastify/cors": "^10.0.0",
"@inquirer/prompts": "^7.2.0",
"@fastify/cors": "^10.1.0",
"@inquirer/prompts": "^7.10.1",
"@journeyapps-labs/common-utils": "^1.0.1",
"@oclif/core": "^4",
"@oclif/plugin-autocomplete": "^3.2.40",
"@oclif/plugin-commands": "^4.1.40",
"@oclif/plugin-help": "^6",
"@oclif/plugin-plugins": "^5",
"@powersync/sync-config-tools": "^0.1.1",
"@oclif/core": "catalog:",
"@oclif/plugin-autocomplete": "^3.2.46",
"@oclif/plugin-commands": "^4.1.47",
"@oclif/plugin-help": "^6.2.45",
"@oclif/plugin-plugins": "^5.4.62",
"@powersync/cli-core": "workspace:*",
"@powersync/cli-plugin-config-edit": "workspace:*",
"@powersync/cli-plugin-docker": "workspace:*",
Expand All @@ -25,26 +24,26 @@
"@powersync/management-types": "catalog:",
"@powersync/service-sync-rules": "catalog:",
"@powersync/service-types": "catalog:",
"@powersync/sync-config-tools": "^0.1.2",
"bson": "^7.2.0",
"fastify": "^5.0.0",
"jose": "^6.1.3",
"lodash": "^4.17.23",
"fastify": "^5.8.5",
"jose": "^6.2.3",
"lodash": "^4.18.1",
"open": "^11.0.0",
"ora": "^9.0.0",
"ora": "^9.4.0",
"ts-codec": "^1.3.0",
"yaml": "^2"
"yaml": "^2.8.3"
},
"devDependencies": {
"@oclif/prettier-config": "^0.2.1",
"@oclif/test": "^4",
"@types/lodash": "^4.17.23",
"@types/node": "^24",
"oclif": "4.22.81",
"shx": "^0.3.3",
"ts-node": "^10",
"tsx": "^4",
"typescript": "^5",
"vitest": "^4.0.0"
"@oclif/test": "^4.1.18",
"@types/lodash": "^4.17.24",
"@types/node": "^24.12.2",
"oclif": "catalog:",
"ts-node": "^10.9.2",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vitest": "^4.1.5"
},
"engines": {
"node": ">=18.0.0"
Expand Down Expand Up @@ -123,7 +122,7 @@
"clean": "rm -rf dist tsconfig.tsbuildinfo",
"build": "tsc -b",
"lint": "eslint",
"postpack": "shx rm -f oclif.manifest.json",
"postpack": "rm oclif.manifest.json",
"pretest": "pnpm run build",
"readme:generate": "oclif readme && pnpm exec prettier --write README.md",
"prepack": "oclif manifest && pnpm run readme:generate",
Expand Down
37 changes: 21 additions & 16 deletions cli/test/commands/migrate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,40 @@ import { runCommand } from '@oclif/test';
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { expect, onTestFinished, test } from 'vitest';
import { describe, expect, onTestFinished, test } from 'vitest';

import { root } from '../helpers/root.js';

test('migrates from sync rules to sync streams', async () => {
const testDirectory = mkdtempSync(join(tmpdir(), 'migrate-test-'));
onTestFinished(() => rmSync(testDirectory, { recursive: true }));
describe('migrations', () => {
test('migrates from sync rules to sync streams', async () => {
const testDirectory = mkdtempSync(join(tmpdir(), 'migrate-test-'));
onTestFinished(() => rmSync(testDirectory, { recursive: true }));

const inputFile = join(testDirectory, 'input.yaml');
const outputFile = join(testDirectory, 'output.yaml');
writeFileSync(
inputFile,
`
const inputFile = join(testDirectory, 'input.yaml');
const outputFile = join(testDirectory, 'output.yaml');
writeFileSync(
inputFile,
/* yaml */ `
bucket_definitions:
user_lists:
parameters: SELECT request.user_id() as user_id
data:
- SELECT * FROM lists WHERE owner_id = bucket.user_id
`
);
`
);

const result = await runCommand(`migrate sync-rules --input-file ${inputFile} --output-file ${outputFile}`, { root });
expect(result.error).toBeUndefined();
const result = await runCommand(`migrate sync-rules --input-file ${inputFile} --output-file ${outputFile}`, {
root
});
expect(result.error).toBeUndefined();

const transformed = readFileSync(outputFile).toString('utf-8');
expect(transformed)
.toStrictEqual(`# Adds YAML Schema support for VSCode users with the YAML extension installed. This enables features like validation and autocompletion based on the provided schema.
const transformed = readFileSync(outputFile).toString('utf8');
expect(transformed)
.toStrictEqual(/* yaml */ `# Adds YAML Schema support for VSCode users with the YAML extension installed. This enables features like validation and autocompletion based on the provided schema.
# yaml-language-server: $schema=https://unpkg.com/@powersync/service-sync-rules@latest/schema/sync_rules.json
config:
edition: 3

streams:
# This Sync Stream has been translated from bucket definitions. There may be more efficient ways to express these queries.
# You can add additional queries to this list if you need them.
Expand All @@ -41,4 +45,5 @@ streams:
queries:
- SELECT * FROM lists WHERE owner_id = auth.user_id()
`);
});
});
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"private": true,
"description": "PowerSync CLI monorepo",
"devDependencies": {
"@changesets/cli": "^2.29.8",
"@eslint/compat": "^1",
"eslint": "^9",
"eslint-config-oclif": "^6",
"eslint-config-prettier": "^10",
"@changesets/cli": "^2.31.0",
"@eslint/compat": "^1.4.1",
"eslint": "^9.39.4",
"eslint-config-oclif": "^6.0.160",
"eslint-config-prettier": "^10.1.8",
"husky": "^9.1.7",
"powersync": "workspace:*",
"prettier": "^3.0.0",
"tsx": "^4"
"prettier": "^3.8.3",
"tsx": "^4.21.0"
},
"scripts": {
"build": "pnpm -r run build",
Expand Down
16 changes: 8 additions & 8 deletions packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@
},
"bugs": "https://github.com/powersync-ja/powersync-cli/issues",
"dependencies": {
"@oclif/core": "^4",
"@powersync/cli-schemas": "workspace:*",
"@journeyapps-labs/common-sdk": "^1.0.2",
"@journeyapps-labs/micro-errors": "^1.0.1",
"yaml": "^2",
"@journeyapps-labs/common-sdk": "1.0.2",
"@oclif/core": "catalog:",
"@powersync/cli-schemas": "workspace:*",
"@powersync/management-client": "catalog:",
"@powersync/management-types": "catalog:",
"@powersync/service-client": "catalog:",
"keychain": "^1.5.0"
"keychain": "^1.5.0",
"yaml": "^2.8.3"
},
"devDependencies": {
"@types/node": "^24",
"typescript": "^5",
"@types/keychain": "^1.4.4"
"@types/keychain": "^1.4.4",
"@types/node": "^24.12.2",
"typescript": "^5.9.3"
},
"engines": {
"node": ">=18.0.0"
Expand Down
58 changes: 29 additions & 29 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,46 @@
},
"dependencies": {
"@monaco-editor/react": "^4.7.0",
"@powersync/cli-schemas": "workspace:*",
"@powersync/cli-core": "workspace:*",
"@radix-ui/react-accordion": "^1.2.0",
"@tailwindcss/vite": "^4.1.18",
"@tanstack/react-devtools": "^0.7.0",
"@tanstack/react-query": "^5.90.21",
"@tanstack/react-router": "^1.132.0",
"@tanstack/react-router-devtools": "^1.132.0",
"@tanstack/react-router-ssr-query": "^1.131.7",
"@tanstack/react-start": "^1.132.0",
"@tanstack/router-plugin": "^1.132.0",
"@powersync/cli-schemas": "workspace:*",
"@radix-ui/react-accordion": "^1.2.12",
"@tailwindcss/vite": "^4.2.4",
"@tanstack/react-devtools": "^0.7.11",
"@tanstack/react-query": "^5.100.6",
"@tanstack/react-router": "^1.169.1",
"@tanstack/react-router-devtools": "^1.166.13",
"@tanstack/react-router-ssr-query": "^1.166.12",
"@tanstack/react-start": "^1.167.62",
"@tanstack/router-plugin": "^1.167.32",
"buffer": "^6.0.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.561.0",
"minimatch": "^5.1.9",
"monaco-editor": "0.52.0",
"minimatch": "^5.0.0",
"monaco-yaml": "^5.4.1",
"nitro": "npm:nitro-nightly@3.0.1-20260227-181935-bfbb207c",
"nitro": "3.0.260429-beta",
"path-browserify": "^1.0.1",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"rxjs": "^7.8.2",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^4.1.18",
"tw-animate-css": "^1.3.6",
"zod": "^4.3.6"
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.4",
"tw-animate-css": "^1.4.0",
"zod": "^4.4.1"
},
"devDependencies": {
"@tanstack/devtools-vite": "^0.3.11",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.2.0",
"@types/node": "^22.10.2",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^5.0.4",
"jsdom": "^27.0.0",
"typescript": "^5.7.2",
"vite": "^7.1.7",
"@tanstack/devtools-vite": "^0.3.12",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@types/node": "^22.19.17",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.2.0",
"jsdom": "^27.4.0",
"typescript": "^5.9.3",
"vite": "^7.3.2",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.0.5"
"vitest": "^3.2.4"
}
}
9 changes: 4 additions & 5 deletions packages/schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@
"@powersync/management-types": "catalog:",
"@powersync/service-schema": "catalog:",
"@powersync/service-types": "catalog:",
"ajv": "^8.12.0",
"ajv": "^8.20.0",
"better-ajv-errors": "^2.0.3",
"ts-codec": "^1.3.0"
},
"devDependencies": {
"@powersync/service-sync-rules": "catalog:",
"@types/node": "^22",
"shx": "^0.3.3",
"tsx": "^4",
"typescript": "^5"
"@types/node": "^22.19.17",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
},
"engines": {
"node": ">=18.0.0"
Expand Down
Loading
Loading