@duonghieu0712z/create-tauri-vue-template 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duonghieu0712z/create-tauri-vue-template",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Create a Tauri 2 + Vue 3 desktop app from the tauri-vue-template starter.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,10 +22,12 @@
22
22
  "picocolors": "^1.1.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^25.9.1",
25
+ "@commitlint/cli": "^21.2.0",
26
+ "@commitlint/config-conventional": "^21.2.0",
27
+ "@types/node": "^26.0.0",
26
28
  "husky": "^9.1.7",
27
29
  "lint-staged": "^17.0.5",
28
- "oxfmt": "^0.51.0",
30
+ "oxfmt": "^0.56.0",
29
31
  "oxlint": "^1.66.0",
30
32
  "typescript": "~6.0.3"
31
33
  },
@@ -11,12 +11,45 @@ permissions:
11
11
  contents: read
12
12
 
13
13
  jobs:
14
+ commit-message:
15
+ name: Commit message
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v7
21
+ with:
22
+ fetch-depth: 0
23
+
24
+ - name: Setup pnpm
25
+ uses: pnpm/action-setup@v6
26
+ with:
27
+ version: 11
28
+
29
+ - name: Setup Node.js
30
+ uses: actions/setup-node@v6
31
+ with:
32
+ node-version: 24
33
+ cache: pnpm
34
+
35
+ - name: Install dependencies
36
+ run: pnpm install --frozen-lockfile
37
+
38
+ - name: Lint latest commit message
39
+ if: github.event_name == 'push'
40
+ run: pnpm commitlint --from ${{ github.event.before }} --to ${{ github.sha }} --verbose
41
+
42
+ - name: Lint PR commit messages
43
+ if: github.event_name == 'pull_request'
44
+ run: pnpm commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
45
+
14
46
  frontend-quality:
47
+ name: Frontend quality
15
48
  runs-on: ubuntu-latest
16
49
 
17
50
  steps:
18
51
  - name: Checkout repository
19
- uses: actions/checkout@v6
52
+ uses: actions/checkout@v7
20
53
 
21
54
  - name: Setup pnpm
22
55
  uses: pnpm/action-setup@v6
@@ -50,13 +83,23 @@ jobs:
50
83
  run: pnpm type-check
51
84
 
52
85
  tauri-quality:
53
- runs-on: ubuntu-latest
86
+ name: Tauri quality (${{ matrix.os }})
87
+ runs-on: ${{ matrix.os }}
88
+
89
+ strategy:
90
+ fail-fast: false
91
+ matrix:
92
+ os:
93
+ - macos-latest
94
+ - ubuntu-latest
95
+ - windows-latest
54
96
 
55
97
  steps:
56
98
  - name: Checkout repository
57
- uses: actions/checkout@v6
99
+ uses: actions/checkout@v7
58
100
 
59
101
  - name: Install Linux dependencies
102
+ if: matrix.os == 'ubuntu-latest'
60
103
  run: |
61
104
  sudo apt-get update
62
105
  sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
@@ -73,7 +116,9 @@ jobs:
73
116
  workspaces: './src-tauri -> target'
74
117
 
75
118
  - name: Check formatting
76
- run: cargo +nightly fmt --manifest-path src-tauri/Cargo.toml -- --check
119
+ working-directory: src-tauri
120
+ run: cargo +nightly fmt -- --check
77
121
 
78
122
  - name: Check Clippy
79
- run: cargo +nightly clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings
123
+ working-directory: src-tauri
124
+ run: cargo +nightly clippy --all-targets --all-features -- -D warnings
@@ -11,30 +11,90 @@ concurrency:
11
11
  cancel-in-progress: true
12
12
 
13
13
  jobs:
