From c4cfee18076265364eb0006e38a6397708654f7f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 27 Jul 2025 01:43:32 -0400 Subject: [PATCH] fx140: Fix additional mendeleyImport.mjs imports --- chrome/content/zotero/fileInterface.js | 2 +- chrome/content/zotero/xpcom/schema.js | 2 +- test/tests/mendeleyImportTest.js | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index 7c7920df61..97da1dd6e0 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -713,7 +713,7 @@ var Zotero_File_Interface = new function () { let file = FileUtils.getDir("Home", []); file = OS.Path.join( file.path, - 'zotero-client', 'chrome', 'content', 'zotero', 'import', 'mendeley', 'mendeleyImport.js' + 'zotero-client', 'chrome', 'content', 'zotero', 'import', 'mendeley', 'mendeleyImport.mjs' ); let fileURI = OS.Path.toFileURI(file); ({ Zotero_Import_Mendeley } = ChromeUtils.importESModule(fileURI)); diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 8e1b3d15b4..9c99daa036 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -3301,7 +3301,7 @@ Zotero.Schema = new function () { } else if (i == 101) { - Cu.import("chrome://zotero/content/import/mendeley/mendeleyImport.js"); + let { Zotero_Import_Mendeley } = ChromeUtils.importESModule("chrome://zotero/content/import/mendeley/mendeleyImport.mjs"); let importer = new Zotero_Import_Mendeley(); if (await importer.hasImportedFiles()) { await importer.queueFileCleanup(); diff --git a/test/tests/mendeleyImportTest.js b/test/tests/mendeleyImportTest.js index 809c1433e3..b26f986e5c 100644 --- a/test/tests/mendeleyImportTest.js +++ b/test/tests/mendeleyImportTest.js @@ -1,6 +1,7 @@ /* global setHTTPResponse:false, sinon: false, Zotero_Import_Mendeley: false, HttpServer: false, createAnnotation: false */ describe('Zotero_Import_Mendeley', function () { + var { Zotero_Import_Mendeley } = ChromeUtils.importESModule("chrome://zotero/content/import/mendeley/mendeleyImport.mjs"); var server, httpd, httpdURL, importers; const getImporter = ({ importNotes = false } = {}) => { @@ -20,8 +21,6 @@ describe('Zotero_Import_Mendeley', function () { }; before(async () => { - Cu.import('chrome://zotero/content/import/mendeley/mendeleyImport.js'); - // A real HTTP server is used to deliver a Bitcoin PDF so that annotations can be processed during import. var { HttpServer } = ChromeUtils.importESModule("chrome://remote/content/server/httpd.sys.mjs");; const port = 16213;