From 01c5c5c04bd9234c64d6f57ee0ea65b0f478a1b7 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 31 Jul 2021 18:08:51 -0400 Subject: Dictionary importer refactoring (#1867) * Remove map of schemas * Don't reuse dictionary importer instances * Refactor * Update how progress callback is used --- dev/translator-vm.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dev') diff --git a/dev/translator-vm.js b/dev/translator-vm.js index d616afc5..c826abec 100644 --- a/dev/translator-vm.js +++ b/dev/translator-vm.js @@ -76,15 +76,14 @@ class TranslatorVM extends DatabaseVM { // Setup database const dictionaryImporterMediaLoader = new DatabaseVMDictionaryImporterMediaLoader(); - const dictionaryImporter = new DictionaryImporter(dictionaryImporterMediaLoader); + const dictionaryImporter = new DictionaryImporter(dictionaryImporterMediaLoader, null); const dictionaryDatabase = new DictionaryDatabase(); await dictionaryDatabase.prepare(); const {errors} = await dictionaryImporter.importDictionary( dictionaryDatabase, testDictionaryContent, - {prefixWildcardsSupported: true}, - () => {} + {prefixWildcardsSupported: true} ); assert.deepStrictEqual(errors.length, 0); -- cgit v1.2.3