DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
chore(bumpp): add config for Tauri-aware version bumps
hairyff169c86a4d78
diff --git a/bump.config.ts b/bump.config.tsnew file mode 100644index 00000000..a7c3e835--- /dev/null+++ b/bump.config.ts@@ -0,0 +1,11 @@+import { defineConfig } from 'bumpp'++export default defineConfig({+ release: 'prompt',+ files: [+ 'package.json',+ 'src-tauri/Cargo.toml',+ 'src-tauri/Cargo.lock',+ 'src-tauri/tauri.conf.json',+ ],+})\ No newline at end of filediff --git a/package.json b/package.jsonindex 291f7289..eb06f44b 100644--- a/package.json+++ b/package.json@@ -9,6 +9,7 @@"build": "tsc && vite build","preview": "vite preview","tauri": "tauri",+ "release": "bumpp","typecheck": "tsc --noEmit","icons": "tauri icon public/favicon.svg"},@@ -26,6 +27,7 @@"@types/react": "^18.3.12","@types/react-dom": "^18.3.1","@vitejs/plugin-react": "^4.6.0",+ "bumpp": "^12.2.1","tailwindcss": "4.1.11","typescript": "~5.8.3","vite": "^7.0.4"diff --git a/patches/bumpp.patch b/patches/bumpp.patchnew file mode 100644index 00000000..946074fc--- /dev/null+++ b/patches/bumpp.patch@@ -0,0 +1,91 @@+diff --git a/dist/shared/bumpp.0D8oR-Fd.mjs b/dist/shared/bumpp.0D8oR-Fd.mjs+index bae655794606bdf7f45d949b9bcb3a4260ef0c9a..b514ee6d37c384ccec32a3272979d66890e3cfc1 100644+--- a/dist/shared/bumpp.0D8oR-Fd.mjs++++ b/dist/shared/bumpp.0D8oR-Fd.mjs+@@ -6942,7 +6942,12 @@ async function updateFile(relPath, operation) {+ case "jsr.jsonc":+ case "deno.json":+ case "deno.jsonc":++ case "tauri.conf.json":+ return updateManifestFile(relPath, operation);++ case "cargo.toml":++ return updateCargoToml(relPath, operation);++ case "cargo.lock":++ return updateCargoLock(relPath, operation);+ default:+ return updateTextFile(relPath, operation);+ }+@@ -6952,7 +6957,9 @@ async function updateManifestFile(relPath, operation) {+ const { newVersion } = operation.state;+ let modified = false;+ const file = await readJsoncFile(relPath, cwd);+- if (!isManifest(file.data)) {++ // Support files with only version field (like tauri.conf.json)++ const hasVersion = file.data && typeof file.data === "object" && typeof file.data.version === "string";++ if (!isManifest(file.data) && !hasVersion) {+ return modified;+ }+ if (file.data.version == null) {+@@ -6967,6 +6974,62 @@ async function updateManifestFile(relPath, operation) {+ }+ return modified;+ }++async function updateCargoToml(relPath, operation) {++ const { cwd } = operation.options;++ const { currentVersion, newVersion } = operation.state;++ let modified = false;++ const file = await readTextFile(relPath, cwd);++ // Match version in [package] section: version = "x.y.z"++ const versionPattern = new RegExp(`(^\\s*version\\s*=\\s*["']?)${currentVersion.replace(/(\W)/g, "\\$1")}(["']?\\s*$)`, "m");++ if (versionPattern.test(file.data)) {++ file.data = file.data.replace(versionPattern, `$1${newVersion}$2`);++ await writeTextFile(file);++ modified = true;++ }++ return modified;++}++async function updateCargoLock(relPath, operation) {++ const { cwd } = operation.options;++ const { currentVersion, newVersion } = operation.state;++ let modified = false;++ const file = await readTextFile(relPath, cwd);++ // Only update the main package version, not dependencies++ // Read the package name from Cargo.toml to identify the main package++ const lockDir = path.dirname(path.join(cwd, relPath));++ const cargoTomlPath = path.join(lockDir, "Cargo.toml");++ let packageName = null;++ if (existsSync(cargoTomlPath)) {++ const cargoTomlRelPath = path.relative(cwd, cargoTomlPath);++ const cargoTomlContent = await readTextFile(cargoTomlRelPath, cwd);++ const nameMatch = cargoTomlContent.data.match(/^name\s*=\s*["']([^"']+)["']/m);++ if (nameMatch) {++ packageName = nameMatch[1];++ }++ }++ if (packageName) {++ // Match version only for the main package: [[package]] followed by name = "package-name" followed by version = "x.y.z"++ // Use multiline mode and allow flexible whitespace++ const escapedPackageName = packageName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++ const escapedCurrentVersion = currentVersion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++ // Pattern: [[package]] ... name = "package-name" ... version = "currentVersion"++ const mainPackagePattern = new RegExp(`(\\[\\[package\\]\\][\\s\\S]*?name\\s*=\\s*["']${escapedPackageName}["'][\\s\\S]*?version\\s*=\\s*["']?)${escapedCurrentVersion}(["'])`, "m");++ if (mainPackagePattern.test(file.data)) {++ file.data = file.data.replace(mainPackagePattern, `$1${newVersion}$2`);++ await writeTextFile(file);++ modified = true;++ }++ } else {++ // Fallback: only replace first occurrence (likely the main package)++ const escapedCurrentVersion = currentVersion.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");++ const versionPattern = new RegExp(`(^version\\s*=\\s*["']?)${escapedCurrentVersion}(["']\\s*$)`, "m");++ if (versionPattern.test(file.data)) {++ file.data = file.data.replace(versionPattern, `$1${newVersion}$2`);++ await writeTextFile(file);++ modified = true;++ }++ }++ return modified;++}+ async function updateTextFile(relPath, operation) {+ const { cwd } = operation.options;+ const { currentVersion, newVersion } = operation.state;\ No newline at end of filediff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex b3914b53..9e20c434 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -4,6 +4,11 @@ settings:autoInstallPeers: trueexcludeLinksFromLockfile: false+patchedDependencies:+ bumpp:+ hash: cb92d54ee0571413536369c45796fd9266607054fb4bdd5ac0400a04d91a85f9+ path: patches/bumpp.patch+importers:.:@@ -26,7 +31,7 @@ importers:version: 4.1.11'@tailwindcss/vite':specifier: 4.1.11- version: 4.1.11([email protected](@types/[email protected])([email protected])([email protected]))+ version: 4.1.11([email protected](@types/[email protected])([email protected])([email protected])([email protected]))'@tauri-apps/cli':specifier: ^2.11.4version: 2.11.4@@ -41,7 +46,10 @@ importers:version: 18.3.7(@types/[email protected])'@vitejs/plugin-react':specifier: ^4.6.0+ version: 4.7.0([email protected](@types/[email protected])([email protected])([email protected])([email protected]))+ bumpp:+ specifier: ^12.2.1+ version: 12.2.1(patch_hash=cb92d54ee0571413536369c45796fd9266607054fb4bdd5ac0400a04d91a85f9)tailwindcss:specifier: 4.1.11version: 4.1.11@@ -50,7 +58,7 @@ importers:version: 5.8.3vite:specifier: ^7.0.4packages:@@ -328,6 +336,9 @@ packages:os: [linux]libc: [glibc]+ '@quansync/[email protected]':+ resolution: {integrity: sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==}+'@rolldown/[email protected]':resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==}@@ -680,6 +691,9 @@ packages:peerDependencies:vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0+ resolution: {integrity: sha512-xXAd7G2Mll5W8uo37GETpQ2VrE84M181Z7ugHFGQnJZ50M2mbOv0osSZ9VsSgPfJQ+LVG0prSi0th+ELMsno7Q==}+resolution: {integrity: sha512-JyJ954WzuIR8/FFzX0o5krdSTrBAkcCSRfWSleRsIHSWV+cZe2FI1PKggVkFke1hBldRs+LRxUczzE9iPmgZww==}engines: {node: '>=6.0.0'}@@ -690,6 +704,15 @@ packages:engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}hasBin: true+ resolution: {integrity: sha512-8inGPx8PC/BaEOWhzfxrNHGj/x5Srt0EeJatAcTJ9N7AZpQG/HlH4kGp5JWbEL8zffYXI5iBkMjG8SHnJ9e/6g==}+ engines: {node: ^22.18.0 || ^24.11.0 || >=26.0.0}+ hasBin: true++ resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==}+ engines: {node: '>=20.19.0'}+resolution: {integrity: sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==}@@ -712,6 +735,9 @@ packages:supports-color:optional: true+ resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==}+resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}engines: {node: '>=8'}@@ -770,6 +796,9 @@ packages:engines: {node: '>=6'}hasBin: true+ resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==}+resolution: {integrity: sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==}engines: {node: '>= 12.0.0'}@@ -873,6 +902,9 @@ packages:resolution: {integrity: sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==}engines: {node: '>=18'}+ resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==}+resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}@@ -884,6 +916,9 @@ packages:resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==}engines: {node: ^10 || ^12 || >=14}+ resolution: {integrity: sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==}+resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==}peerDependencies:@@ -924,6 +959,10 @@ packages:resolution: {integrity: sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==}engines: {node: '>=18'}+ resolution: {integrity: sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}engines: {node: '>=12.0.0'}@@ -933,6 +972,12 @@ packages:engines: {node: '>=14.17'}hasBin: true+ resolution: {integrity: sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==}++ resolution: {integrity: sha512-oi8Qy2JV4D3UQ0PsopR28CzdQ3S/5A1zwsUwp/rosSbfhJ5z7b90bIyTwi/F7hCLD4SGcZVjDzd4XoUQcEanvA==}+resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}@@ -942,6 +987,10 @@ packages:peerDependencies:browserslist: '>= 4.21.0'+ resolution: {integrity: sha512-zj/ob3UsvJGN0whEAKFp53REA5X66hvffVqoCtVQAakJKnKlH+/PcOfMoFwIG/o4rElqLv/ycAFlx8ZlXUorCg==}+ engines: {node: '>=18.12.0'}+resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==}engines: {node: ^20.19.0 || >=22.12.0}@@ -989,6 +1038,11 @@ packages:resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==}engines: {node: '>=18'}+ resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==}+ engines: {node: '>= 14.6'}+ hasBin: true+snapshots:'@alloc/[email protected]': {}@@ -1214,6 +1268,10 @@ snapshots:'@napi-rs/[email protected]':optional: true+ '@quansync/[email protected]':+ dependencies:+ quansync: 1.0.0+'@rolldown/[email protected]': {}'@rollup/[email protected]':@@ -1363,12 +1421,12 @@ snapshots:postcss: 8.5.26tailwindcss: 4.1.11- '@tailwindcss/[email protected]([email protected](@types/[email protected])([email protected])([email protected]))':+ '@tailwindcss/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':dependencies:'@tailwindcss/node': 4.1.11'@tailwindcss/oxide': 4.1.11tailwindcss: 4.1.11'@tauri-apps/[email protected]': {}@@ -1457,7 +1515,7 @@ snapshots:'@types/prop-types': 15.7.15csstype: 3.2.3- '@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected]))':+ '@vitejs/[email protected]([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':dependencies:'@babel/core': 7.29.7'@babel/plugin-transform-react-jsx-self': 7.29.7(@babel/[email protected])@@ -1465,10 +1523,12 @@ snapshots:'@rolldown/pluginutils': 1.0.0-beta.27'@types/babel__core': 7.20.5react-refresh: 0.17.0transitivePeerDependencies:- supports-color+ [email protected]: {}+@@ -1479,6 +1539,20 @@ snapshots:node-releases: 2.0.53update-browserslist-db: 1.3.1([email protected])+ [email protected](patch_hash=cb92d54ee0571413536369c45796fd9266607054fb4bdd5ac0400a04d91a85f9):+ dependencies:+ args-tokenizer: 0.3.0+ cac: 7.0.0+ jsonc-parser: 3.3.1+ package-manager-detector: 1.8.0+ tinyexec: 1.3.0+ tinyglobby: 0.2.17+ unconfig: 7.5.0+ verkit: 0.3.2+ yaml: 2.9.0++ [email protected]: {}+@@ -1491,6 +1565,8 @@ snapshots:dependencies:ms: 2.1.3+ [email protected]: {}+@@ -1550,6 +1626,8 @@ snapshots:+ [email protected]: {}+optional: true@@ -1623,6 +1701,8 @@ snapshots:+ [email protected]: {}+@@ -1633,6 +1713,8 @@ snapshots:picocolors: 1.1.1source-map-js: 1.2.1+ [email protected]: {}+dependencies:loose-envify: 1.4.0@@ -1697,6 +1779,8 @@ snapshots:minizlib: 3.1.0yallist: 5.0.0+ [email protected]: {}+dependencies:fdir: 6.5.0([email protected])@@ -1704,6 +1788,19 @@ snapshots:+ dependencies:+ '@quansync/fs': 1.0.0+ quansync: 1.0.0++ dependencies:+ '@quansync/fs': 1.0.0+ defu: 6.1.7+ jiti: 2.7.0+ quansync: 1.0.0+ unconfig-core: 7.5.0+@@ -1712,7 +1809,9 @@ snapshots:escalade: 3.2.0picocolors: 1.1.1+ [email protected]: {}++ [email protected](@types/[email protected])([email protected])([email protected])([email protected]):dependencies:esbuild: 0.28.2fdir: 6.5.0([email protected])@@ -1725,7 +1824,10 @@ snapshots:fsevents: 2.3.3jiti: 2.7.0lightningcss: 1.30.1+ yaml: 2.9.0++ [email protected]: {}diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlnew file mode 100644index 00000000..f7108fcd--- /dev/null+++ b/pnpm-workspace.yaml@@ -0,0 +1,6 @@+shellEmulator: true++trustPolicy: no-downgrade++patchedDependencies:+ bumpp: patches/bumpp.patch