-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(store,world): add option to codegen tables into namespace dirs #2840
Conversation
🦋 Changeset detectedLatest commit: a5d2afd The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 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 |
5b2889d
to
ca21e5e
Compare
64a70e3
to
0937cd6
Compare
0937cd6
to
adfa445
Compare
16b9288
to
aca50ec
Compare
@@ -4,7 +4,7 @@ export default defineStore({ | |||
codegen: { | |||
storeImportPath: "../../", | |||
}, | |||
namespace: "store" as const, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to this? Is the namespace strongly typed without it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep! this was leftover from previous iterations, it's still strongly typed without it (as enforced by store config tests)
@@ -126,7 +126,7 @@ export function resolveTableCodegen<input extends TableInput>(input: input): res | |||
storeArgument: get(options, "storeArgument") ?? TABLE_CODEGEN_DEFAULTS.storeArgument, | |||
// dataStruct is true if there are at least 2 value fields | |||
dataStruct: get(options, "dataStruct") ?? Object.keys(input.schema).length - input.key.length > 1, | |||
} satisfies TableCodegen as resolveTableCodegen<input>; | |||
} satisfies TableCodegen as never; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this just aligns with the rest of our as never
usage, context here: https://discord.com/channels/865335009915961364/1199772289495990404/1230849460842532915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very interesting, thank you!
}, | ||
namespace: "store", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
And shouldn't we have an example of a namespaced table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these test tables don't need to live in the same namespace as store-default tables (and this change was an artifact of some earlier refactoring but decided to leave it because it felt closer to the intent of these test tables)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me!
No description provided.