Handy/package.json
Evgeny Khudoba 7056edce28
fix(nix): replace manual hash management with bun2nix (#1021)
* fix(nix): replace manual hash management with bun2nix

Eliminate the recurring problem of Nix build hashes breaking whenever
bun dependencies change or the bun version in nixpkgs updates.

Changes:
- Add bun2nix flake input (pinned to v2.0.1) for per-package fetchurl
  expressions from bun.lock, replacing the single FOD hash approach
- Use allowBuiltinFetchGit for cargo git dependencies, removing manual
  outputHashes that required updates on every git dep change
- Add scripts/check-nix-deps.ts (cross-platform, runs via bun) that
  auto-regenerates .nix/bun.nix when bun.lock changes, triggered by
  the postinstall hook in package.json
- Update CI workflow to verify bun.nix is in sync and evaluate flake
- Remove scripts/update-nix-hashes.sh (no longer needed)

* style: format check-nix-deps.ts with prettier

* ci(nix): make nix-check job a required check

* fix(nix): address review feedback

- Fix bun2nix input pinning: use path syntax (github:owner/repo/tag)
  instead of ?tag= query parameter so flake.lock records the ref
  and `nix flake update` respects the pin
- Make check-nix-deps.ts exit with 0 on bun2nix failure so that
  `bun install` is not blocked for non-Nix developers (CI validates
  bun.nix independently)
- Fix stale reference to check-nix-deps.sh in flake.nix comment

* ci(nix): add full nix build step to CI workflow

Add `nix build .#handy -L --show-trace` after flake evaluation to
catch runtime build errors (broken dependencies, sandbox issues,
compilation failures) that flake eval alone cannot detect.

* fix(nix): update bun2nix pin from 2.0.1 to 2.0.8

bun2nix 2.0.1 has a bug in cache-entry-creator that causes
"ln: failed to create symbolic link '/p': Permission denied"
during the build. Version 2.0.8 fixes this.
2026-03-13 18:45:46 +08:00

65 lines
2.1 KiB
JSON

{
"name": "handy-app",
"private": true,
"version": "0.7.10",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri",
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"format": "prettier --write . && cd src-tauri && cargo fmt",
"format:check": "prettier --check . && cd src-tauri && cargo fmt -- --check",
"format:frontend": "prettier --write .",
"format:backend": "cd src-tauri && cargo fmt",
"test:playwright": "playwright test",
"test:playwright:ui": "playwright test --ui",
"check:translations": "bun scripts/check-translations.ts",
"postinstall": "bun scripts/check-nix-deps.ts"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.16",
"@tauri-apps/api": "^2.10.0",
"@tauri-apps/plugin-autostart": "~2.5.1",
"@tauri-apps/plugin-clipboard-manager": "~2.3.2",
"@tauri-apps/plugin-dialog": "~2.6",
"@tauri-apps/plugin-fs": "~2.4.4",
"@tauri-apps/plugin-global-shortcut": "~2.3.1",
"@tauri-apps/plugin-opener": "^2.5.2",
"@tauri-apps/plugin-os": "~2.3.2",
"@tauri-apps/plugin-process": "~2.3.1",
"@tauri-apps/plugin-sql": "~2.3.1",
"@tauri-apps/plugin-store": "~2.4.1",
"@tauri-apps/plugin-updater": "~2.10.0",
"i18next": "^25.7.2",
"immer": "^11.1.3",
"lucide-react": "^0.542.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^16.4.1",
"react-select": "^5.8.0",
"sonner": "^2.0.7",
"tailwindcss": "^4.1.16",
"tauri-plugin-macos-permissions-api": "2.3.0",
"zod": "^3.25.76",
"zustand": "^5.0.8"
},
"devDependencies": {
"@playwright/test": "^1.58.0",
"@tauri-apps/cli": "^2.10.0",
"@types/node": "^24.9.1",
"@types/react": "^18.3.26",
"@types/react-dom": "^18.3.7",
"@types/react-select": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^8.49.0",
"@typescript-eslint/parser": "^8.49.0",
"@vitejs/plugin-react": "^4.7.0",
"eslint": "^9.39.1",
"eslint-plugin-i18next": "^6.1.3",
"prettier": "^3.6.2",
"typescript": "~5.6.3",
"vite": "^6.4.1"
}
}