Skip to content

Commit 5ee5e19

Browse files
committed
refactor: migrate to tauri 2.0
1 parent 0ddb77c commit 5ee5e19

23 files changed

+11956
-1372
lines changed

.github/workflows/release.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@ jobs:
1515
# args: '--target aarch64-apple-darwin'
1616
# - platform: 'macos-latest' # for Intel based macs.
1717
# args: '--target x86_64-apple-darwin'
18-
- platform: "ubuntu-20.04" # for Tauri v1 you could replace this with ubuntu-20.04.
18+
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
1919
args: ""
2020
- platform: "windows-latest"
2121
args: ""
2222
runs-on: ${{ matrix.settings.platform }}
2323
steps:
2424
- uses: actions/checkout@v4
2525
- name: install dependencies (ubuntu only)
26-
if: matrix.settings.platform == 'ubuntu-20.04' # This must match the platform value defined above.
26+
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
2727
run: |
2828
sudo apt-get update
29-
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev
30-
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
31-
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
32-
- name: setup bun
33-
uses: oven-sh/setup-bun@v1
29+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
30+
- name: setup node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: lts/*
34+
cache: 'pnpm' # Set this to npm, yarn or pnpm.
3435
- name: install Rust stable
3536
uses: dtolnay/rust-toolchain@stable
3637
with:
@@ -42,7 +43,7 @@ jobs:
4243
workspaces: "./src-tauri -> target"
4344
- name: install frontend dependencies
4445
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
45-
run: bun install # change this to npm or pnpm depending on which one you use.
46+
run: pnpm install # change this to npm or pnpm depending on which one you use.
4647
- uses: tauri-apps/tauri-action@v0
4748
env:
4849
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -53,4 +54,3 @@ jobs:
5354
releaseDraft: true
5455
prerelease: false
5556
args: ${{ matrix.settings.args }}
56-
tauriScript: bun tauri

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SvelteKit, inspired by pomofocus.io
1919

2020
### Requirements
2121

22-
- Bun (Node.js also supported)
22+
- Node.js
2323
- Rust
2424

2525
### Installation
@@ -34,24 +34,24 @@ git clone https://github.com/tfkhdyt/pomodoro.git
3434

3535
```bash
3636
cd pomodoro
37-
bun install
37+
pnpm install
3838
```
3939

4040
1. Build the app
4141

4242
```bash
4343
# linux (debian)
44-
bun tauri build -b deb
44+
pnpm tauri build -b deb
4545

4646
# windows (exe)
47-
bun tauri build -b nsis
47+
pnpm tauri build -b nsis
4848

4949
# windows (msi)
50-
bun tauri build -b msi
50+
pnpm tauri build -b msi
5151

5252
# macOS (app)
53-
bun tauri build -b app
53+
pnpm tauri build -b app
5454

5555
# macOS (dmg)
56-
bun tauri build -b dmg
56+
pnpm tauri build -b dmg
5757
```

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@sveltejs/adapter-static": "^3.0.1",
1616
"@sveltejs/kit": "^2.5.8",
1717
"@sveltejs/vite-plugin-svelte": "^3.1.0",
18-
"@tauri-apps/cli": "^1.5.14",
18+
"@tauri-apps/cli": "^2.1.0",
1919
"@types/eslint": "^8.56.10",
2020
"@typescript-eslint/eslint-plugin": "^7.9.0",
2121
"@typescript-eslint/parser": "^7.9.0",
@@ -36,7 +36,11 @@
3636
"type": "module",
3737
"dependencies": {
3838
"@fontsource-variable/montserrat": "^5.0.19",
39-
"@tauri-apps/api": "^1.5.5",
39+
"@tauri-apps/api": "^2.1.1",
40+
"@tauri-apps/plugin-dialog": "~2",
41+
"@tauri-apps/plugin-fs": "~2.0.2",
42+
"@tauri-apps/plugin-notification": "~2",
43+
"@tauri-apps/plugin-process": "~2",
4044
"bits-ui": "^0.21.7",
4145
"clsx": "^2.1.1",
4246
"date-fns": "^3.6.0",

pnpm-lock.yaml

+90-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)