feat(plugins): automatically prefix plugins when loading if necessary

I.e. when specifying only "--plugin generate-js" Emigrate will load the @emigrate/plugin-generate-js plugin.
This commit is contained in:
Joakim Carlstein 2023-11-10 10:45:15 +01:00
parent ca3ab9ec62
commit 9c239e0ae5
8 changed files with 83 additions and 29 deletions

View file

@ -0,0 +1,5 @@
---
'emigrate': minor
---
Automatically prefix plugin names when loading them if necessary. I.e. when specifying only "--plugin generate-js" Emigrate will load the @emigrate/plugin-generate-js plugin. It has a priority order that is: 1. the provided plugin name as is, 2. the name prefixed with "@emigrate/plugin-", 3. the name prefixed with "emigrate-plugin-"

View file

@ -0,0 +1,5 @@
---
'@emigrate/plugin-tools': minor
---
Use import-from-esm to resolve plugins relative to the current working directory and add a convenient plugin loader helper (loadPlugin)