diff --git a/.changeset/mighty-mirrors-tease.md b/.changeset/mighty-mirrors-tease.md new file mode 100644 index 000000000..49d954264 --- /dev/null +++ b/.changeset/mighty-mirrors-tease.md @@ -0,0 +1,5 @@ +--- +'@powersync/service-sync-rules': patch +--- + +Restore `schema/sync_rules.json` file removed in version `0.43.0`. diff --git a/packages/sync-rules/scripts/compile-schema.js b/packages/sync-rules/scripts/compile-schema.js index 71ecba6a9..176235ce9 100644 --- a/packages/sync-rules/scripts/compile-schema.js +++ b/packages/sync-rules/scripts/compile-schema.js @@ -8,4 +8,9 @@ const schemaDir = path.join(__dirname, '../schema'); fs.mkdirSync(schemaDir, { recursive: true }); -fs.writeFileSync(path.join(schemaDir, 'sync_config.json'), JSON.stringify(syncRulesSchema, null, '\t')); +const contents = JSON.stringify(syncRulesSchema, null, '\t'); +fs.writeFileSync(path.join(schemaDir, 'sync_config.json'), contents); + +// For backwards compatibility with the CLI embedding an unpkg url pointing to this file in a +// `yaml-language-server: $schema=` comment. +fs.writeFileSync(path.join(schemaDir, 'sync_rules.json'), contents);