feat(esm): convert to esm (#2569)
for #2543 BREAKING CHANGE: semantic-release is now ESM-only. since it is used through its own executable, the impact on consuming projects should be minimal BREAKING CHANGE: references to plugin files in configs need to include the file extension because of executing in an ESM context
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
const {isPlainObject, isFunction, noop, cloneDeep, omit} = require('lodash');
|
||||
const debug = require('debug')('semantic-release:plugins');
|
||||
const getError = require('../get-error');
|
||||
const {extractErrors} = require('../utils');
|
||||
const PLUGINS_DEFINITIONS = require('../definitions/plugins');
|
||||
const {loadPlugin, parseConfig} = require('./utils');
|
||||
import {cloneDeep, isFunction, isPlainObject, noop, omit} from 'lodash-es';
|
||||
import debugPlugins from 'debug';
|
||||
import getError from '../get-error.js';
|
||||
import {extractErrors} from '../utils.js';
|
||||
import PLUGINS_DEFINITIONS from '../definitions/plugins.js';
|
||||
import {loadPlugin, parseConfig} from './utils.js';
|
||||
|
||||
module.exports = async (context, type, pluginOpt, pluginsPath) => {
|
||||
const debug = debugPlugins('semantic-release:plugins');
|
||||
|
||||
export default async (context, type, pluginOpt, pluginsPath) => {
|
||||
const {stdout, stderr, options, logger} = context;
|
||||
if (!pluginOpt) {
|
||||
return noop;
|
||||
@@ -64,4 +66,4 @@ module.exports = async (context, type, pluginOpt, pluginsPath) => {
|
||||
}
|
||||
|
||||
return validator;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user