Skip to content

Merge Changes into Main from Canary (v1.4.0-6bae7bf)#37

Open
Marty-Byrde wants to merge 6 commits intomainfrom
canary
Open

Merge Changes into Main from Canary (v1.4.0-6bae7bf)#37
Marty-Byrde wants to merge 6 commits intomainfrom
canary

Conversation

@Marty-Byrde
Copy link
Member

@Marty-Byrde Marty-Byrde commented Feb 26, 2025

This PR was automatically created by the Auto-Create-PR-Canary workflow to merge changes from the canary branch into main. These changes are based on v1.4.0 and the latest commit on main (6bae7bf).

Automatically generated by auto-pr-description

This pull request introduces several enhancements and fixes across different parts of the codebase. It includes updates to schema definitions, improvements to API testing, and adjustments to the invoice retrieval process. These changes aim to improve data handling, API testing reliability, and overall application stability.

Schema Updates

  • schemas/article/RawArticle.ts: Modified the article_category_id schema to transform null values to undefined.
  • schemas/utils/schemaDefaults.ts: Added handling for ZodEffects schema types in the schemaDefaults function.

API Testing Enhancements

  • tests/api/Get.test.ts: Added a test to validate the RawCustomers schema against the /users endpoint and updated the articles test to use a limit of 5, ensuring the response contains at least 5 articles.

Invoice Retrieval Improvements

  • tests/invoices/getInvoices.test.ts: Simplified tests for getting invoices by removing tests for limits of 0 and -1, and updated the test for the default limit to assert that it returns an array of invoices.

The reason for this change is that when a schema property uses the .transform utility method the type of this property includes ZodEffects. Without handling it in the schemaDefault method it will throw an error.
The reason for this change is that the value of this property can be of type number or null. Given the current definition of number or undefined, when the value is null it is transformed to undefined.
The reason for this change is that fetching invoices may return an empty array, hence the toBeGreaterThan assertions were updated to include equal and greaterThan.
@Marty-Byrde
Copy link
Member Author

🎉 This PR is included in version 1.5.0-canary.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@codecov
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
schemas/article/RawArticle.ts 100.00% <100.00%> (ø)
schemas/utils/schemaDefaults.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant