strapi / strapi

πŸš€ Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
https://strapi.io
Other
60.61k stars 7.57k forks source link

fix(history): handle sanitization when fetching versions #20212

Closed markkaylor closed 1 week ago

markkaylor commented 2 weeks ago

What does it do?

How to test?

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
contributor-docs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 30, 2024 8:18am
Marc-Roig commented 2 weeks ago

I would rather not tie data population with sanitization if possible, and looking at this situation, would it be possible to keep the entry structure the same (without the results & meta object wrapping it) , and keeping a context of missing relations?

markkaylor commented 2 weeks ago

I would rather not tie data population with sanitization if possible, and looking at this situation, would it be possible to keep the entry structure the same (without the results & meta object wrapping it) , and keeping a context of missing relations?

I would be very interested in refactoring to find a better solution in an immediate follow up PR, but I was thinking of this PR as a patch to fix failing e2e tests currently on v5/main.

I also have this PR open that refactors history quite a bit: https://github.com/strapi/strapi/pull/20179 as well, so it might be nice to have that before making big changes here.

wdyt? Would you prefer I handle the refactor now on this PR?

Marc-Roig commented 2 weeks ago

sounds good to me to move this forward to fix the e2e πŸ₯³