prismic-ts-codegen icon indicating copy to clipboard operation
prismic-ts-codegen copied to clipboard

Sort types and fields consistently between generations

Open angeloashmore opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Deltas between generated files may be reduced by sorting all types and fields in a consistent manner.

Describe the solution you'd like

Type and their properties could be sorted alphabetically.

Describe alternatives you've considered

N/A

Additional context

N/A

angeloashmore avatar Jun 07 '23 21:06 angeloashmore

We could also suggest treating the file as a binary in .gitattributes: https://github.com/prismicio/prismic-client/blob/master/.gitattributes#L4-L6

lihbr avatar Jun 07 '23 21:06 lihbr

I sometimes like to look at the diff to see the full effects of a change, but that could be a good strategy for most users.

angeloashmore avatar Jun 07 '23 21:06 angeloashmore