Skip to content

Commit ce93779

Browse files
Merge pull request #47 from powersync-ja/chore/move-to-js-monorepo
chore: move to js monorepo
2 parents 8010380 + 5dcb9b0 commit ce93779

File tree

156 files changed

+21241
-20797
lines changed

Some content is hidden

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

156 files changed

+21241
-20797
lines changed

.github/workflows/build-packages.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,29 @@ jobs:
1616
- name: Setup NodeJS
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: 18
20-
cache: 'yarn'
19+
node-version-file: ".nvmrc"
2120

22-
- name: Setup Yarn
21+
- uses: pnpm/action-setup@v2
22+
name: Install pnpm
23+
with:
24+
version: 8
25+
run_install: false
26+
27+
- name: Get pnpm store directory
28+
shell: bash
2329
run: |
24-
npm install -g yarn
25-
echo "Yarn version: $(yarn -v)"
26-
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
30+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
31+
32+
- uses: actions/cache@v3
33+
name: Setup pnpm cache
34+
with:
35+
path: ${{ env.STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
2739
28-
- name: Install Dependencies
29-
run: yarn install --frozen-lockfile
40+
- name: Install dependencies
41+
run: pnpm install
3042

3143
- name: Build
32-
run: yarn build:packages
44+
run: pnpm build:packages

.github/workflows/deploy-docs.yaml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,29 @@ jobs:
2727
GH_PROJECT_NAME: ${{vars.GH_PROJECT_NAME}}
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
- name: Setup NodeJS
3232
uses: actions/setup-node@v4
3333
with:
34-
node-version: 18
35-
cache: yarn
36-
- name: Setup Yarn
34+
node-version-file: ".nvmrc"
35+
- uses: pnpm/action-setup@v2
36+
name: Install pnpm
37+
with:
38+
version: 8
39+
run_install: false
40+
- name: Get pnpm store directory
41+
shell: bash
3742
run: |
38-
npm install -g yarn
39-
echo "Yarn version: $(yarn -v)"
40-
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
41-
- name: Install Dependencies
42-
run: yarn install --frozen-lockfile && cd docs && yarn install --frozen-lockfile
43-
- name: Build Packages
44-
run: yarn build:packages
45-
- name: Build Docs
46-
run: yarn build:docs
43+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
44+
- uses: actions/cache@v3
45+
name: Setup pnpm cache
46+
with:
47+
path: ${{ env.STORE_PATH }}
48+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49+
restore-keys: |
50+
${{ runner.os }}-pnpm-store-
51+
- name: Install dependencies
52+
run: pnpm install
4753
- uses: actions/upload-pages-artifact@v2
4854
with:
4955
path: ./docs/build

.github/workflows/dev-packages.yaml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,33 @@ jobs:
1212
- uses: actions/checkout@v4
1313
with:
1414
persist-credentials: false
15-
1615
- name: Setup NodeJS
17-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v4
1817
with:
19-
node-version: 18
20-
21-
- name: Setup Yarn
18+
node-version-file: ".nvmrc"
19+
- uses: pnpm/action-setup@v2
20+
name: Install pnpm
21+
with:
22+
version: 8
23+
run_install: false
24+
- name: Add NPM auth
25+
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
26+
- name: Get pnpm store directory
27+
shell: bash
2228
run: |
23-
npm install -g yarn
24-
echo "Yarn version: $(yarn -v)"
25-
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
26-
27-
- name: Install Dependencies
28-
run: yarn install --frozen-lockfile
29-
29+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30+
- uses: actions/cache@v3
31+
name: Setup pnpm cache
32+
with:
33+
path: ${{ env.STORE_PATH }}
34+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pnpm-store-
37+
- name: Install dependencies
38+
run: pnpm install
3039
- name: Build
31-
run: yarn build:packages
32-
40+
run: pnpm build:packages
3341
- name: Publish
3442
run: |
35-
yarn changeset version --no-git-tag --snapshot dev
36-
yarn changeset publish --tag dev
43+
pnpm changeset version --no-git-tag --snapshot dev
44+
pnpm changeset publish --tag dev

.github/workflows/release.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,35 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Repo
16-
uses: actions/checkout@v3
17-
18-
- name: Setup Node.js 18
19-
uses: actions/setup-node@v3
16+
uses: actions/checkout@v4
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
2019
with:
21-
node-version: 18
22-
23-
- name: Install Dependencies
24-
run: yarn
25-
20+
node-version-file: ".nvmrc"
21+
- uses: pnpm/action-setup@v2
22+
name: Install pnpm
23+
with:
24+
version: 8
25+
run_install: false
26+
- name: Get pnpm store directory
27+
shell: bash
28+
run: |
29+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30+
- uses: actions/cache@v3
31+
name: Setup pnpm cache
32+
with:
33+
path: ${{ env.STORE_PATH }}
34+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
35+
restore-keys: |
36+
${{ runner.os }}-pnpm-store-
37+
- name: Install dependencies
38+
run: pnpm install
2639
- name: Create Release Pull Request or Publish to npm
2740
id: changesets
2841
uses: changesets/action@v1
2942
with:
3043
# This expects you to have a script called release which does a build for your packages and calls changeset publish
31-
publish: yarn release
44+
publish: pnpm release
3245
env:
3346
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3447
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ node_modules
22
lib
33
dist
44
tsconfig.tsbuildinfo
5-
yarn-error.log
65
.vscode
76
.DS_STORE
87
.idea
8+
.fleet

.gitmodules

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

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"**/*": "prettier --write --ignore-unknown"
3+
}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-linker=hoisted

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.12.0
1+
v20.9.0

0 commit comments

Comments
 (0)