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

chore(typegen): move prettier formatting into generateAction #7333

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

sgulseth
Copy link
Member

@sgulseth sgulseth commented Aug 7, 2024

A few small changes to typegen:

  • Run prettier once per typegen execution instead of per type
  • Generate one typemap instead of one per file
  • Add integration tests for generating typemap

Description

What to review

Correctness

Testing

Tests added

Notes for release

n/a - no notes needed

This way we format the entire code in one scope
@sgulseth sgulseth requested a review from stipsan August 7, 2024 09:33
@sgulseth sgulseth requested a review from a team as a code owner August 7, 2024 09:33
Copy link

vercel bot commented Aug 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 9:46am
performance-studio ✅ Ready (Inspect) Visit Preview Aug 7, 2024 9:46am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 9:46am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 9:46am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 9:46am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2024 9:46am

@sgulseth sgulseth requested a review from a team as a code owner August 7, 2024 09:33
@sgulseth sgulseth requested review from rexxars and removed request for a team August 7, 2024 09:33
@sgulseth sgulseth force-pushed the feat/typenge/format-improvements branch from d8619dc to 0b628d0 Compare August 7, 2024 09:35
Copy link
Contributor

github-actions bot commented Aug 7, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Aug 7, 2024

Component Testing Report Updated Aug 7, 2024 9:53 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 41s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 30s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 35s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 16s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 42s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 38s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 11s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 8s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 25s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 16s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 1m 22s 20 0 1
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 1m 41s 30 0 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 19s 3 0 0

Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rest easy knowing that there'll only be one line of import '@sanity/client'; in my sanity.types.ts from now on 💖 😌

@stipsan stipsan added this pull request to the merge queue Aug 7, 2024
Merged via the queue into next with commit 3c34f08 Aug 7, 2024
43 checks passed
@stipsan stipsan deleted the feat/typenge/format-improvements branch August 7, 2024 11:19
cngonzalez pushed a commit that referenced this pull request Aug 20, 2024
* chore(typegen): move prettier formatting into generateAction

This way we format the entire code in one scope

* feat(typegen): generate one typemap instead of one per file

* test(typegen): add integration test for generating typemap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants