Stability and CI: DRY playback flow, tests, and Raycast-ready checks#1
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
chore: manifest and dependencies
platforms: ["macOS"](required forafplay).@raycast/utils,play-sound,@types/play-sound.check,test,verify:assets,verify:depsscripts.refactor: command runtime
src/lib/play-crickets.ts: single source for path resolution, readability check, andafplayspawn (no shell).getPreferenceValues/extensionName andrepos/raycastpath heuristic.test: minimal coverage
ci: workflow and verification
npm ci, lint, test, verify:assets, verify:deps, build on macOS.verify-assets: icon +crickets.mp3from manifest.verify-deps: only@raycast/apiallowed in dependencies.docs: README and CHANGELOG
npm run check.Verification
npm run checkpasses (lint, test, verify:assets, verify:deps, build).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
cricketscommand is refactored to call a newrunCricketsCommandhelper that resolves the bundledassets/crickets.mp3, verifies it’s readable, and spawnsafplaywithout 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.