Skip to content

Update project infrastructure #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
321ca10
Switched to pnpm and prettier
Rentacookie Sep 11, 2024
ba378ef
Prettier formatting changes
Rentacookie Sep 11, 2024
adce2db
Added github workflows
Rentacookie Oct 4, 2024
896ee88
Updated Tap version and tests
Rentacookie Oct 7, 2024
5ab2cd1
Changed cleanup syntax based on changes to mysql 8.4
Rentacookie Oct 7, 2024
2b19787
Workflow test fixes
Rentacookie Oct 7, 2024
f911d73
Workflow reshuffled flags for mysql docker run
Rentacookie Oct 7, 2024
2779d26
Moved name flag up
Rentacookie Oct 7, 2024
6ba2b46
Updated docker run command
Rentacookie Oct 7, 2024
14eb0fd
Exposed port
Rentacookie Oct 7, 2024
99642e4
Fixed case typo
Rentacookie Oct 7, 2024
e88a053
Debug logs
Rentacookie Oct 7, 2024
92cbc11
More debug logs
Rentacookie Oct 7, 2024
28ce63c
Slight test rework
Rentacookie Oct 7, 2024
c836e23
Added DNS lookup failed error
Rentacookie Oct 7, 2024
472a497
Disabled failure on coverage check for tests
Rentacookie Oct 7, 2024
85c993f
Disabled failure on coverage check for tests mk2
Rentacookie Oct 7, 2024
3dc811f
Try npm instead of pnpm
Rentacookie Oct 7, 2024
9650ac8
Added custom gtid binlog event
Rentacookie Oct 8, 2024
e9d40b2
Updated package.json
Rentacookie Oct 8, 2024
4686e91
Try exiting tap tests cleanly
Rentacookie Oct 8, 2024
90fe3b3
One more time
Rentacookie Oct 8, 2024
7361830
Revert
Rentacookie Oct 8, 2024
ce9c1d9
Temporarily change dev package workflow to on push
Rentacookie Oct 8, 2024
0c58f9d
Made package public
Rentacookie Oct 8, 2024
19ad157
Updated package name to match other powersync packages
Rentacookie Oct 8, 2024
08fcd04
Updated changeset
Rentacookie Oct 8, 2024
3d4bc0a
Parse mysql bigint as js bigint
Rentacookie Oct 16, 2024
7d73ed3
Parse mysql bigint as js bigint take2
Rentacookie Oct 16, 2024
23f6c30
Parse bit type as Uint8Array
Rentacookie Oct 21, 2024
4df8c06
Return Uint8Arrays
Rentacookie Oct 21, 2024
9b4b8cb
Fixed copypasta
Rentacookie Oct 21, 2024
0c19681
Fixed 0 padding
Rentacookie Oct 21, 2024
ad0b2a7
Try again
Rentacookie Oct 21, 2024
f1b243e
Fixed size parsing
Rentacookie Oct 21, 2024
f0125d5
Attempt enforced UTC parsing
Rentacookie Oct 21, 2024
f631e37
Further enforced UTC parsing
Rentacookie Oct 21, 2024
bc49fbf
Revert timestamp UTC change
Rentacookie Oct 21, 2024
0579a34
Use adjusted UTC time for timestamps
Rentacookie Oct 22, 2024
75386d6
Revert date adjustments
Rentacookie Oct 23, 2024
fee7f19
Date adjustments the final frontier
Rentacookie Oct 23, 2024
05fa4f5
Reverting Uint8Array returning for binary types. The conversion now h…
Rentacookie Oct 31, 2024
d616399
Reverted to bigints returning as string
Rentacookie Oct 31, 2024
3955a74
Reverted package.json contributors entry removal
Rentacookie Nov 26, 2024
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
6 changes: 6 additions & 0 deletions .changeset/brave-hairs-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@powersync/mysql-zongji': minor
---

Initial release of the powersync-mysql-zongji fork
- Added custom gtid binlog event
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/dev-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Action to publish packages under the `next` tag for testing
# Packages are versioned as `0.0.0-{tag}-DATETIMESTAMP`
name: Create Dev Release

on:
push:

jobs:
publish:
name: Publish Dev Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Add NPM auth
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Version packages
run: pnpm changeset version --no-git-tag --snapshot dev
- name: Publish
run: pnpm changeset publish --tag dev
62 changes: 62 additions & 0 deletions .github/workflows/release-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release Packages

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release-packages:
name: Release Packages
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Add NPM auth
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
- name: Install dependencies
run: pnpm install

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
version: pnpm changeset version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Debug Outputs
run: |
echo "Published Packages: ${{ steps.changesets.outputs.publishedPackages }}"
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Ensures packages test correctly
name: Test Packages

on:
push:

jobs:
test:
name: Test Packages
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
mysql-version: [ 8.0, 8.4 ]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Start MySQL
run: |
docker run \
--name zongji_test \
-e MYSQL_ROOT_PASSWORD=my_password \
-p 3306:3306 \
-d mysql:${{ matrix.mysql-version }} \
--server-id=1 \
--log-bin=/var/lib/mysql/mysql-bin.log \
--binlog-format=row
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Test
run: pnpm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ npm-debug.log
.DS_Store
node_modules
.idea
.tap
*.iml
*~
.\#*
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.12.2
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 120,
"trailingComma": "none"
}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

Loading