Skip to content

Commit

Permalink
Merge pull request #87 from Fractal-Tess/dev
Browse files Browse the repository at this point in the history
Version
  • Loading branch information
Fractal-Tess authored Jan 25, 2024
2 parents e15482a + 2900498 commit 29801e8
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "release",
"baseBranch": "dev",
"updateInternalDependencies": "patch",
"ignore": []
}
1 change: 1 addition & 0 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ jobs:
version: pnpm changeset:version
title: Version App
commit: Version App
publish: echo "Skipping ..."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"arrowParens": "avoid",
"endOfLine": "lf",
"semi": false,
"plugins": ["prettier-plugin-svelte"],
"plugins": ["prettier-plugin-svelte", "prettier-plugin-toml"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# svelte-tauri

## 0.2.1

### Patch Changes

- 175be29: Make a helper script to allow syncing pkg versions in the project

## 0.2.0

### Minor Changes
Expand Down
22 changes: 22 additions & 0 deletions SyncVersion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import fs from 'node:fs'
import toml from '@iarna/toml'

import nodePkg from './package.json'
import tauriPkg from './src-tauri/tauri.conf.json'
import path from 'node:path'
import { spawnSync } from 'node:child_process'

const tauriPath = new URL(
path.dirname(import.meta.url) + '/src-tauri/tauri.conf.json'
).pathname
tauriPkg.package.version = nodePkg.version
fs.writeFileSync(tauriPath, JSON.stringify(tauriPkg, null, 2))

const cargoPath = new URL(
path.dirname(import.meta.url) + '/src-tauri/Cargo.toml'
).pathname
const cargoPkg = toml.parse(fs.readFileSync(cargoPath, 'utf-8'))
cargoPkg['package']['version'] = nodePkg.version
fs.writeFileSync(cargoPath, toml.stringify(cargoPkg))

const child = spawnSync('pnpm', ['prettier', '--write', 'src-tauri/Cargo.toml'])
36 changes: 20 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-tauri",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"license": "MIT",
"repository": {
Expand All @@ -22,7 +22,7 @@
"check": "svelte-check --tsconfig ./tsconfig.json",
"svelte:build": "vite build",
"svelte:dev": "vite dev",
"changeset:version": "changeset version"
"changeset:version": "changeset version && tsx SyncVersion.ts"
},
"lint-staged": {
"*.{ts,svelte}": [
Expand All @@ -37,6 +37,8 @@
"@fortawesome/free-brands-svg-icons": "^6.5.1",
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@iarna/toml": "^2.2.5",
"@internationalized/date": "^3.5.1",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tauri-apps/api": "^1.5.3",
"@tauri-apps/cli": "^1.5.9",
Expand All @@ -45,42 +47,44 @@
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"autoprefixer": "^10.4.17",
"bits-ui": "^0.15.1",
"clsx": "^2.1.0",
"cmdk-sv": "^0.0.13",
"embla-carousel-svelte": "8.0.0-rc20",
"eslint": "^8.56.0",
"eslint-plugin-svelte": "2.35.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-svelte": "2.35.1",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"formsnap": "^0.4.2",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"lucide-svelte": "^0.314.0",
"mode-watcher": "^0.1.2",
"postcss": "^8.4.33",
"postcss-load-config": "^5.0.2",
"prettier": "^3.2.4",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.11",
"prettier-plugin-toml": "^2.0.1",
"svelte": "^4.2.9",
"svelte-check": "^3.6.3",
"svelte-fa": "^4.0.2",
"svelte-preprocess": "^5.1.3",
"svelte-sonner": "^0.3.11",
"svelte-spa-router": "^4.0.1",
"sveltekit-superforms": "^1.13.4",
"tailwind-merge": "^2.2.1",
"tailwind-variants": "^0.1.20",
"tailwindcss": "^3.4.1",
"tailwindcss-hero-patterns": "^0.1.2",
"toml": "^3.0.0",
"tslib": "^2.6.2",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"@internationalized/date": "^3.5.1",
"bits-ui": "^0.15.1",
"clsx": "^2.1.0",
"cmdk-sv": "^0.0.13",
"embla-carousel-svelte": "8.0.0-rc20",
"formsnap": "^0.4.2",
"lucide-svelte": "^0.314.0",
"mode-watcher": "^0.1.2",
"svelte-sonner": "^0.3.11",
"sveltekit-superforms": "^1.13.4",
"tailwind-merge": "^2.2.1",
"tailwind-variants": "^0.1.20",
"vaul-svelte": "^0.1.0",
"vite": "^5.0.12",
"zod": "^3.22.4"
},
"packageManager": "[email protected]",
Expand Down
61 changes: 61 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 22 additions & 15 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "svelte-tauri"
version = "0.0.2"
version = "0.2.1"
description = "Svelte-Tauri template starter"
authors = ["Fractal-Tess"]
license = "MIT"
Expand All @@ -9,31 +9,38 @@ default-run = "svelte-tauri"
edition = "2021"
rust-version = "1.71.1"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.5.1", features = [] }
[build-dependencies.tauri-build]
version = "1.5.1"
features = []

[dependencies]
serde_json = "1.0.111"
sha2 = "0.10.8"
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
serde = { version = "1.0.195", features = ["derive"] }
tauri = { version = "1.5.4", features = ["api-all", "devtools", "updater"] }
thiserror = "1.0.56"
specta = "1.0.5"
tauri-specta = { version = "1.0.2", features = ["javascript", "typescript"] }

[dependencies.tauri-plugin-window-state]
git = "https://github.com/tauri-apps/plugins-workspace"
branch = "dev"

[dependencies.serde]
version = "1.0.195"
features = ["derive"]

[dependencies.tauri]
version = "1.5.4"
features = ["api-all", "devtools", "updater"]

[dependencies.tauri-specta]
version = "1.0.2"
features = ["javascript", "typescript"]

[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = ["custom-protocol"]
# this feature is used used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]


[profile.release]
panic = 'abort'
panic = "abort"
codegen-units = 1
lto = true
opt-level = 3
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "svelte-tauri",
"version": "0.0.2"
"version": "0.2.1"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -72,4 +72,4 @@
}
]
}
}
}

0 comments on commit 29801e8

Please sign in to comment.