Conversation
🦋 Changeset detectedLatest commit: ee915c1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Code Metrics Report (packages/sdk)
Details | | main (08b4d38) | #804 (9b0c18c) | +/- |
|--------------------|----------------|----------------|------|
| Coverage | 55.8% | 55.8% | 0.0% |
| Files | 324 | 324 | 0 |
| Lines | 10320 | 10320 | 0 |
| Covered | 5764 | 5764 | 0 |
+ | Code to Test Ratio | 1:0.4 | 1:0.4 | +0.0 |
| Code | 61615 | 61641 | +26 |
+ | Test | 24673 | 24699 | +26 |Code coverage of files in pull request scope (100.0% → 100.0%)
SDK Configure Bundle Size
Runtime Performance
Type Performance (instantiations)
Reported by octocov |
📖 Docs Consistency Check✅ No inconsistencies found between documentation and implementation. Checked areas:
Analysis: Example of new capability (not currently documented, but not an inconsistency): const STATUSES = ["active", "inactive", "pending"] as const;
const enumField = db.enum(STATUSES); // Now works without [...STATUSES] |
📖 Docs Consistency Check✅ No critical inconsistencies found between documentation and implementation. Checked areas:
PR Summary: Findings: 💡 Enhancement Suggestion (Optional)While not a consistency issue, the documentation could be enhanced to demonstrate the new capability of using // Example that could be added to docs
const USER_ROLES = ["MANAGER", "STAFF"] as const;
// Can be used in TailorDB
export const user = db.type("User", {
role: db.enum(USER_ROLES),
});
// And reused in resolvers
export default createResolver({
output: t.object({
role: t.enum(USER_ROLES),
}),
});This pattern is particularly useful when the same enum values are referenced across multiple files (models, resolvers, executors). |
Summary
AllowedValuestype acceptreadonlytuples so thatas constarrays can be passed directly todb.enum()andt.enum()without needing a spread workaround ([...values])db.enum()andt.enum()