diff --git a/.changeset/config.json b/.changeset/config.json index 0f30a6e..351ac15 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -5,7 +5,7 @@ "fixed": [], "linked": [], "access": "restricted", - "baseBranch": "release", + "baseBranch": "dev", "updateInternalDependencies": "patch", "ignore": [] } diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 5326ecb..66911a9 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -43,5 +43,6 @@ jobs: version: pnpm changeset:version title: Version App commit: Version App + publish: echo "Skipping ..." env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.prettierrc b/.prettierrc index 82459b0..ad8af71 100644 --- a/.prettierrc +++ b/.prettierrc @@ -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" } }] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a582b2..4551c21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/SyncVersion.ts b/SyncVersion.ts new file mode 100644 index 0000000..5e57332 --- /dev/null +++ b/SyncVersion.ts @@ -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']) diff --git a/package.json b/package.json index 0559d8a..dbdf521 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "svelte-tauri", - "version": "0.2.0", + "version": "0.2.1", "private": true, "license": "MIT", "repository": { @@ -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}": [ @@ -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", @@ -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": "pnpm@8.10.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 668aaa0..89804d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ devDependencies: '@fortawesome/free-solid-svg-icons': specifier: ^6.5.1 version: 6.5.1 + '@iarna/toml': + specifier: ^2.2.5 + version: 2.2.5 '@internationalized/date': specifier: ^3.5.1 version: 3.5.1 @@ -110,6 +113,9 @@ devDependencies: prettier-plugin-tailwindcss: specifier: ^0.5.11 version: 0.5.11(prettier-plugin-svelte@3.1.2)(prettier@3.2.4) + prettier-plugin-toml: + specifier: ^2.0.1 + version: 2.0.1(prettier@3.2.4) svelte: specifier: ^4.2.9 version: 4.2.9 @@ -143,9 +149,15 @@ devDependencies: tailwindcss-hero-patterns: specifier: ^0.1.2 version: 0.1.2 + toml: + specifier: ^3.0.0 + version: 3.0.0 tslib: specifier: ^2.6.2 version: 2.6.2 + tsx: + specifier: ^4.7.0 + version: 4.7.0 typescript: specifier: ^5.3.3 version: 5.3.3 @@ -727,6 +739,10 @@ packages: resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true + /@iarna/toml@2.2.5: + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} + dev: true + /@internationalized/date@3.5.1: resolution: {integrity: sha512-LUQIfwU9e+Fmutc/DpRTGXSdgYZLBegi4wygCWDSVmUdLTaMHsQyASDiJtREwanwKuQLq0hY76fCJ9J/9I2xOQ==} dependencies: @@ -1034,6 +1050,16 @@ packages: tslib: 2.6.2 dev: true + /@taplo/core@0.1.1: + resolution: {integrity: sha512-BG/zLGf5wiNXGEVPvUAAX/4ilB3PwDUY2o0MV0y47mZbDZ9ad9UK/cIQsILat3bqbPJsALVbU6k3cskNZ3vAQg==} + dev: true + + /@taplo/lib@0.4.0-alpha.2: + resolution: {integrity: sha512-DV/Re3DPVY+BhBtLZ3dmP4mP6YMLSsgq9qGLXwOV38lvNF/fBlgvQswzlXmzCEefL/3q2eMoefZpOI/+GLuCNA==} + dependencies: + '@taplo/core': 0.1.1 + dev: true + /@tauri-apps/api@1.5.3: resolution: {integrity: sha512-zxnDjHHKjOsrIzZm6nO5Xapb/BxqUq1tc7cGkFXsFkGTsSWgCPH1D8mm0XS9weJY2OaR73I3k3S+b7eSzJDfqA==} engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} @@ -2564,6 +2590,12 @@ packages: get-intrinsic: 1.2.1 dev: true + /get-tsconfig@4.7.2: + resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3834,6 +3866,16 @@ packages: prettier-plugin-svelte: 3.1.2(prettier@3.2.4)(svelte@4.2.9) dev: true + /prettier-plugin-toml@2.0.1(prettier@3.2.4): + resolution: {integrity: sha512-99z1YOkViECHtXQjGIigd3talI/ybUI1zB3yniAwUrlWBXupNXThB1hM6bwSMUEj2/+tomTlMtT98F5t4s8IWA==} + engines: {node: '>=16.0.0'} + peerDependencies: + prettier: ^3.0.3 + dependencies: + '@taplo/lib': 0.4.0-alpha.2 + prettier: 3.2.4 + dev: true + /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -3977,6 +4019,10 @@ packages: engines: {node: '>=8'} dev: true + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + /resolve@1.22.2: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true @@ -4660,6 +4706,10 @@ packages: is-number: 7.0.0 dev: true + /toml@3.0.0: + resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} + dev: true + /totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -4687,6 +4737,17 @@ packages: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true + /tsx@4.7.0: + resolution: {integrity: sha512-I+t79RYPlEYlHn9a+KzwrvEwhJg35h/1zHsLC2JXvhC2mdynMv6Zxzvhv5EMV6VF5qJlLlkSnMVvdZV3PSIGcg==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + esbuild: 0.19.11 + get-tsconfig: 4.7.2 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /tty-table@4.2.1: resolution: {integrity: sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==} engines: {node: '>=8.0.0'} diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index b14709d..7a0ff56 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3466,7 +3466,7 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "svelte-tauri" -version = "0.0.2" +version = "0.2.0" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 3fdf55d..1aa627e 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -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" @@ -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 diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index ee84862..0ecc247 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "svelte-tauri", - "version": "0.0.2" + "version": "0.2.1" }, "tauri": { "allowlist": { @@ -72,4 +72,4 @@ } ] } -} +} \ No newline at end of file