Skip to content
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

Feature Request: Separate Codegen Directory for 100% Generated Files #635

Closed
davekerber opened this issue May 6, 2023 · 4 comments · Fixed by #970
Closed

Feature Request: Separate Codegen Directory for 100% Generated Files #635

davekerber opened this issue May 6, 2023 · 4 comments · Fixed by #970
Labels
good first issue Good for newcomers hack day seems doable in a hack day released

Comments

@davekerber
Copy link
Collaborator

A low priority for sure, I'd like to have a separate directory for purely generated files vs the files I will change.

For example I put all my entities in an entities folder. I'd like to have entities/codegen for all the files I should never worry about and in entities have the files I maintain after they are initially generated.

@stephenh
Copy link
Collaborator

stephenh commented May 6, 2023

Ah yeah! That's a good idea.

@stephenh stephenh added good first issue Good for newcomers hack day seems doable in a hack day labels May 6, 2023
@brudil
Copy link
Collaborator

brudil commented Jun 17, 2023

I have the start of this in a branch somewhere. I remember there being a couple of interesting decisions to make on the approach;

  1. It's currently implemented an optional "entitiesCodegenDirectory": "generated", option - this isn't a path from root, but joined with whatever is in entitiesDirectory.

  2. What is considered generated - I started with the assumption of files that are marked as overwrite

a. Entity Codegen - yes
b. Enum - yes
c. PgEnum - yes
d. metadata.ts - yes
e. Entity - no
f. Factory - no
g. index.ts - no

For us, this will be a helpful feature to keep easily disable eslint on these files.

@davekerber
Copy link
Collaborator Author

Yeah, generally speaking I want to have all the folders I don't need to review or maintain in a single folder. This makes PRs and tooling easier. The list you created makes sense to me.

@stephenh
Copy link
Collaborator

🎉 This issue has been resolved in version 1.148.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hack day seems doable in a hack day released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants