semantic-release 20.0.4 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/plugins/utils.js +10 -6
- package/package.json +1 -1
package/lib/plugins/utils.js
CHANGED
|
@@ -52,14 +52,18 @@ export async function loadPlugin({cwd}, name, pluginsPath) {
|
|
|
52
52
|
? dirname(resolveFrom.silent(__dirname, pluginsPath[name]) || resolveFrom(cwd, pluginsPath[name]))
|
|
53
53
|
: __dirname;
|
|
54
54
|
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
// See https://github.com/mysticatea/eslint-plugin-node/issues/250
|
|
58
|
-
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
|
59
|
-
name = (await import(`file://${file}`)).default;
|
|
55
|
+
if (isFunction(name)) {
|
|
56
|
+
return name;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
const file = resolveFrom.silent(basePath, name) || resolveFrom(cwd, name);
|
|
60
|
+
const { default: cjsExport, ...esmNamedExports } = await import(`file://${file}`);
|
|
61
|
+
|
|
62
|
+
if (cjsExport) {
|
|
63
|
+
return cjsExport;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return esmNamedExports;
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
export function parseConfig(plugin) {
|
package/package.json
CHANGED