Skip to content

Commit ad31b39

Browse files
authored
Merge branch 'main' into auto-profiling
2 parents 51cc4af + 042589c commit ad31b39

File tree

110 files changed

+8907
-4972
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+8907
-4972
lines changed

.changeset/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77
"access": "restricted",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": [],
10+
"ignore": ["!@powersync/*"],
1111
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
1212
"onlyUpdatePeerDependentsWhenOutOfRange": true,
1313
"updateInternalDependents": "out-of-range"
14+
},
15+
"privatePackages": {
16+
"tag": true,
17+
"version": true
1418
}
1519
}

.changeset/happy-gifts-sort.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/mean-carrots-relax.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@powersync/common': minor
3+
'@powersync/web': minor
4+
'@powersync/react-native': minor
5+
---
6+
7+
Added a warning if connector `uploadData` functions don't process CRUD items completely.

.changeset/real-bottles-mate.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.git
2+
.idea
3+
4+
**/node_modules
5+
**/dist
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Diagnostics Image Build
2+
3+
on:
4+
push:
5+
6+
concurrency: ${{ github.workflow }}-${{ github.ref }}
7+
8+
jobs:
9+
build-docker-image:
10+
name: Build diagnostics-app Docker Image
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v3
18+
19+
- name: Build Image
20+
uses: docker/build-push-action@v5
21+
with:
22+
platforms: linux/amd64
23+
cache-from: type=registry,ref=${{vars.DIAGNOSTICS_DOCKER_REGISTRY}}:latest
24+
context: .
25+
file: ./tools/diagnostics-app/Dockerfile
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Publishes the Diagnostics App Docker image to DockerHub
2+
# This is triggered whenever the `diagnostics-app` package is versioned and tagged
3+
name: Diagnostics Image Release
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
tags:
9+
- '@powersync/diagnostics-app*'
10+
11+
concurrency: ${{ github.workflow }}-${{ github.ref }}
12+
13+
jobs:
14+
release-docker-image:
15+
name: Build and Release diagnostics-app Docker Image
16+
runs-on: ubuntu-latest
17+
if: github.ref == 'refs/heads/main'
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v3
27+
with:
28+
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
password: ${{ secrets.DOCKERHUB_TOKEN }}
30+
31+
# This uses the service's package.json version for the Docker Image tag
32+
- name: Get Image Version from package.json
33+
id: get_version
34+
run: echo "IMAGE_VERSION=$(node -p "require('./tools/diagnostics-app/package.json').version")" >> $GITHUB_OUTPUT
35+
36+
- name: Build Image and Push
37+
uses: docker/build-push-action@v5
38+
with:
39+
platforms: linux/amd64
40+
cache-from: type=registry,ref=${{vars.DIAGNOSTICS_DOCKER_REGISTRY}}:latest
41+
context: .
42+
tags: ${{vars.DIAGNOSTICS_DOCKER_REGISTRY}}:latest,${{vars.DIAGNOSTICS_DOCKER_REGISTRY}}:${{steps.get_version.outputs.IMAGE_VERSION}}
43+
push: true
44+
file: ./tools/diagnostics-app/Dockerfile
45+
46+
# Updates the README section on the DockerHub page
47+
- name: Update repo description
48+
# Note that this 3rd party extention is recommended in the DockerHub docs:
49+
# https://docs.docker.com/build/ci/github-actions/update-dockerhub-desc/
50+
uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4.0.0
51+
with:
52+
username: ${{ secrets.DOCKERHUB_USERNAME }}
53+
password: ${{ secrets.DOCKERHUB_TOKEN }}
54+
repository: ${{vars.DIAGNOSTICS_DOCKER_REGISTRY}}
55+
# This is the contents of what will be shown on DockerHub
56+
readme-filepath: ./tools/diagnostics-app/README.md

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
- uses: pnpm/action-setup@v2
2222
name: Install pnpm
2323
with:
24-
version: 9
24+
# Pnpm 9.4 introduces this https://github.com/pnpm/pnpm/pull/7633
25+
# which causes workspace:^1.2.0 to be converted to 1.2.0^1.2.0
26+
version: 9.3
2527
run_install: false
2628
- name: Get pnpm store directory
2729
shell: bash
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Ensures packages and demos test correctly
2+
name: Test Isolated Demos
3+
4+
on:
5+
push:
6+
7+
jobs:
8+
test:
9+
name: Test Isolated Demos
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
16+
- name: Setup NodeJS
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
21+
- uses: pnpm/action-setup@v2
22+
name: Install pnpm
23+
with:
24+
# Pnpm 9.4 introduces this https://github.com/pnpm/pnpm/pull/7633
25+
# which causes workspace:^1.2.0 to be converted to 1.2.0^1.2.0
26+
version: 9.3
27+
run_install: false
28+
29+
- name: Get pnpm store directory
30+
shell: bash
31+
run: |
32+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
33+
34+
- uses: actions/cache@v3
35+
name: Setup pnpm cache
36+
with:
37+
path: ${{ env.STORE_PATH }}
38+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
${{ runner.os }}-pnpm-store-
41+
42+
- name: Install
43+
run: pnpm install
44+
45+
- name: Build Packages
46+
run: pnpm build:packages
47+
48+
- name: Start Verdaccio
49+
run: |
50+
npm install -g verdaccio
51+
nohup verdaccio -c verdaccio-config.yaml &
52+
sleep 10 # Give Verdaccio some time to start
53+
54+
- name: Prepare For Test Publish
55+
run: npx tsx scripts/test-publish-helper.ts
56+
57+
- name: Registry login
58+
run: npx npm-cli-login -u test -p test -e [email protected] -r http://localhost:4873
59+
60+
- name: Config Temporary Registry
61+
run: echo "@powersync:registry=http://localhost:4873" >> ~/.npmrc
62+
63+
# No actual auth is ever supplied to this action.
64+
# It should never be able to publish to NPMJS
65+
- name: Test publish
66+
run: pnpm -r publish --no-git-checks
67+
68+
- name: Test Demos
69+
run: npx tsx scripts/isolated-demo-test.ts
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# See the local demo at https://github.com/powersync-ja/self-host-demo/tree/main/demos/supabase
2+
WEBPACK_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
3+
WEBPACK_PUBLIC_SUPABASE_ANON_KEY=
4+
WEBPACK_PUBLIC_POWERSYNC_URL=http://localhost:8080

0 commit comments

Comments
 (0)