Repository navigation
[Serie A] Update extensions - #22427
Conversation
|
Thank you for the update! 🎉 You can expect an initial review within five business days. |
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
Migrates the Serie A extension to a new API v3 endpoint while maintaining backward compatibility with the legacy API for historical seasons (2022-23 and earlier). The update modernizes the codebase by adopting @raycast/utils hooks like usePromise for better async state management and error handling.
Key improvements:
- Introduced dual API support: v3 for recent seasons (2023-24 onwards) and legacy API for historical data
- Replaced manual state management with
usePromisehook across all components for cleaner async operations - Added
@raycast/utilsfor improved error handling withshowFailureToast - Extracted utility functions (
getFlagEmoji,positionMap) to shared module for code reuse - Removed unnecessary API call in player component by reusing squad data
- Updated dependencies to latest versions and added Windows platform support
- Added API key preference for accessing detailed statistics
Issue found:
- Cache key mismatch in
getSquadfunction that will cause the cache lookup to fail (line 123 insrc/api/index.ts)
Confidence Score: 4/5
- This PR is safe to merge after fixing the cache key bug
- The PR demonstrates excellent code modernization with proper migration to hooks and improved error handling. However, there's a critical cache key mismatch bug in the
getSquadfunction that will prevent proper cache retrieval. The bug is straightforward to fix and won't cause data corruption, just unnecessary API calls. - Review
src/api/index.ts- fix the cache key bug on line 123
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| extensions/lega-serie-a/src/api/index.ts | 4/5 | Migrated to new API structure with improved error handling and added v3 API endpoints. Has potential cache key bug in getSquad. |
| extensions/lega-serie-a/package.json | 5/5 | Updated dependencies to latest versions, improved descriptions, added API key preference, and added Windows platform support. |
| extensions/lega-serie-a/src/table.tsx | 5/5 | Refactored to use usePromise hook, split into new v3 and legacy standing components, removed deprecated player action. |
| extensions/lega-serie-a/src/components/standing.tsx | 5/5 | New component for v3 API standings with improved stats display, form indicators, and movement icons. |
| extensions/lega-serie-a/CHANGELOG.md | 3/5 | Updated with new API migration entry but uses current date instead of PR merge date per custom rules. |
20 files reviewed, 1 comment
73ab276 to
c8ce2ec
Compare
pernielsentikaer
left a comment
There was a problem hiding this comment.
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
- update dependencies - fix(scheduler): add missing code changes - package-lock.json update - fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS - Pull contributions - update changelog - docs: update CHANGELOG for background refresh alert feature - feat: add background refresh status alert to scheduled command form - [Linear] Use API-provided notification presentation (raycast#22285) - Update CODEOWNERs (1a7209e) - Update harvest extension (raycast#22256) - Update CODEOWNERs (13787cd) - Fix finding button in Tahoe. (raycast#22330) - Update GitHub Actions workflow for PR approvals (raycast#22487) - Docs: update for the new API release - Update CODEOWNERs (77f6477) - Added support for Asana sections (raycast#21912) - Update auto-label workflow for PR approvals (raycast#22484) - Update GitHub Actions workflow to set effective token (raycast#22482) - Update workflow to use pull_request_review event (raycast#22479) - Update CODEOWNERs (d5727aa) - Add action to generate and copy private links (raycast#22273) - Enhance PR approval labeling workflow (raycast#22477) - Chatgpt atlas bookmarks improvement (raycast#22371) - Add windows support (raycast#22367) - Update diskutil-mac extension (raycast#22307) - [Secret Browser Commands] add ChatGPT Atlas, etc (raycast#22348) - Update deployhq extension (raycast#22319) - [Serie A] Update extensions (raycast#22427) - package-lock.json update - fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS - Merge branch \'contributions/merge-1761638558070\' - Pull contributions - update changelog - docs: update CHANGELOG for background refresh alert feature - feat: add background refresh status alert to scheduled command form
Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool