Skip to content

Commit

Permalink
refactor(store): always render field methods with suffix and conditio…
Browse files Browse the repository at this point in the history
…nally without (#1550)
  • Loading branch information
dk1a committed Sep 20, 2023
1 parent d5094a2 commit 65c9546
Show file tree
Hide file tree
Showing 32 changed files with 2,829 additions and 138 deletions.
6 changes: 6 additions & 0 deletions .changeset/curvy-tables-melt.md
@@ -0,0 +1,6 @@
---
"@latticexyz/common": major
---

- Add `renderWithFieldSuffix` helper method to always render a field function with a suffix, and optionally render the same function without a suffix.
- Remove `methodNameSuffix` from `RenderField` interface, because the suffix is now computed as part of `renderWithFieldSuffix`.
6 changes: 6 additions & 0 deletions .changeset/olive-pigs-fold.md
@@ -0,0 +1,6 @@
---
"@latticexyz/store": major
---

- Always render field methods with a suffix in tablegen (they used to not be rendered if field methods without a suffix were rendered).
- Add `withSuffixlessFieldMethods` to `RenderTableOptions`, which indicates that field methods without a suffix should be rendered.
51 changes: 51 additions & 0 deletions e2e/packages/contracts/src/codegen/tables/Number.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

199 changes: 199 additions & 0 deletions e2e/packages/contracts/src/codegen/tables/NumberList.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 65c9546

Please sign in to comment.