zotero/scripts/migrate-fx140
2025-07-30 22:30:57 -04:00
..
.gitignore fx140: Rename esmify to migrate-fx140, add asyncify migration 2025-07-30 22:18:35 -04:00
bluebird-to-async.js Update asyncify script to handle more Mocha hooks 2025-07-30 22:30:57 -04:00
import-to-import_esmodule.js migrate-fx140: Use native Promise.try(), fix Components.utils.import() 2025-07-30 22:18:36 -04:00
is-esmified.js migrate-fx140: Use .mjs for Zotero modules everywhere 2025-07-30 22:30:30 -04:00
map.json fx140: Rename esmify to migrate-fx140, add asyncify migration 2025-07-30 22:18:35 -04:00
migrate.py migrate-fx140: Fix error message 2025-07-30 22:30:39 -04:00
package-lock.json fx140: Rename esmify to migrate-fx140, add asyncify migration 2025-07-30 22:18:35 -04:00
package.json fx140: Rename esmify to migrate-fx140, add asyncify migration 2025-07-30 22:18:35 -04:00
README.txt migrate-fx140: Use native Promise.try(), fix Components.utils.import() 2025-07-30 22:18:36 -04:00
static-import.js fx140: Rename esmify to migrate-fx140, add asyncify migration 2025-07-30 22:18:35 -04:00
use-import-export-declarations.js fx140: Rename esmify to migrate-fx140, add asyncify migration 2025-07-30 22:18:35 -04:00
utils.js migrate-fx140: Use .mjs for Zotero modules everywhere 2025-07-30 22:30:30 -04:00

This is a modified version of the esmify tool from the fx115 tree:
  https://searchfox.org/mozilla-esr115/source/tools/esmify

Zotero modifications:
  - Make scripts work independently of Mach
  - Add Bluebird-to-async migration
  - Don't run a full ESLint --fix or fail if it can't fix everything, but do still try to fix
    a few basic issues introduced by jscodeshift
  - Fix VCS integration for our structure (and remove Mercurial)
  - Replace references to nonexistent "pathlib.os"
  - Add handling for Components.utils.import(), not just Cu.import()

Run:
  scripts/migrate-fx140/migrate.py <esmify|asyncify> [file_or_dir]

Special notes for esmify:
  - If the script you're running on is a window/XPCOM script, not an MJS/ESM, pass --imports