Delivery Tracker - FedEx Delivery Date Bug Fix#17627
Delivery Tracker - FedEx Delivery Date Bug Fix#17627raycastbot merged 10 commits intoraycast:mainfrom
Conversation
|
Thank you for the update! 🎉 Due to our current reduced availability, the initial review may take up to 10-15 business days |
There was a problem hiding this comment.
PR Summary
This PR fixes a timezone-related bug in the FedEx delivery date handling for users in negative UTC offset timezones, along with dependency updates and CI workflow improvements.
- Fixed timezone handling in
/extensions/delivery-tracker/src/carriers/fedex.tsby using local timezone for estimated delivery dates without accurate time info - Added new
build-distscript inpackage.jsonand updated CI workflow to use it - Updated dev dependencies including TypeScript 5.8.2, Prettier 3.5.3, and @raycast/migration 1.93.0
- Consider using
showFailureToastfrom@raycast/utilsinstead of manual error handling in FedEx API calls
💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!
4 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
| function convertFedexDateToDate(fedexDate: string | undefined): Date | undefined { | ||
| if (!fedexDate) { | ||
| return undefined; | ||
| function convertFedexDateToDate(fedexDate: [{ type: string; dateTime: string }]): Date | undefined { |
There was a problem hiding this comment.
style: The function parameter type suggests an array with exactly one element, but FedEx might return multiple date entries. Consider using Array<{ type: string; dateTime: string }> instead of the tuple type.
| function convertFedexDateToDate(fedexDate: [{ type: string; dateTime: string }]): Date | undefined { | |
| function convertFedexDateToDate(fedexDate: Array<{ type: string; dateTime: string }>): Date | undefined { |
|
|
||
| if (estimatedDeliveryDate) { | ||
| // use the current timezone of the computer running Raycast | ||
| const [year, month, day] = estimatedDeliveryDate.split("T")[0].split("-").map(Number); |
There was a problem hiding this comment.
logic: Consider adding validation for the date parts before using them. Invalid date strings could cause runtime errors.
There was a problem hiding this comment.
There's logic at a higher level for catching any runtime errors if FedEx decides to change the API out from under me. The chance of that happening is very small.
pernielsentikaer
left a comment
There was a problem hiding this comment.
Hi 👋
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. |
Description
Fixed a bug for the delivery date from FedEx. People living in timezones with a negative UTC offset incorrectly saw delivery dates a day earlier for FedEx. This has been fixed.
The screenshot below would have incorrectly displayed "Sun Mar 9 2025" before this bug fix.
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