14
+ changelog:
15
+ name: Read release changelog
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: read
19
+ outputs:
20
+ body: ${{ steps.changelog.outputs.body }}
21
+
22
+ steps:
23
+ - name: Checkout repository
24
+ uses: actions/checkout@v7
25
+
26
+ - name: Read release changelog
27
+ id: changelog
28
+ run: |
29
+ ruby <<'RUBY'
30
+ require 'json'
31
+ require 'securerandom'
32
+
33
+ ref = ENV.fetch('GITHUB_REF_NAME')
34
+ version = ref.sub(/^v/, '')
35
+ if version == ref
36
+ abort 'package.json is required to resolve the release version.' unless File.exist?('package.json')
37
+ version = JSON.parse(File.read('package.json')).fetch('version')
38
+ end
39
+
40
+ body = "Version #{version} release artifacts."
41
+
42
+ if File.exist?('CHANGELOG.md')
43
+ begin
44
+ content = File.read('CHANGELOG.md')
45
+ escaped_version = Regexp.escape(version)
46
+ pattern = /^##\s+(?<heading>\[?v?#{escaped_version}\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)/m
47
+ match = content.match(pattern)
48
+
49
+ if match && !match[:body].strip.empty?
50
+ anchor = match[:heading]
51
+ .strip
52
+ .downcase
53
+ .gsub(/[\[\].]/, '')
54
+ .gsub(/[^a-z0-9 _-]/, '')
55
+ .gsub(/\s+/, '-')
56
+ changelog_url = "#{ENV.fetch('GITHUB_SERVER_URL')}/#{ENV.fetch('GITHUB_REPOSITORY')}/blob/#{ref}/CHANGELOG.md##{anchor}"
57
+ body = "#{match[:body].strip}\n\n[See full changelog](#{changelog_url})"
58
+ end
59
+ rescue StandardError
60
+ warn 'Failed to read release changelog. Using fallback release body.'
61
+ end
62
+ end
63
+
64
+ delimiter = SecureRandom.uuid
65
+ File.open(ENV.fetch('GITHUB_OUTPUT'), 'a') do |output|
66
+ output.puts "body<<#{delimiter}"
67
+ output.puts body
68
+ output.puts delimiter
69
+ end
70
+ RUBY
71
+
14
72
  build:
73
+ name: Build release (${{ matrix.os }})
74
+ needs: changelog
15
75
  permissions:
16
76
  contents: write
77
+ runs-on: ${{ matrix.os }}
78
+
17
79
  strategy:
18
80
  fail-fast: false
19
81
  matrix:
20
82
  include:
21
- - platform: macos-latest
83
+ - os: macos-latest
22
84
  args: --target aarch64-apple-darwin
23
- - platform: macos-latest
85
+ - os: macos-latest
24
86
  args: --target x86_64-apple-darwin
25
- - platform: ubuntu-22.04
87
+ - os: ubuntu-latest
26
88
  args: ''
27
- - platform: windows-latest
89
+ - os: windows-latest
28
90
  args: ''
29
91
 
30
- runs-on: ${{ matrix.platform }}
31
-
32
92
  steps:
33
93
  - name: Checkout repository
34
- uses: actions/checkout@v6
94
+ uses: actions/checkout@v7
35
95
 
36
96
  - name: Install Linux dependencies
37
- if: matrix.platform == 'ubuntu-22.04'
97
+ if: matrix.os == 'ubuntu-latest'
38
98
  run: |
39
99
  sudo apt-get update
40
100
  sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
@@ -53,7 +113,7 @@ jobs:
53
113
  - name: Setup Rust
54
114
  uses: dtolnay/rust-toolchain@stable
55
115
  with:
