Skip to content

Commit

Permalink
Make codegen types stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieusieben committed Jan 26, 2025
1 parent f955028 commit 02654fc
Show file tree
Hide file tree
Showing 114 changed files with 3,192 additions and 1,742 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-dots-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lexicon": patch
---

Small bundle size improvement
9 changes: 9 additions & 0 deletions .changeset/brown-flies-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@atproto/ozone": patch
"@atproto/bsky": patch
"@atproto/api": patch
"@atproto/pds": patch
---

Update generated code to better reflect actual entity structure

5 changes: 5 additions & 0 deletions .changeset/eleven-knives-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lex-cli": patch
---

Improve typing of isX and validateX return values
5 changes: 5 additions & 0 deletions .changeset/fast-points-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/syntax": patch
---

Improve performance of isValidTid
5 changes: 5 additions & 0 deletions .changeset/fast-waves-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lex-cli": patch
---

Strongly type result of generated validation helpers
5 changes: 5 additions & 0 deletions .changeset/green-cherries-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/pds": patch
---

Minor typing fixes
5 changes: 5 additions & 0 deletions .changeset/green-forks-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/api": minor
---

Helper functions (e.g. `NS.isRecord`) no longer casts the output value. Use the new `NS.isValidRecord` function to ensure an unknown input is a valid `NS.Record`. The `isX` helper function's purpose is to discriminate between `$type`d values from unions.
5 changes: 5 additions & 0 deletions .changeset/lazy-moles-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/api": minor
---

Add a `$type` property to record and custom user interfaces.
5 changes: 5 additions & 0 deletions .changeset/popular-shirts-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lexicon": patch
---

Various performance improvements
5 changes: 5 additions & 0 deletions .changeset/shiny-suns-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lex-cli": patch
---

Type the generated `ids` object (that contains all the lexicon namespace ids) as `const`.
5 changes: 5 additions & 0 deletions .changeset/silly-starfishes-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lexicon": patch
---

Fully type `ValidationResult`'s `value` property, allowing `NS.validateRecord` helper functions to return a typed value in case of success.
5 changes: 5 additions & 0 deletions .changeset/spotty-bottles-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lex-cli": minor
---

Remove `[string]: unknown` index signature from records, custom user objects, input and output schemas.
5 changes: 5 additions & 0 deletions .changeset/tiny-carpets-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/lex-cli": patch
---

Properly type empty "schemas" array as `LexiconDoc[]`.
Loading

0 comments on commit 02654fc

Please sign in to comment.