Fix telemetry CLI to write empty properties collection (#205746)

Follow-up of #205613. Remove check blocking empty properties from
writing.
This commit is contained in:
Michael Dokolin 2025-01-07 17:46:43 +01:00 committed by GitHub
parent e8502c9fd7
commit aa8195ced4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -15,7 +15,7 @@ export function writeToFileTask({ roots }: TaskContext) {
return roots.map((root) => ({
task: async () => {
const fullPath = path.resolve(process.cwd(), root.config.output);
if (root.mapping && Object.keys(root.mapping.properties).length > 0) {
if (root.mapping) {
// Sort first-level properties alphabetically
root.mapping.properties = Object.fromEntries(
Object.entries(root.mapping.properties).sort(([a], [b]) => {

View file

@ -1,4 +1,3 @@
{
"properties": {
}
"properties": {}
}