56
- targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
116
+ targets: ${{ matrix.os == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
57
117
 
58
118
  - name: Rust cache
59
119
  uses: swatinem/rust-cache@v2
@@ -63,44 +123,6 @@ jobs:
63
123
  - name: Install frontend dependencies
64
124
  run: pnpm install --frozen-lockfile
65
125
 
66
- - name: Read release changelog
67
- id: changelog
68
- shell: pwsh
69
- run: |
70
- $version = $env:GITHUB_REF_NAME -replace '^v', ''
71
- if ($version -eq $env:GITHUB_REF_NAME) {
72
- $version = node -p "require('./package.json').version"
73
- }
74
-
75
- $body = "Version $version release artifacts."
76
-
77
- if (Test-Path -LiteralPath CHANGELOG.md) {
78
- try {
79
- $content = Get-Content CHANGELOG.md -Raw -ErrorAction Stop
80
- $escapedVersion = [regex]::Escape($version)
81
- $pattern = "(?ms)^##\s+(?<heading>\[?v?$escapedVersion\]?(?:\s+-[^\r\n]*)?)\r?\n(?<body>.*?)(?=^##\s+|\z)"
82
- $match = [regex]::Match($content, $pattern)
83
-
84
- if ($match.Success -and ![string]::IsNullOrWhiteSpace($match.Groups["body"].Value)) {
85
- $ref = $env:GITHUB_REF_NAME
86
- $anchor = $match.Groups["heading"].Value.Trim().ToLowerInvariant()
87
- $anchor = $anchor -replace '[\[\]\.]', ''
88
- $anchor = $anchor -replace '[^a-z0-9 _-]', ''
89
- $anchor = $anchor -replace '\s+', '-'
90
- $changelogUrl = "$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/blob/$ref/CHANGELOG.md#$anchor"
91
- $body = $match.Groups["body"].Value.Trim() + "`n`n[See full changelog]($changelogUrl)"
92
- }
93
- } catch {
94
- Write-Warning "Failed to read release changelog. Using fallback release body."
95
- }
96
- }
97
-
98
- $delimiter = [guid]::NewGuid().ToString()
99
-
100
- "body<<$delimiter" >> $env:GITHUB_OUTPUT
101
- $body >> $env:GITHUB_OUTPUT
102
- $delimiter >> $env:GITHUB_OUTPUT
103
-
104
126
  - name: Build and upload release
105
127
  uses: tauri-apps/tauri-action@v0
106
128
  env:
@@ -108,7 +130,7 @@ jobs:
108
130
  with:
109
131
  tagName: v__VERSION__
110
132
  releaseName: Tauri Vue Template v__VERSION__
111
- releaseBody: ${{ steps.changelog.outputs.body }}
133
+ releaseBody: ${{ needs.changelog.outputs.body }}
112
134
  releaseDraft: true
113
135
  prerelease: false
114
136
  args: ${{ matrix.args }}
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ pnpm commitlint -e ${1}
@@ -3,7 +3,7 @@
3
3
  "explorer.fileNesting.patterns": {
4
4
  "tsconfig.json": "tsconfig.*.json, env.d.ts, typed-router.d.ts",
5
5
  "vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
6
- "package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .oxfmt*, .prettier*, prettier*, .lintstagedrc*, lint-staged*, .editorconfig"
6
+ "package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .oxfmt*, .prettier*, prettier*, .lintstagedrc*, lint-staged*, commitlint*, .editorconfig"
7
7
  },
8
8
  "editor.codeActionsOnSave": {
9
9
  "source.fixAll": "explicit"
@@ -0,0 +1,3 @@
1
+ export default {
2
+ extends: ['@commitlint/config-conventional'],
3
+ };
@@ -24,40 +24,42 @@
24
24
  "prepare": "husky"
25
25
  },
26
26
  "dependencies": {
27
- "@lucide/vue": "^1.17.0",
28
- "@tauri-apps/api": "^2.11.0",
27
+ "@lucide/vue": "^1.22.0",
28
+ "@tauri-apps/api": "^2.11.1",
29
29
  "class-variance-authority": "^0.7.1",
30
30
  "clsx": "^2.1.1",
31
31
  "tailwind-merge": "^3.6.0",
32
- "vue": "^3.5.35"
32
+ "vue": "^3.5.39"
33
33
  },
34
34
  "devDependencies": {
35
- "@tailwindcss/vite": "^4.3.0",
36
- "@tauri-apps/cli": "^2.11.2",
35
+ "@commitlint/cli": "^21.2.0",
36
+ "@commitlint/config-conventional": "^21.2.0",
37
+ "@tailwindcss/vite": "^4.3.1",
38
+ "@tauri-apps/cli": "^2.11.4",
37
39
  "@tsconfig/node24": "^24.0.4",
38
- "@types/node": "^25.9.1",
40
+ "@types/node": "^26.0.1",
39
41
  "@vitejs/plugin-vue": "^6.0.7",
40
42
  "@vue/eslint-config-prettier": "^10.2.0",
41
- "@vue/eslint-config-typescript": "^14.7.0",
43
+ "@vue/eslint-config-typescript": "^14.9.0",
42
44
  "@vue/tsconfig": "^0.9.1",
43
- "eslint": "^10.4.1",
44
- "eslint-plugin-oxlint": "^1.68.0",
45
+ "eslint": "^10.6.0",
46
+ "eslint-plugin-oxlint": "^1.71.0",
45
47
  "eslint-plugin-vue": "^10.9.2",
46
48
  "husky": "^9.1.7",
47
49
  "jiti": "^2.7.0",
48
- "lint-staged": "^17.0.7",
49
- "npm-run-all2": "^9.0.1",
50
- "oxfmt": "^0.53.0",
51
- "oxlint": "^1.68.0",
50
+ "lint-staged": "^17.0.8",
51
+ "npm-run-all2": "^9.0.2",
52
+ "oxfmt": "^0.56.0",
53
+ "oxlint": "^1.71.0",
52
54
  "picomatch": "^4.0.4",
53
- "tailwindcss": "^4.3.0",
55
+ "tailwindcss": "^4.3.1",
54
56
  "tw-animate-css": "^1.4.0",
55
57
  "typescript": "~6.0.3",
56
58
  "unplugin-auto-import": "^21.0.0",
57
59
  "unplugin-vue-components": "^32.1.0",
58
- "vite": "^8.0.16",
59
- "vite-plugin-vue-devtools": "^8.1.2",
60
- "vue-tsc": "^3.3.3"
60
+ "vite": "^8.1.0",
61
+ "vite-plugin-vue-devtools": "^8.1.5",
62
+ "vue-tsc": "^3.3.5"
61
63
  },
62
64
  "engines": {
63
65
  "node": "^20.19.0 || >=22.12.0"