Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable usage of this plugin by release-it's
require
based system
Since the move to `type: modules` in package.json this package no longer works within `release-it`'s normal plugin resolution / resolving steps (because it is internally using `import-from` which is basically just doing `require` relative to the current working directory; and you can't `require` a ES modules based file). This adds a very simple wrapper script and leverages the pre-existing static async method `isEnabled` on the plugin instance to absorb async from a dynamic `import()` expression. The `PluginClass.isEnabled()` hook is always called before `new PluginClass` is called, so this system of absorbing the async in `isEnabled` then returning an instance of "the real plugin" from the fake plugin's constructor is pretty safe.
- Loading branch information