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

[TCM-328] Prevent generated files for hCMS from being empty #2275

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

victorhmp
Copy link
Member

@victorhmp victorhmp commented Mar 28, 2024

What's the purpose of this pull request?

Fixing a bug on how files for hCMS are being generated. If a store did not define their own content-types.json or sections.json files, the default content from @faststore/core would be ignored when faststore cms-sync is executed.

How to test it?

  • Clone a store's repo, or the starter.
  • Install @faststore/cli version from the Deploy Preview below.
  • Run faststore cms-sync --dry-run (to not actuality sync the files), without creating a /cms folder or creating one that's laking either content-types.json or sections.json.
  • Check the generate files at .faststore. They should not contain empty arrays.

References

Motivated by: https://vtex.slack.com/archives/C0164SHMAV9/p1710332274381219.

@victorhmp victorhmp self-assigned this Mar 28, 2024
Copy link

vercel bot commented Mar 28, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 2:53pm

Copy link

codesandbox-ci bot commented Mar 28, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@victorhmp victorhmp changed the title [TCM-328] Prevent output files for hCMS from being empty [TCM-328] Prevent generated files for hCMS from being empty Mar 28, 2024
@victorhmp victorhmp marked this pull request as ready for review March 28, 2024 13:56
@victorhmp victorhmp requested a review from a team as a code owner March 28, 2024 13:56
@victorhmp victorhmp requested review from emersonlaurentino and renatamottam and removed request for a team March 28, 2024 13:56
Copy link
Member

@eduardoformiga eduardoformiga left a comment

Choose a reason for hiding this comment

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

Good job, little Miranda!
Thank you for this contribution. ✨

@eduardoformiga eduardoformiga merged commit f5d2bc5 into main Apr 2, 2024
7 checks passed
@eduardoformiga eduardoformiga deleted the fix/empty-cms-files branch April 2, 2024 21:01
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.

None yet

2 participants