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

Proposal: Parameter to sort the json keys in the exported file #846

Open
tilmanschweitzer opened this issue Dec 7, 2021 · 0 comments · May be fixed by #847
Open

Proposal: Parameter to sort the json keys in the exported file #846

tilmanschweitzer opened this issue Dec 7, 2021 · 0 comments · May be fixed by #847

Comments

@tilmanschweitzer
Copy link

Sadly, the objects returned from Firestore have a random key order than changes with each export. Therefore it would be great to have a parameter like --sort-keys to have a deterministic output. My use-case for a deterministic output is to check the output for changes.

There are libs to produce a stable output, but this one has no typings.

https://github.com/substack/json-stable-stringify

tilmanschweitzer pushed a commit to tilmanschweitzer/node-firestore-import-export that referenced this issue Dec 7, 2021
…osli#846

The objects returned from Firestore have a random key order.
This makes it hard to compare different backup files.
Therefore, the parameter --sortKeys uses a custom and key-sorted stringify function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant