mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-10-03 13:58:23 +08:00
* fix: make shell completion install opt-in and fix PowerShell profile encoding corruption (#948) The postinstall hook silently modified users' shell profiles and corrupted UTF-16 LE PowerShell profiles by forcing all reads/writes through UTF-8. Now postinstall only prints a tip, and the PowerShell installer preserves file encoding via BOM detection on read/write. * Address review: skip profile on any read error, log warnings, clean up UTF-16 BE handling - configureProfile: skip profile on any non-ENOENT error instead of falling through with empty content (could overwrite real profile) - removeProfileConfig: log warning on unexpected read errors instead of silently swallowing - detectEncoding: throw directly for UTF-16 BE instead of using sentinel value - Add test for UTF-16 BE profile rejection
OpenSpec Scripts
Utility scripts for OpenSpec maintenance and development.
update-flake.sh
Updates flake.nix pnpm dependency hash automatically.
When to use: After updating dependencies (pnpm install, pnpm update).
Usage:
./scripts/update-flake.sh
What it does:
- Reads version from
package.json(dynamically used byflake.nix) - Automatically determines the correct pnpm dependency hash
- Updates the hash in
flake.nix - Verifies the build succeeds
Example workflow:
# After dependency updates
pnpm install
./scripts/update-flake.sh
git add flake.nix
git commit -m "chore: update flake.nix dependency hash"
postinstall.js
Post-installation script that runs after package installation.
pack-version-check.mjs
Validates package version consistency before publishing.