I think the least inconvenient solution would be to leave your
dependency on 'mediawiki.api.edit' in extension.json unchanged, and
conditionally register that module as an "alias" for mediawiki.api if it
doesn't exist, using the ResourceLoaderRegisterModules hook.
You could even be super lazy and register it unconditionally in
extension.json, it seems that the module from core will take precedence
if it exists, but ResourceLoader will apparently log a warning for this.
--
Bartosz Dziewoński
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l