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

refactor: order json #821

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

refactor: order json #821

wants to merge 8 commits into from

Conversation

paulboosz
Copy link
Collaborator

@paulboosz paulboosz commented Nov 6, 2024

🔧 Problem

Json are keys are not sorteed. This create diff when the data actually doesnt change

🍰 Solution

Order all json alphabetically and recursively. This is done 2 times for robustness :

  • When generating json in python
  • A check is added to block commit that don't respect this

Points to watch

files excluded from linting are :
package.json
tests/e2e-textile.json
tests/e2e-food.json

🏝️ How to test

make export

  • Run make export
  • try to commit the changes if they are any
  • check that the diff is not just some keys reordered

activities.json

  • edit manually one of the activities.json changing the order of the keys
  • try to commit
  • check that the json is reordered and the diff disappear

@paulboosz paulboosz changed the title Order json refactor: order json Nov 13, 2024
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.

1 participant