opral / inlang-sdk

0 stars 0 forks source link

add .json ordering to `import` `export` in loadProjectFromDirectory #219

Closed samuelstroschein closed 1 month ago

samuelstroschein commented 1 month ago

Inlang plugins that use loadMessages() and saveMessages() manually preserved the order of the keys. Given that plugins have no access to fs anymore, and to reduce complexity of writing plugins, laodProjectFromDirectory should sort the keys.

samuelstroschein commented 1 month ago

alphabetical ordering for plugins to process has been implemented.

sorting based on an existing json is only relevant for loadProjectFromDirectory. given that we expect that loadProjecyFromDirectory will be phased out, the added complexity is not worth it.