Skip to content

Stability and CI: DRY playback flow, tests, and Raycast-ready checks#1

Merged
thehoegh merged 6 commits into
mainfrom
upgrade/crickets-stability-ci
Mar 15, 2026
Merged

Stability and CI: DRY playback flow, tests, and Raycast-ready checks#1
thehoegh merged 6 commits into
mainfrom
upgrade/crickets-stability-ci

Conversation

@thehoegh

@thehoegh thehoegh commented Mar 15, 2026

Copy link
Copy Markdown
Member

Summary

Implements the Crickets extension upgrade plan: deterministic runtime, minimal tests, CI/verification scripts, and updated docs so the extension is ready for continued development and Raycast Store publication.

Changes (atomic commits)

  1. chore: manifest and dependencies

    • Add platforms: ["macOS"] (required for afplay).
    • Remove unused @raycast/utils, play-sound, @types/play-sound.
    • Add check, test, verify:assets, verify:deps scripts.
  2. refactor: command runtime

    • New src/lib/play-crickets.ts: single source for path resolution, readability check, and afplay spawn (no shell).
    • Success/failure feedback only after playback start or error.
    • Removed getPreferenceValues/extensionName and repos/raycast path heuristic.
  3. test: minimal coverage

    • Path resolution, success (HUD) and failure (toast) flows, asset-exists contract.
  4. ci: workflow and verification

    • GitHub Actions: npm ci, lint, test, verify:assets, verify:deps, build on macOS.
    • verify-assets: icon + crickets.mp3 from manifest.
    • verify-deps: only @raycast/api allowed in dependencies.
  5. docs: README and CHANGELOG

    • README: features, command, requirements, npm run check.
    • CHANGELOG: stability and CI hardening release.

Verification

  • npm run check passes (lint, test, verify:assets, verify:deps, build).
  • No new runtime dependencies; extension stays lightweight.

Made with Cursor


Note

Medium Risk
Touches the core command execution path and how the bundled audio asset is resolved/validated, which could break runtime playback if path assumptions are wrong. Risk is mitigated by added automated tests and CI verification scripts.

Overview
Hardens the extension for deterministic playback and publish-ready checks. The crickets command is refactored to call a new runCricketsCommand helper that resolves the bundled assets/crickets.mp3, verifies it’s readable, and spawns afplay without a shell, showing success HUD only after spawn or a failure toast on error.

Adds minimal Node tests for path resolution and success/failure behavior, plus repo-level verification scripts (verify:assets, verify:deps) and a GitHub Actions CI workflow running lint/test/verifications/build on macOS. Runtime deps are slimmed to just @raycast/api, platforms: ["macOS"] is declared, and README/CHANGELOG are updated accordingly.

Written by Cursor Bugbot for commit 6823f66. This will update automatically on new commits. Configure here.

- Add platforms: [macOS] for afplay
- Remove unused @raycast/utils, play-sound, @types/play-sound
- Add scripts: check, test, verify:assets, verify:deps
- Icon remains extension-icon.png (assets)

Made-with: Cursor
- Add src/lib/play-crickets.ts: resolve path, ensure readable, spawn afplay
- Replace shell exec with spawn(afplay, [path]); validate asset before play
- Show HUD only after playback starts; surface failures via toast
- Remove getPreferenceValues/extensionName and repos/raycast path heuristic

Made-with: Cursor
- resolveSoundFilePath unit test
- runCricketsCommand success (HUD) and failure (toast) paths
- Assert assets/crickets.mp3 exists in repo

Made-with: Cursor
- GitHub Actions: npm ci, lint, test, verify:assets, verify:deps, build
- verify-assets: check icon and crickets.mp3 from package.json
- verify-deps: allow only @raycast/api in dependencies

Made-with: Cursor
- README: features, command, requirements, development and npm run check
- CHANGELOG: stability and CI hardening release entry

Made-with: Cursor
Use a flat test glob so the npm test script resolves correctly in CI and the minimal test suite actually runs on the PR workflow.

Made-with: Cursor
@thehoegh thehoegh merged commit 5c3f0ea into main Mar 15, 2026
2 checks passed
@thehoegh thehoegh deleted the upgrade/crickets-stability-ci branch March 15, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant