diff --git a/addons/Dexie.Syncable/package.json b/addons/Dexie.Syncable/package.json index 63d9b538a..9332ec142 100644 --- a/addons/Dexie.Syncable/package.json +++ b/addons/Dexie.Syncable/package.json @@ -55,6 +55,7 @@ "rollup -c tools/build-configs/rollup.config.js", "rollup -c tools/build-configs/rollup.tests.config.js", "node tools/replaceVersionAndDate.js dist/dexie-syncable.js", + "node tools/replaceVersionAndDate.js test/unit/bundle.js", "# eslint ", "eslint src --cache" ], diff --git a/addons/Dexie.Syncable/src/Dexie.Syncable.js b/addons/Dexie.Syncable/src/Dexie.Syncable.js index 9feb4af3c..a7b765c45 100644 --- a/addons/Dexie.Syncable/src/Dexie.Syncable.js +++ b/addons/Dexie.Syncable/src/Dexie.Syncable.js @@ -42,7 +42,7 @@ function Syncable (db) { if (!db.observable || (db.observable.version !== "{version}" && !/^(3|4)\./.test(db.observable.version))) throw new Error(`Missing dexie-observable version 3.x or 4.x`); if (db.syncable) { - if (db.syncable.version !== "{version}") throw new Error(`Mixed versions of dexie-syncable`); + if (db.syncable.version !== "{version}") throw new Error(`Mixed versions of dexie-syncable: "{version}" vs "${db.syncable.version}"`); return; // Addon already active. } @@ -279,7 +279,7 @@ Syncable.registerSyncProtocol = function(name, protocolInstance) { if (Dexie.Syncable) { if (Dexie.Syncable.version !== "{version}") { - throw new Error (`Mixed versions of dexie-syncable`); + throw new Error (`Mixed versions of dexie-syncable: "{version}" vs "${Dexie.Syncable.version}"`); } } else { // Register addon in Dexie: